fix powerbutton - 2
This commit is contained in:
@@ -1,6 +0,0 @@
|
||||
{
|
||||
xdg.configFile."acpi" = {
|
||||
recursive = true;
|
||||
source = ./src;
|
||||
};
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
eww open power
|
||||
@@ -1,2 +0,0 @@
|
||||
event=button/power.*
|
||||
action=$HOME/.config/acpi/actions/power-button.sh
|
||||
@@ -2,7 +2,6 @@
|
||||
imports = [
|
||||
./alacritty
|
||||
./anki
|
||||
./apci
|
||||
./calibre
|
||||
./discord
|
||||
./dolphin
|
||||
|
||||
@@ -2,28 +2,28 @@
|
||||
(box
|
||||
:class "powermenu"
|
||||
(button
|
||||
:onclick "systemctl poweroff"
|
||||
:onclick "close eww power; systemctl poweroff"
|
||||
:class "powermenu-button"
|
||||
(label
|
||||
:text "⏻ "))
|
||||
(label
|
||||
:text " ")
|
||||
(button
|
||||
:onclick "loginctl lock-session"
|
||||
:onclick "close eww power; loginctl lock-session"
|
||||
:class "powermenu-button"
|
||||
(label
|
||||
:text ""))
|
||||
(label
|
||||
:text " ")
|
||||
(button
|
||||
:onclick "systemctl reboot"
|
||||
:onclick "close eww power; systemctl reboot"
|
||||
:class "powermenu-button"
|
||||
(label
|
||||
:text ""))
|
||||
(label
|
||||
:text "")
|
||||
(button
|
||||
:onclick "loginctl terminate-user $USER"
|
||||
:onclick "close eww power; loginctl terminate-user $USER"
|
||||
:class "powermenu-button"
|
||||
(label
|
||||
:text ""))))
|
||||
|
||||
6
home/programs/eww/src/scripts/powermenu.sh
Executable file
6
home/programs/eww/src/scripts/powermenu.sh
Executable file
@@ -0,0 +1,6 @@
|
||||
WINDOW_NAME="power"
|
||||
if eww windows | grep -q "$WINDOW_NAME"; then
|
||||
eww close "$WINDOW_NAME"
|
||||
else
|
||||
eww open "$WINDOW_NAME"
|
||||
fi
|
||||
Reference in New Issue
Block a user