update scripts
rewrite `fuzzel_find_and_open.sh` remove `fuzzel_open_file.sh`
parent
2fb8f17e80
commit
c082d41f0a
|
@ -16,8 +16,7 @@ set $email thunderbird
|
||||||
# menus
|
# menus
|
||||||
set $drun fuzzel
|
set $drun fuzzel
|
||||||
set $mountmenu fuzzel_mount.sh
|
set $mountmenu fuzzel_mount.sh
|
||||||
set $findmenu fuzzel_find_file.sh
|
set $findmenu fuzzel_find_and_open.sh
|
||||||
set $openmenu fuzzel_open_file.sh
|
|
||||||
set $wifimenu $term_float nmtui
|
set $wifimenu $term_float nmtui
|
||||||
|
|
||||||
# colors
|
# colors
|
||||||
|
@ -54,8 +53,7 @@ bindsym $mod+shift+w exec $email
|
||||||
bindsym $mod+space exec $drun
|
bindsym $mod+space exec $drun
|
||||||
bindsym $mod+home exec $wifimenu
|
bindsym $mod+home exec $wifimenu
|
||||||
bindsym $mod+insert exec $mountmenu
|
bindsym $mod+insert exec $mountmenu
|
||||||
bindsym $mod+e exec $openmenu
|
bindsym $mod+e exec $findmenu
|
||||||
bindsym $mod+shift+e exec $findmenu
|
|
||||||
|
|
||||||
# notifications
|
# notifications
|
||||||
bindsym $mod+slash exec notify-send -e -h string:x-canonical-private-synchronous:status "$(date)" "Battery: $(cat /sys/class/power_supply/BAT0/capacity)%"
|
bindsym $mod+slash exec notify-send -e -h string:x-canonical-private-synchronous:status "$(date)" "Battery: $(cat /sys/class/power_supply/BAT0/capacity)%"
|
||||||
|
@ -149,7 +147,7 @@ for_window [window_type="notification"] floating enable
|
||||||
# rules
|
# rules
|
||||||
for_window [title="About Mozilla Firefox"] floating enable
|
for_window [title="About Mozilla Firefox"] floating enable
|
||||||
for_window [app_id="foot_float"] floating enable
|
for_window [app_id="foot_float"] floating enable
|
||||||
for_window [app_id="foot"] inhibit_idle
|
for_window [app_id="foot"] inhibit_idle focus
|
||||||
|
|
||||||
# laptop
|
# laptop
|
||||||
bindsym XF86AudioRaiseVolume exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 1%+;\
|
bindsym XF86AudioRaiseVolume exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 1%+;\
|
||||||
|
@ -160,14 +158,14 @@ bindsym XF86AudioMute exec wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle;\
|
||||||
exec notify-send -e -t 1000 -h string:x-canonical-private-synchronous:audio_sink "$(wpctl get-volume @DEFAULT_AUDIO_SINK@)"
|
exec notify-send -e -t 1000 -h string:x-canonical-private-synchronous:audio_sink "$(wpctl get-volume @DEFAULT_AUDIO_SINK@)"
|
||||||
bindsym XF86AudioMicMute exec wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle;\
|
bindsym XF86AudioMicMute exec wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle;\
|
||||||
exec notify-send -e -t 1000 -h string:x-canonical-private-synchronous:audio_source "$(wpctl get-volume @DEFAULT_AUDIO_SOURCE@)"
|
exec notify-send -e -t 1000 -h string:x-canonical-private-synchronous:audio_source "$(wpctl get-volume @DEFAULT_AUDIO_SOURCE@)"
|
||||||
bindsym XF86MonBrightnessUp exec light -A 1;\
|
bindsym XF86MonBrightnessUp exec brightnessctl set "+1%";\
|
||||||
exec notify-send -e -t 1000 -h string:x-canonical-private-synchronous:brightness "Brightness: $(light)"
|
exec notify-send -e -t 1000 -h string:x-canonical-private-synchronous:brightness "Brightness: $(brightnessctl get)"
|
||||||
bindsym XF86MonBrightnessDown exec light -U 1;\
|
bindsym XF86MonBrightnessDown exec brightnessctl set "1%-";\
|
||||||
exec notify-send -e -t 1000 -h string:x-canonical-private-synchronous:brightness "Brightness: $(light)"
|
exec notify-send -e -t 1000 -h string:x-canonical-private-synchronous:brightness "Brightness: $(brightnessctl get)"
|
||||||
bindsym shift+XF86MonBrightnessUp exec light -A 10;\
|
bindsym shift+XF86MonBrightnessUp exec brightnessctl set "+10%";\
|
||||||
exec notify-send -e -t 1000 -h string:x-canonical-private-synchronous:brightness "Brightness: $(light)"
|
exec notify-send -e -t 1000 -h string:x-canonical-private-synchronous:brightness "Brightness: $(brightnessctl get)"
|
||||||
bindsym shift+XF86MonBrightnessDown exec light -U 10;\
|
bindsym shift+XF86MonBrightnessDown exec brightnessctl set "10%-";\
|
||||||
exec notify-send -e -t 1000 -h string:x-canonical-private-synchronous:brightness "Brightness: $(light)"
|
exec notify-send -e -t 1000 -h string:x-canonical-private-synchronous:brightness "Brightness: $(brightnessctl get)"
|
||||||
|
|
||||||
# screenshots
|
# screenshots
|
||||||
bindsym print exec grimshot save screen
|
bindsym print exec grimshot save screen
|
||||||
|
@ -210,9 +208,7 @@ client.unfocused $dimmed $dimmed $bg $bg $dimmed
|
||||||
client.urgent $error $error $bg $error $error
|
client.urgent $error $error $bg $error $error
|
||||||
|
|
||||||
# statusbar
|
# statusbar
|
||||||
bar {
|
bar colors {
|
||||||
# binding_mode_indicator no
|
|
||||||
colors {
|
|
||||||
background $bg
|
background $bg
|
||||||
statusline $dimmed
|
statusline $dimmed
|
||||||
separator $dimmed
|
separator $dimmed
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
#!/usr/bin/sh
|
||||||
|
#
|
||||||
|
# fuzzel_duckduckgo_lucky.sh
|
||||||
|
#
|
||||||
|
# Search on duckduckgo.com and open first result.
|
||||||
|
|
||||||
|
search=$(/usr/bin/fuzzel --dmenu --prompt "duckduckgo.com: ") || exit
|
||||||
|
url="https://duckduckgo.com/?q=!+$(printf %s "$search" | tr " " "+")"
|
||||||
|
|
||||||
|
exec xdg-open "$url" &
|
|
@ -0,0 +1,13 @@
|
||||||
|
#!/usr/bin/sh
|
||||||
|
#
|
||||||
|
# fuzzel_find_and_open.sh
|
||||||
|
#
|
||||||
|
# Search for file and open it. Requires fuzzel, find and xdg-open.
|
||||||
|
|
||||||
|
args=$(/usr/bin/fuzzel --dmenu --prompt "$ find ") || exit
|
||||||
|
# shellcheck disable=SC2086
|
||||||
|
selection=$(find $args | /usr/bin/fuzzel --dmenu --prompt "$ xdg-open ")
|
||||||
|
|
||||||
|
if [ -n "$selection" ]; then
|
||||||
|
exec /usr/bin/xdg-open "$selection"
|
||||||
|
fi
|
|
@ -1,12 +0,0 @@
|
||||||
#!/usr/bin/sh
|
|
||||||
#
|
|
||||||
# fuzzel_find_file.sh
|
|
||||||
#
|
|
||||||
# Search for file and open it. Requires fuzzel and find.
|
|
||||||
|
|
||||||
pattern=$(fuzzel --dmenu --prompt "$ find . -type f ") || exit
|
|
||||||
selection=$(find . -type f -iname "$pattern" | fuzzel --dmenu --prompt "$ open ")
|
|
||||||
|
|
||||||
if [ -n "$selection" ]; then
|
|
||||||
exec open "$selection"
|
|
||||||
fi
|
|
|
@ -1,22 +0,0 @@
|
||||||
#!/usr/bin/sh
|
|
||||||
#
|
|
||||||
# fuzzel_open_file.sh DIR
|
|
||||||
#
|
|
||||||
# Open file or terminal in current directory. Requires fuzzel and
|
|
||||||
# xdg-open.
|
|
||||||
|
|
||||||
DIR=${1:-$HOME}
|
|
||||||
cd "$DIR" || exit 1
|
|
||||||
DIR="$(pwd)"
|
|
||||||
|
|
||||||
selection=$(ls --group-directories-first -a1v | fuzzel --dmenu --prompt "$ open $DIR/")
|
|
||||||
|
|
||||||
if [ -n "$selection" ]; then
|
|
||||||
if [ "$selection" = "." ]; then
|
|
||||||
exec $TERMINAL -D "$DIR"
|
|
||||||
elif [ -d "$DIR/$selection" ]; then
|
|
||||||
exec $0 "$DIR/$selection"
|
|
||||||
elif [ -f "$DIR/$selection" ]; then
|
|
||||||
exec open "$DIR/$selection"
|
|
||||||
fi
|
|
||||||
fi
|
|
Loading…
Reference in New Issue