diff --git a/.config/waybar/config.jsonc b/.config/waybar/config.jsonc index d3192ad..2c61426 100644 --- a/.config/waybar/config.jsonc +++ b/.config/waybar/config.jsonc @@ -2,9 +2,8 @@ "layer": "top", "modules-left": ["niri/workspaces"], "modules-center": ["clock"], - "modules-right": ["idle_inhibitor", "bluetooth", "network", "wireplumber#source", "wireplumber#sink", "battery"], - - + "modules-right": ["bluetooth", "network", "wireplumber#source", "wireplumber#sink","idle_inhibitor", "battery"], + "idle_inhibitor": { "format": "{icon}", "format-icons": { @@ -26,7 +25,7 @@ "tooltip-format": "{device_enumerate}", "tooltip-format-enumerate-connected": "{device_alias}", "tooltip-format-enumerate-connected-battery": "{device_alias} ({device_battery_percentage}%)", - "on-click": "bluetoothmenu.fish" + "on-click-right": "bluetoothmenu.fish" }, "network": { @@ -40,7 +39,7 @@ "tooltip-format-wifi": "󰖩 {essid} ({signalStrength}%)", "tooltip-format-ethernet": "󰈁 {ifname}", "tooltip-format-disconnected": "Disconnected", - "on-click": "networkmenu.fish" + "on-click-right": "networkmenu.fish" }, "wireplumber#sink": { @@ -48,8 +47,8 @@ "format-muted": "󰖁", "format-icons": ["󰕿", "󰖀", "󰕾"], "tooltip-format": "{node_name} ({volume}%)", - "on-click": "wpsinkmenu.fish", - "on-click-right": "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle", + "on-click-right": "wpsinkmenu.fish", + "on-click": "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle", "scroll-step": 5 }, @@ -58,8 +57,8 @@ "format": "󰍬", "format-muted": "󰍭", "tooltip-format": "{node_name} ({volume}%)", - "on-click": "wpsourcemenu.fish", - "on-click-right": "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle", + "on-click-right": "wpsourcemenu.fish", + "on-click": "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle", "scroll-step": 5 }, diff --git a/.local/scripts/actionmenu.fish b/.local/scripts/actionmenu.fish index 7de0065..1aa583a 100755 --- a/.local/scripts/actionmenu.fish +++ b/.local/scripts/actionmenu.fish @@ -16,23 +16,15 @@ function open_semester end end -# Open user directories -function open_location - set options "󰈙 Documents" "󰝚 Music" "󰋩 Pictures" "󰕧 Videos" "󰇚 Downloads" - set input (menu $options) - - switch $input - case $options[1] - alacritty msg create-window --working-directory (xdg-user-dir)/Documents/ - case $options[2] - alacritty msg create-window --working-directory (xdg-user-dir)/Music/ - case $options[3] - alacritty msg create-window --working-directory (xdg-user-dir)/Pictures/ - case $options[4] - alacritty msg create-window --working-directory (xdg-user-dir)/Videos/ - case $options[5] - alacritty msg create-window --working-directory (xdg-user-dir)/Downloads/ - end +# Find files in home directory +function find_file + set file (find ~/Desktop ~/Documents ~/Downloads ~/Pictures ~/Videos -type f | fuzzel --dmenu --width 100 --match-mode=fuzzy) + + if test (xdg-mime query filetype $file) = "application/pdf" && test (menu "PDF" "Ipe") = "Ipe" + ipe $file + else + xdg-open $file + end end # Open WueCampus Courses @@ -154,7 +146,7 @@ function mirror_screen end # Select sub menu -set options "󰑴 Open Semester" "󰑴 Open WueCampus Course" "󱂵 Open Location" "󰍬 Select Audio Source" "󰕾 Select Audio Sink" "󰂯 Select Bluetooth" "󰛳 Select Network" "󰔎 Select Color Scheme" "󰂚 Restore Notifications" "󰌌 Set Keyboard Backlight" "󰍺 Mirror Screen" +set options "󰑴 Open Semester" "󰑴 Open WueCampus Course" "󰈞 Find Files" "󰍬 Select Audio Source" "󰕾 Select Audio Sink" "󰂯 Select Bluetooth" "󰛳 Select Network" "󰔎 Select Color Scheme" "󰂚 Restore Notifications" "󰌌 Set Keyboard Backlight" "󰍺 Mirror Screen" set input (menu $options) switch $input @@ -165,7 +157,7 @@ switch $input open_course case $options[3] - open_location + find_file case $options[4] wpsourcemenu.fish