diff --git a/files/bin/rofi-powermenu b/files/bin/rofi-powermenu new file mode 100755 index 0000000..11592e2 --- /dev/null +++ b/files/bin/rofi-powermenu @@ -0,0 +1,33 @@ +#!/usr/bin/env bash + +## Modified from https://gitlab.com/vahnrr/rofi-menus/blob/master/scripts/powermenu.sh + +set -e + +power_off="Power Off" +reboot="Reboot" +lock="Lock" +suspend="Suspend" +log_out="Log Out" + +options="$power_off\n$reboot\n$lock\n$suspend\n$log_out" + +chosen="$(echo -e "$options" | rofi -dmenu -p Shutdown? -no-custom -lines 5)" + +case $chosen in + $power_off) + systemctl poweroff + ;; + $reboot) + systemctl reboot + ;; + $lock) + xdotool key "Super_L+l" + ;; + $suspend) + systemctl suspend + ;; + $log_out) + i3-msg exit + ;; +esac diff --git a/files/i3.conf b/files/i3.conf index 276f318..f1a30ad 100644 --- a/files/i3.conf +++ b/files/i3.conf @@ -38,6 +38,7 @@ bindsym $mod+n exec --no-startup-id nautilus bindsym $mod+Shift+g exec --no-startup-id gvim bindsym Control+Shift+Escape exec --no-startup-id gnome-system-monitor bindsym Control+Q exec --no-startup-id /bin/false +bindsym $mod+Shift+Delete exec --no-startup-id rofi-powermenu # Screenshots