Add Powermenu script
This commit is contained in:
parent
ed5fe87fa5
commit
56bb277e07
|
@ -30,19 +30,26 @@ module-margin = 2
|
||||||
separator = ""
|
separator = ""
|
||||||
separator-foreground = ${colors.disabled}
|
separator-foreground = ${colors.disabled}
|
||||||
font-0 = "Fira Sans SemiBold:size=11;1"
|
font-0 = "Fira Sans SemiBold:size=11;1"
|
||||||
font-1 = "Font Awesome 6 Free Solid:pixelsize=12;2"
|
font-1 = "Font Awesome 6 Free Solid:pixelsize=11;2"
|
||||||
modules-left = xworkspaces
|
modules-left = mymenu xworkspaces
|
||||||
modules-center = xwindow
|
modules-center = xwindow
|
||||||
modules-right = myarrow filesystem pulseaudio xkeyboard memory cpu date
|
modules-right = filesystem pulseaudio xkeyboard memory cpu date myexit
|
||||||
cursor-click = pointer
|
cursor-click = pointer
|
||||||
cursor-scroll = ns-resize
|
cursor-scroll = ns-resize
|
||||||
enable-ipc = true
|
enable-ipc = true
|
||||||
; tray-position = right
|
; tray-position = right
|
||||||
|
|
||||||
[module/myarrow]
|
[module/mymenu]
|
||||||
type = custom/text
|
type = custom/text
|
||||||
content-foreground = ${colors.primary}
|
content-foreground = ${colors.primary}
|
||||||
content = ""
|
content = " "
|
||||||
|
click-left = "rofi -show drun -icon-theme 'Papirus' -show-icons"
|
||||||
|
|
||||||
|
[module/myexit]
|
||||||
|
type = custom/text
|
||||||
|
content-foreground = ${colors.primary}
|
||||||
|
content = " "
|
||||||
|
click-left = "~/dotfiles/scripts/powermenu.sh"
|
||||||
|
|
||||||
[module/xworkspaces]
|
[module/xworkspaces]
|
||||||
type = internal/xworkspaces
|
type = internal/xworkspaces
|
||||||
|
@ -61,8 +68,8 @@ label-empty = %name%
|
||||||
label-empty-foreground =#FFFFFF
|
label-empty-foreground =#FFFFFF
|
||||||
label-empty-background=#99000000
|
label-empty-background=#99000000
|
||||||
label-empty-padding = 2
|
label-empty-padding = 2
|
||||||
format-prefix = " "
|
; format-prefix = " "
|
||||||
format-prefix-foreground = ${colors.primary}
|
; format-prefix-foreground = ${colors.primary}
|
||||||
|
|
||||||
[module/xwindow]
|
[module/xwindow]
|
||||||
type = internal/xwindow
|
type = internal/xwindow
|
||||||
|
|
|
@ -129,7 +129,7 @@ keys = [
|
||||||
#System
|
#System
|
||||||
Key([mod], "q", lazy.window.kill(), desc="Kill focused window"),
|
Key([mod], "q", lazy.window.kill(), desc="Kill focused window"),
|
||||||
Key([mod, "control"], "r", lazy.reload_config(), desc="Reload the config"),
|
Key([mod, "control"], "r", lazy.reload_config(), desc="Reload the config"),
|
||||||
Key([mod, "control"], "q", lazy.shutdown(), desc="Shutdown Qtile"),
|
Key([mod, "control"], "q", lazy.spawn(home + "/dotfiles/scripts/powermenu.sh"), desc="Open Powermenu"),
|
||||||
|
|
||||||
# Apps
|
# Apps
|
||||||
Key([mod], "Return", lazy.spawn(terminal), desc="Launch terminal"),
|
Key([mod], "Return", lazy.spawn(terminal), desc="Launch terminal"),
|
||||||
|
|
33
scripts/powermenu.sh
Executable file
33
scripts/powermenu.sh
Executable file
|
@ -0,0 +1,33 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# ____
|
||||||
|
# | _ \ _____ _____ _ __ _ __ ___ ___ _ __ _ _
|
||||||
|
# | |_) / _ \ \ /\ / / _ \ '__| '_ ` _ \ / _ \ '_ \| | | |
|
||||||
|
# | __/ (_) \ V V / __/ | | | | | | | __/ | | | |_| |
|
||||||
|
# |_| \___/ \_/\_/ \___|_| |_| |_| |_|\___|_| |_|\__,_|
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# by Stephan Raabe (2023)
|
||||||
|
# -----------------------------------------------------
|
||||||
|
|
||||||
|
option1=" lock"
|
||||||
|
option2=" logout"
|
||||||
|
option3=" reboot"
|
||||||
|
option4=" power off"
|
||||||
|
|
||||||
|
options="$option1\n"
|
||||||
|
options="$options$option2\n"
|
||||||
|
options="$options$option3\n$option4"
|
||||||
|
|
||||||
|
choice=$(echo -e "$options" | rofi -dmenu -i -no-show-icons -lines 4 -width 30 -p "Powermenu")
|
||||||
|
|
||||||
|
case $choice in
|
||||||
|
$option1)
|
||||||
|
mantablockscreen -cc ;;
|
||||||
|
$option2)
|
||||||
|
qtile cmd-obj -o cmd -f shutdown ;;
|
||||||
|
$option3)
|
||||||
|
systemctl reboot ;;
|
||||||
|
$option4)
|
||||||
|
systemctl poweroff ;;
|
||||||
|
esac
|
||||||
|
|
Loading…
Reference in New Issue
Block a user