tweaks and file finder

This commit is contained in:
Never Gude 2026-06-06 17:54:33 +02:00
parent 064fbdb49d
commit 2c090d0db6
2 changed files with 19 additions and 28 deletions

View file

@ -2,8 +2,7 @@
"layer": "top", "layer": "top",
"modules-left": ["niri/workspaces"], "modules-left": ["niri/workspaces"],
"modules-center": ["clock"], "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": { "idle_inhibitor": {
"format": "{icon}", "format": "{icon}",
@ -26,7 +25,7 @@
"tooltip-format": "{device_enumerate}", "tooltip-format": "{device_enumerate}",
"tooltip-format-enumerate-connected": "{device_alias}", "tooltip-format-enumerate-connected": "{device_alias}",
"tooltip-format-enumerate-connected-battery": "{device_alias} ({device_battery_percentage}%)", "tooltip-format-enumerate-connected-battery": "{device_alias} ({device_battery_percentage}%)",
"on-click": "bluetoothmenu.fish" "on-click-right": "bluetoothmenu.fish"
}, },
"network": { "network": {
@ -40,7 +39,7 @@
"tooltip-format-wifi": "󰖩 {essid} ({signalStrength}%)", "tooltip-format-wifi": "󰖩 {essid} ({signalStrength}%)",
"tooltip-format-ethernet": "󰈁 {ifname}", "tooltip-format-ethernet": "󰈁 {ifname}",
"tooltip-format-disconnected": "Disconnected", "tooltip-format-disconnected": "Disconnected",
"on-click": "networkmenu.fish" "on-click-right": "networkmenu.fish"
}, },
"wireplumber#sink": { "wireplumber#sink": {
@ -48,8 +47,8 @@
"format-muted": "󰖁", "format-muted": "󰖁",
"format-icons": ["󰕿", "󰖀", "󰕾"], "format-icons": ["󰕿", "󰖀", "󰕾"],
"tooltip-format": "{node_name} ({volume}%)", "tooltip-format": "{node_name} ({volume}%)",
"on-click": "wpsinkmenu.fish", "on-click-right": "wpsinkmenu.fish",
"on-click-right": "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle", "on-click": "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle",
"scroll-step": 5 "scroll-step": 5
}, },
@ -58,8 +57,8 @@
"format": "󰍬", "format": "󰍬",
"format-muted": "󰍭", "format-muted": "󰍭",
"tooltip-format": "{node_name} ({volume}%)", "tooltip-format": "{node_name} ({volume}%)",
"on-click": "wpsourcemenu.fish", "on-click-right": "wpsourcemenu.fish",
"on-click-right": "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle", "on-click": "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle",
"scroll-step": 5 "scroll-step": 5
}, },

View file

@ -16,23 +16,15 @@ function open_semester
end end
end end
# Open user directories # Find files in home directory
function open_location function find_file
set options "󰈙 Documents" "󰝚 Music" "󰋩 Pictures" "󰕧 Videos" "󰇚 Downloads" set file (find ~/Desktop ~/Documents ~/Downloads ~/Pictures ~/Videos -type f | fuzzel --dmenu --width 100 --match-mode=fuzzy)
set input (menu $options)
switch $input if test (xdg-mime query filetype $file) = "application/pdf" && test (menu "PDF" "Ipe") = "Ipe"
case $options[1] ipe $file
alacritty msg create-window --working-directory (xdg-user-dir)/Documents/ else
case $options[2] xdg-open $file
alacritty msg create-window --working-directory (xdg-user-dir)/Music/ end
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
end end
# Open WueCampus Courses # Open WueCampus Courses
@ -154,7 +146,7 @@ function mirror_screen
end end
# Select sub menu # 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) set input (menu $options)
switch $input switch $input
@ -165,7 +157,7 @@ switch $input
open_course open_course
case $options[3] case $options[3]
open_location find_file
case $options[4] case $options[4]
wpsourcemenu.fish wpsourcemenu.fish