From 5de43bb3740eef3f040da93eea1fe08c9bc26263 Mon Sep 17 00:00:00 2001 From: Nguyễn Gia Phong Date: Wed, 11 May 2022 10:40:49 +0900 Subject: Update lab config --- awesome/.config/awesome/rc.lua | 35 ++++++++++++++++++++++++++++------- 1 file changed, 28 insertions(+), 7 deletions(-) (limited to 'awesome/.config/awesome/rc.lua') diff --git a/awesome/.config/awesome/rc.lua b/awesome/.config/awesome/rc.lua index adf9ee3..44a017e 100644 --- a/awesome/.config/awesome/rc.lua +++ b/awesome/.config/awesome/rc.lua @@ -317,7 +317,7 @@ local function set_wallpaper(s) -- Wallpaper if beautiful.wallpaper then local wallpaper = beautiful.wallpaper - if s.geometry.width > 3000 then + if s.geometry.width > 2880 then wallpaper = beautiful.wallpaper_wide end if type(wallpaper) == "function" then @@ -342,12 +342,8 @@ screen.connect_signal("property::geometry", set_wallpaper) awful.screen.connect_for_each_screen(function (s) set_wallpaper(s) -- Each screen has its own tag table. - if s.geometry.width > 3000 then - awful.tag({"1", "2", "3", "4", "5", "6", "7", "8", "9"}, s, - awful.layout.suit.tile.bottom) - else - awful.tag({"1", "2", "3", "4", "5", "6", "7", "8", "9"}, s, - awful.layout.suit.fair) + awful.tag({"1", "2", "3", "4", "5", "6", "7", "8", "9"}, + s, awful.layout.suit.fair) end -- Create a promptbox for each screen @@ -483,6 +479,31 @@ local globalkeys = awful.util.table.join( awful.key({modkey}, "[", function () awful.screen.focus_relative(1) end, {description = "focus the previous screen", group = "screen"}), + awful.key({modkey}, "0", + function () + for s in screen do + if s.geometry.width > 2880 then + local geo = s.geometry + s.phy_width = geo.width + s:fake_resize(geo.x, geo.y, 1920, geo.height) + s.fake = screen.fake_add(geo.x + 1920, geo.y, + s.phy_width - 1920, geo.height) + end + end + end, + {description = "add fake screens", group = "screen"}), + awful.key({modkey, "Shift"}, "0", + function () + for s in screen do + if s.fake ~= nil then + local geo = s.geometry + s:fake_resize(geo.x, geo.y, s.phy_width, geo.height) + s.fake:fake_remove() + s.fake = nil + end + end + end, + {description = "add fake screens", group = "screen"}), awful.key({modkey}, "u", awful.client.urgent.jumpto, {description = "jump to urgent client", group = "client"}), awful.key({modkey}, "Tab", -- cgit 1.4.1