From a86e342735d8adbe8db8f510f33ef1e5b3d43966 Mon Sep 17 00:00:00 2001 From: Daan Vanoverloop Date: Mon, 26 Aug 2019 12:01:05 +0200 Subject: [PATCH] Some cahnges --- .config/awesome/exit.sh | 11 +++++++++++ .config/awesome/rc.lua | 3 +-- 2 files changed, 12 insertions(+), 2 deletions(-) create mode 100755 .config/awesome/exit.sh diff --git a/.config/awesome/exit.sh b/.config/awesome/exit.sh new file mode 100755 index 0000000..b324e9a --- /dev/null +++ b/.config/awesome/exit.sh @@ -0,0 +1,11 @@ +#!/bin/sh + +ANSWER=$(echo -e "suspend\nlock\nlogout\nshutdown\nreboot" | rofi -dmenu) + +case $ANSWER in + "suspend") systemctl suspend;; + "lock") xset s activate;; + "logout") echo 'awesome.quit()' | awesome-client;; + "shutdown") shutdown now;; + "reboot") reboot;; +esac diff --git a/.config/awesome/rc.lua b/.config/awesome/rc.lua index 65d5146..c6f5ab1 100644 --- a/.config/awesome/rc.lua +++ b/.config/awesome/rc.lua @@ -283,9 +283,8 @@ globalkeys = gears.table.join( {description = "open a terminal", group = "launcher"}), awful.key({ modkey, "Control" }, "r", awesome.restart, {description = "reload awesome", group = "awesome"}), - awful.key({ modkey, "Shift" }, "e", awesome.quit, + awful.key({ modkey, "Shift" }, "e", function() awful.spawn("/home/daan/.config/awesome/exit.sh") end, {description = "quit awesome", group = "awesome"}), - awful.key({ modkey, }, "l", function () awful.tag.incmwfact( 0.05) end, {description = "increase master width factor", group = "layout"}), awful.key({ modkey, }, "h", function () awful.tag.incmwfact(-0.05) end,