Skip to content

Commit

Permalink
init quickmenu
Browse files Browse the repository at this point in the history
  • Loading branch information
anotherhadi committed Oct 15, 2024
1 parent 37c6ba8 commit c9663e1
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 7 deletions.
6 changes: 0 additions & 6 deletions docs/TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,3 @@ feel free to contribute <3 ([CONTRIBUTING.md](CONTRIBUTING.md))
- [ ] nvim dap

- [ ] OS Hardening with nix-mineral

- [ ] Quick menu:
- Cafeine
- NightShift
- Nixy
- Hyprpicker
38 changes: 37 additions & 1 deletion home/scripts/system/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,46 @@ let
fi
'';

quickmenu = pkgs.writeShellScriptBin "quickmenu"
# bash
''
if pgrep wofi; then
pkill wofi
# if pgrep tofi; then
# pkill tofi
else
options=(
"󰅶 Caffeine"
"󰖔 Night-shift"
" Nixy"
"󰈊 Hyprpicker"
)
selected=$(printf '%s\n' "''${options[@]}" | wofi -p " Quickmenu" --dmenu)
# selected=$(printf '%s\n' "''${options[@]}" | tofi --prompt-text "> ")
selected=''${selected:2}
case $selected in
"Caffeine")
caffeine
;;
"Night-shift")
night-shift
;;
"Nixy")
kitty zsh -c nixy
;;
"Hyprpicker")
sleep 0.2 && ${pkgs.hyprpicker}/bin/hyprpicker -a
;;
esac
fi
'';

lock = pkgs.writeShellScriptBin "lock"
# bash
''
${pkgs.hyprlock}/bin/hyprlock
'';

in { home.packages = [ menu powermenu lock ]; }
in { home.packages = [ menu powermenu lock quickmenu ]; }
1 change: 1 addition & 0 deletions home/system/hyprland/bindings.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"$mod,L, exec, ${pkgs.hyprlock}/bin/hyprlock" # Lock
"$mod,X, exec, powermenu" # Powermenu
"$mod,SPACE, exec, menu" # Launcher
"$mod,C, exec, quickmenu" # Quickmenu
"$shiftMod,SPACE, exec, hyprfocus-toggle" # Toggle HyprFocus
"$mod,TAB, overview:toggle" # Overview

Expand Down

0 comments on commit c9663e1

Please sign in to comment.