Reorganize 'user' section a bit

This commit is contained in:
elenapan 2020-05-24 06:37:27 +03:00
parent 98a23d9fea
commit e67efa8b27
3 changed files with 13 additions and 18 deletions

View file

@ -424,13 +424,13 @@ sidebar_toggle = function()
end
-- Hide sidebar when mouse leaves
if user.sidebar_hide_on_mouse_leave then
if user.sidebar.hide_on_mouse_leave then
sidebar:connect_signal("mouse::leave", function ()
sidebar_hide()
end)
end
-- Activate sidebar by moving the mouse at the edge of the screen
if user.sidebar_show_on_mouse_screen_edge then
if user.sidebar.show_on_mouse_screen_edge then
local sidebar_activator = wibox({y = sidebar.y, width = 1, visible = true, ontop = false, opacity = 0, below = true, screen = screen.primary})
sidebar_activator.height = sidebar.height
sidebar_activator:connect_signal("mouse::enter", function ()

View file

@ -359,13 +359,13 @@ sidebar:buttons(gears.table.join(
))
-- Hide sidebar when mouse leaves
if user.sidebar_hide_on_mouse_leave then
if user.sidebar.hide_on_mouse_leave then
sidebar:connect_signal("mouse::leave", function ()
sidebar.visible = false
end)
end
-- Activate sidebar by moving the mouse at the edge of the screen
if user.sidebar_show_on_mouse_screen_edge then
if user.sidebar.show_on_mouse_screen_edge then
local sidebar_activator = wibox({y = sidebar.y, width = 1, visible = true, ontop = false, opacity = 0, below = true, screen = screen.primary})
sidebar_activator.height = sidebar.height
sidebar_activator:connect_signal("mouse::enter", function ()

View file

@ -80,22 +80,18 @@ user = {
terminal = "kitty -1",
floating_terminal = "kitty -1",
browser = "firefox",
file_manager = "thunar",
tmux = "kitty -1 -e tmux new",
file_manager = "kitty -1 -e ranger",
editor = "kitty -1 --class editor -e vim",
-- editor = "emacs",
email_client = "kitty -1 --class email -e neomutt",
music_client = "kitty -1 --class music -e ncmpcpp",
-- >> Search <<
-- web_search_cmd = "exo-open https://duckduckgo.com/?q="
-- >> Web Search <<
web_search_cmd = "xdg-open https://duckduckgo.com/?q=",
-- web_search_cmd = "exo-open https://www.google.com/search?q="
-- web_search_cmd = "xdg-open https://www.google.com/search?q="
-- >> User profile <<
profile_picture = os.getenv("HOME").."/.config/awesome/profile.png",
-- >> Music <<
music_client = "kitty -1 --class music -e ncmpcpp",
-- Directories with fallback values
dirs = {
downloads = os.getenv("XDG_DOWNLOAD_DIR") or "~/Downloads",
@ -108,12 +104,11 @@ user = {
screenshots = os.getenv("XDG_SCREENSHOTS_DIR") or "~/Pictures/Screenshots",
},
-- >> Email <<
email_client = "kitty -1 --class email -e neomutt",
-- >> Sidebar <<
sidebar_hide_on_mouse_leave = true,
sidebar_show_on_mouse_screen_edge = true,
sidebar = {
hide_on_mouse_leave = true,
show_on_mouse_screen_edge = true,
},
-- >> Lock screen <<
-- This password will ONLY be used if you have not installed