diff --git a/.config/awesome/rc.lua b/.config/awesome/rc.lua index a2e5ec1..98f47cb 100644 --- a/.config/awesome/rc.lua +++ b/.config/awesome/rc.lua @@ -16,7 +16,7 @@ local menubar = require("menubar") local hotkeys_popup = require("awful.hotkeys_popup") local vicious = require("vicious") local timer = require("gears.timer") -local config = require("config_laptop") +local config = require("config_desktop") local quake = require("quake") -- Enable hotkeys help widget for VIM and other apps @@ -396,6 +396,33 @@ local function load_widget_config(conf) return t end +bar_timer = timer({ timeout = 0.2 }) +bar_timer:connect_signal("timeout", function () disable_bars() end) +bar_mode = false + +function enable_bars () + if bar_timer.started then bar_timer:stop() end + if bar_mode == true then return else bar_mode = true end + + for s in screen do + s.topwibox.visible = true + s.bottomwibox.visible = true + end +end + +function disable_bars () + --[[ + if bar_timer.started then bar_timer:stop() end + if bar_mode == false then return else bar_mode = false end + + for s in screen do + s.topwibox.visible = false + s.bottomwibox.visible = false + end + --]] +end + + -- Re-set wallpaper when a screen's geometry changes (e.g. different resolution) screen.connect_signal("property::geometry", set_wallpaper) @@ -404,6 +431,8 @@ awful.screen.connect_for_each_screen(function(s) -- Wallpaper set_wallpaper(s) + beautiful.useless_gap = 3 + -- Each screen has its own tag table. awful.tag({ "1", "2", "3", "4", "5", "6", "7", "8", "9" }, s, awful.layout.layouts[1]) @@ -502,12 +531,13 @@ awful.screen.connect_for_each_screen(function(s) s.dock_trigger = wibox({ bg = "#00000000", opacity = 0, ontop = true, visible = true }) s.dock_trigger:geometry({ width = 3, height = 3 }) - s.topwibox:connect_signal("mouse::enter", function() enable_bars() end) - s.topwibox:connect_signal("mouse::leave", function() bar_timer:again() end) - s.bottomwibox:connect_signal("mouse::enter", function() enable_bars() end) - s.bottomwibox:connect_signal("mouse::leave", function() bar_timer:again() end) - s.dock_trigger:connect_signal("mouse::enter", function() enable_bars() end) - s.dock_trigger:connect_signal("mouse::leave", function() bar_timer:again() end) + enable_bars() + --s.topwibox:connect_signal("mouse::enter", function() enable_bars() end) + --s.topwibox:connect_signal("mouse::leave", function() bar_timer:again() end) + --s.bottomwibox:connect_signal("mouse::enter", function() enable_bars() end) + --s.bottomwibox:connect_signal("mouse::leave", function() bar_timer:again() end) + --s.dock_trigger:connect_signal("mouse::enter", function() enable_bars() end) + --s.dock_trigger:connect_signal("mouse::leave", function() bar_timer:again() end) end) -- }}} @@ -530,9 +560,6 @@ switcher_layout = awful.layout.suit.fair switcher_mode = false switcher_timer = timer({ timeout = 1 }) switcher_timer:connect_signal("timeout", function () end_switcher() end) -bar_timer = timer({ timeout = 0.2 }) -bar_timer:connect_signal("timeout", function () disable_bars() end) -bar_mode = false layout_table = {} previous_tags = {} @@ -564,7 +591,7 @@ function end_switcher () if switcher_timer.started then switcher_timer:stop() end if switcher_mode == false then return else switcher_mode = false end - beautiful.useless_gap = 0 + beautiful.useless_gap = 3 -- Restore layout of all tags for _, tag in ipairs(root.tags()) do @@ -596,26 +623,6 @@ function toggle_switcher () if switcher_mode then end_switcher() else start_switcher() end end -function enable_bars () - if bar_timer.started then bar_timer:stop() end - if bar_mode == true then return else bar_mode = true end - - for s in screen do - s.topwibox.visible = true - s.bottomwibox.visible = true - end -end - -function disable_bars () - if bar_timer.started then bar_timer:stop() end - if bar_mode == false then return else bar_mode = false end - - for s in screen do - s.topwibox.visible = false - s.bottomwibox.visible = false - end -end - function set_borders (c) c.border_width = beautiful.border_width awful.titlebar.show(c) @@ -809,6 +816,8 @@ globalkeys = gears.table.join( {description = "show the menubar", group = "launcher"}), awful.key({ modkey }, "d", function() rofi_spawn("rofi -show drun -me-select-entry '' -me-accept-entry 'MousePrimary'") end, {description = "launch rofi", group = "launcher"}), + awful.key({ modkey }, "c", function() rofi_spawn("rofi-pass") end, + {description = "launch rofi-pass", group = "launcher"}), awful.key({ modkey, "Shift" }, "g", function (c) rofi_spawn("dmenu_script lutris.sh")