This commit is contained in:
Hadi 2024-10-08 11:43:12 +02:00
parent e83de257ad
commit 36527362a7
2 changed files with 50 additions and 28 deletions

View File

@ -1,15 +0,0 @@
#!/usr/bin/env bash
# Compress png files in ./docs/src and ./home/wallpapers
[[ -d "./docs" ]] || (echo "Folder ./docs not found" && exit 1)
# Main images
for file in ./docs/src/*.png; do
optipng "$file"
done
# Theme's images
for file in ./docs/src/*/*.png; do
optipng "$file"
done

View File

@ -8,7 +8,9 @@
{ pkgs, ... }:
let
menu = pkgs.writeShellScriptBin "menu" ''
menu = pkgs.writeShellScriptBin "menu"
# bash
''
if pgrep wofi; then
pkill wofi
else
@ -16,11 +18,46 @@ let
fi
'';
powermenu = pkgs.writeShellScriptBin "powermenu" ''
hyprpanel -t powerdropdownmenu
powermenu = pkgs.writeShellScriptBin "powermenu"
# bash
''
if pgrep wofi; then
pkill wofi
else
options=(
"󰌾 Lock"
"󰍃 Logout"
" Suspend"
"󰑐 Reboot"
"󰿅 Shutdown"
)
selected=$(printf '%s\n' "''${options[@]}" | wofi --dmenu)
selected=''${selected:2}
case $selected in
"Lock")
${pkgs.hyprlock}/bin/hyprlock
;;
"Logout")
hyprctl dispatch exit
;;
"Suspend")
systemctl suspend
;;
"Reboot")
systemctl reboot
;;
"Shutdown")
systemctl poweroff
;;
esac
fi
'';
lock = pkgs.writeShellScriptBin "lock" ''
lock = pkgs.writeShellScriptBin "lock"
# bash
''
${pkgs.hyprlock}/bin/hyprlock
'';