diff options
| -rwxr-xr-x | .config/awesome/dpms.sh | 2 | ||||
| -rw-r--r-- | .config/awesome/rc.lua | 64 |
2 files changed, 43 insertions, 23 deletions
diff --git a/.config/awesome/dpms.sh b/.config/awesome/dpms.sh index 51e732d..a7e82f9 100755 --- a/.config/awesome/dpms.sh +++ b/.config/awesome/dpms.sh @@ -4,7 +4,7 @@ if command -v xset > /dev/null; then # Place all DPMS settings that you want # to run on awesome-wm startup below: - xset +dpms + xset -dpms xset s off else notify-send "Error: DPMS command not found." diff --git a/.config/awesome/rc.lua b/.config/awesome/rc.lua index 1e03f5a..9425c36 100644 --- a/.config/awesome/rc.lua +++ b/.config/awesome/rc.lua @@ -61,43 +61,63 @@ awful.layout.layouts = { -- {{{ Menu -- Create a launcher widget and a main menu -mydpmsmenu = { - { "s off", function() awful.spawn.easy_async_with_shell("xset s off") end }, - { "s 10 # seconds", function() awful.spawn.easy_async_with_shell("xset s 10") end }, - { "s 30 # seconds", function() awful.spawn.easy_async_with_shell("xset s 30") end }, - { "s 60 # seconds", function() awful.spawn.easy_async_with_shell("xset s 60") end }, - { "s 3 # minutes", function() awful.spawn.easy_async_with_shell("xset s 180") end }, - { "s 5 # minutes", function() awful.spawn.easy_async_with_shell("xset s 300") end }, - { "s 10 # minutes", function() awful.spawn.easy_async_with_shell("xset s 600") end }, - { "s 15 # minutes", function() awful.spawn.easy_async_with_shell("xset s 900") end }, - { "s 30 # minutes", function() awful.spawn.easy_async_with_shell("xset s 1800") end }, - { "s 45 # minutes", function() awful.spawn.easy_async_with_shell("xset s 2700") end }, - { "s 60 # minutes", function() awful.spawn.easy_async_with_shell("xset s 3600") end }, - { "s 2 # hours", function() awful.spawn.easy_async_with_shell("xset s 7200") end }, - { "s 3 # hours", function() awful.spawn.easy_async_with_shell("xset s 10800") end }, - { "s 4 # hours", function() awful.spawn.easy_async_with_shell("xset s 14400") end }, - { "s 6 # hours", function() awful.spawn.easy_async_with_shell("xset s 21600") end }, +s_menu = { + { "off", function() awful.spawn.easy_async_with_shell("xset s off") end }, + { "10 # seconds", function() awful.spawn.easy_async_with_shell("xset s 10") end }, + { "30 # seconds", function() awful.spawn.easy_async_with_shell("xset s 30") end }, + { "60 # seconds", function() awful.spawn.easy_async_with_shell("xset s 60") end }, + { "3 # minutes", function() awful.spawn.easy_async_with_shell("xset s 180") end }, + { "5 # minutes", function() awful.spawn.easy_async_with_shell("xset s 300") end }, + { "10 # minutes", function() awful.spawn.easy_async_with_shell("xset s 600") end }, + { "15 # minutes", function() awful.spawn.easy_async_with_shell("xset s 900") end }, + { "30 # minutes", function() awful.spawn.easy_async_with_shell("xset s 1800") end }, + { "45 # minutes", function() awful.spawn.easy_async_with_shell("xset s 2700") end }, + { "60 # minutes", function() awful.spawn.easy_async_with_shell("xset s 3600") end }, + { "2 # hours", function() awful.spawn.easy_async_with_shell("xset s 7200") end }, + { "3 # hours", function() awful.spawn.easy_async_with_shell("xset s 10800") end }, + { "4 # hours", function() awful.spawn.easy_async_with_shell("xset s 14400") end }, + { "6 # hours", function() awful.spawn.easy_async_with_shell("xset s 21600") end }, +} + +dpms_menu = { + { "off", function() awful.spawn.easy_async_with_shell("xset -dpms") end }, + { "10 # seconds", function() awful.spawn.easy_async_with_shell("xset dpms 10") end }, + { "30 # seconds", function() awful.spawn.easy_async_with_shell("xset dpms 30") end }, + { "60 # seconds", function() awful.spawn.easy_async_with_shell("xset dpms 60") end }, + { "3 # minutes", function() awful.spawn.easy_async_with_shell("xset dpms 180") end }, + { "5 # minutes", function() awful.spawn.easy_async_with_shell("xset dpms 300") end }, + { "10 # minutes", function() awful.spawn.easy_async_with_shell("xset dpms 600") end }, + { "15 # minutes", function() awful.spawn.easy_async_with_shell("xset dpms 900") end }, + { "30 # minutes", function() awful.spawn.easy_async_with_shell("xset dpms 1800") end }, + { "45 # minutes", function() awful.spawn.easy_async_with_shell("xset dpms 2700") end }, + { "60 # minutes", function() awful.spawn.easy_async_with_shell("xset dpms 3600") end }, + { "2 # hours", function() awful.spawn.easy_async_with_shell("xset dpms 7200") end }, + { "3 # hours", function() awful.spawn.easy_async_with_shell("xset dpms 10800") end }, + { "4 # hours", function() awful.spawn.easy_async_with_shell("xset dpms 14400") end }, + { "6 # hours", function() awful.spawn.easy_async_with_shell("xset dpms 21600") end }, } myawesomemenu = { { "show hotkeys", function() hotkeys_popup.show_help(nil, awful.screen.focused()) end }, -- { "manual", terminal .. " -e man awesome" }, - { "dpms$ xset", mydpmsmenu }, + { "xset s", s_menu }, + { "xset dpms", dpms_menu }, { "config file", editor .. " " .. awesome.conffile }, - { "picom config", function() awful.spawn.easy_async_with_shell("sh -c 'gvim $HOME/.config/picom.conf'") end }, + { "picom config", function() awful.spawn.easy_async_with_shell("sh -c 'gvim $HOME/.config/picom.conf'") end }, { "change wallpaper", function() awful.spawn.easy_async_with_shell("sh -c 'nitrogen'") end }, { "xdg_menu refresh", function() awful.spawn.easy_async_with_shell("sh -c 'xdg_menu --format awesome --root-menu /etc/xdg/menus/arch-applications.menu > ~/.config/awesome/xdgmenu.lua'") end }, - { "dunst_hist", function() awful.spawn.easy_async_with_shell("dunstctl history-pop") end, }, - { "dunst=0", function() awful.spawn.easy_async_with_shell("dunstctl set-paused true") end, }, - { "dunst=1", function() awful.spawn.easy_async_with_shell("dunstctl set-paused false") end, }, + { "dunst_hist", function() awful.spawn.easy_async_with_shell("dunstctl history-pop") end }, + { "dunst=0", function() awful.spawn.easy_async_with_shell("dunstctl set-paused true") end }, + { "dunst=1", function() awful.spawn.easy_async_with_shell("dunstctl set-paused false") end }, { "refresh", awesome.restart }, - { "reboot" , function() awful.spawn("sh -c 'lxsudo reboot now'") end }, + { "reboot", function() awful.spawn("sh -c 'lxsudo reboot now'") end }, -- { "quit", function() awesome.quit() end }, { "shutdown", function() awful.spawn("sh -c 'lxsudo shutdown now'") end}, { "stagnate", function() awful.spawn.easy_async_with_shell("sh -c 'systemctl hibernate'") end}, { "suspend", function() awful.spawn.easy_async_with_shell("sh -c 'systemctl suspend'") end}, { "logout", function () awful.spawn("sh -c 'pkill -9 -u $USER'") end }, { "lock", function() awful.spawn.easy_async_with_shell("sh -c 'slock'") end}, + } mymainmenu = awful.menu({ items = { { "applications", xdgmenu, beautiful.awesome_icon }, |
