1
1
Fork 0

menu: switch to menu.sh wrapper

Signed-off-by: Myned <dev@bjork.tech>
This commit is contained in:
Myned 2024-09-14 16:06:18 -05:00
parent 0668af07f4
commit b3111c1ecd
Signed by: myned
GPG key ID: C7224454F7881A34
3 changed files with 60 additions and 5 deletions

View file

@ -17,6 +17,7 @@ with lib; let
kill = "${pkgs.procps}/bin/kill"; kill = "${pkgs.procps}/bin/kill";
kitty = "${config.home-manager.users.${config.custom.username}.programs.kitty.package}/bin/kitty"; kitty = "${config.home-manager.users.${config.custom.username}.programs.kitty.package}/bin/kitty";
loginctl = "${pkgs.systemd}/bin/loginctl"; loginctl = "${pkgs.systemd}/bin/loginctl";
menu = "~/.local/bin/menu";
nautilus = "${pkgs.nautilus}/bin/nautilus"; nautilus = "${pkgs.nautilus}/bin/nautilus";
networkmanager_dmenu = "${pkgs.networkmanager_dmenu}/bin/networkmanager_dmenu"; networkmanager_dmenu = "${pkgs.networkmanager_dmenu}/bin/networkmanager_dmenu";
notify-send = "${pkgs.libnotify}/bin/notify-send"; notify-send = "${pkgs.libnotify}/bin/notify-send";
@ -98,11 +99,11 @@ in {
(key "Control_L" "Super+Ctrl+Alt+Shift" "layoutmsg" "removemaster") (key "Control_L" "Super+Ctrl+Alt+Shift" "layoutmsg" "removemaster")
(key "Control_L" "Super+Ctrl+Shift" "layoutmsg" "addmaster") (key "Control_L" "Super+Ctrl+Shift" "layoutmsg" "addmaster")
(key "Shift_L" "Super+Shift" "workspace" "previous") (key "Shift_L" "Super+Shift" "workspace" "previous")
(key "Super_L" "Super" "exec" "${pkill} wofi || ${wofi} --show drun") (key "Super_L" "Super" "exec" "${menu}")
(key "Super_L" "Super+Alt" "exec" "${pkill} wofi || ${rofi-rbw}") (key "Super_L" "Super+Alt" "exec" "${menu} --passwords")
(key "Super_L" "Super+Ctrl" "exec" "${pkill} wofi || calc") (key "Super_L" "Super+Ctrl" "exec" "${menu} --calculator")
(key "Super_L" "Super+Ctrl+Shift" "exec" "${pkill} wofi || ${networkmanager_dmenu}") (key "Super_L" "Super+Ctrl+Shift" "exec" "${menu} --networks")
(key "Super_L" "Super+Shift" "exec" "${pkill} wofi || ${wofi} --show run") (key "Super_L" "Super+Shift" "exec" "${menu} --runner")
]; ];
# Regular binds # Regular binds

View file

@ -97,6 +97,11 @@ in {
jq jq
libnotify libnotify
]) ])
(bash "menu" [
networkmanager_dmenu
rofi-rbw
walker
])
(bash "minimize" [ (bash "minimize" [
hyprland hyprland
jq jq

View file

@ -0,0 +1,49 @@
#! /usr/bin/env bash
# Menu wrapper
#?? menu
command=walker
while (("$#" > 0)); do
case "$1" in
-a | --applications)
command="walker --modules applications"
;;
-c | --calculator)
command="walker --modules calc"
;;
-f | --files)
command="walker --modules finder"
;;
-i | --input)
command="walker --dmenu"
;;
-n | --networks)
command="networkmanager_dmenu"
;;
-p | --passwords)
command="rofi-rbw"
;;
-r | --runner)
command="walker --modules runner"
;;
-s | --ssh)
command="walker --modules ssh"
;;
-u | --unicode)
command="walker --modules emojis"
;;
-w | --web)
command="walker --modules websearch"
;;
--)
shift
command+=" $*"
break
;;
esac
shift
done
$command