1
0
Fork 0

Compare commits

..

13 Commits

Author SHA1 Message Date
urosm f3f083709b update scripts
add menu for duckduckgo.com lucky search `fuzzel_duckduckgo_lucky.sh`
rewrite `fuzzel_find_and_open.sh`
remove `fuzzel_open_file.sh`
2023-08-22 23:43:16 +02:00
urosm 28bc64c50d add README 2023-08-22 23:43:16 +02:00
urosm 3539ee24a5 add `pandoc` data 2023-08-22 23:43:16 +02:00
urosm 18498f4c7b add scripts 2023-08-22 23:43:16 +02:00
urosm 20a24daf99 add `python` config 2023-08-22 23:43:16 +02:00
urosm 72427ec684 add `user-dirs.dirs` 2023-08-22 23:43:16 +02:00
urosm fcfbc69e97 add `mimeapps.list` 2023-08-22 23:43:16 +02:00
urosm 11220e33ce add `mpv` config 2023-08-22 23:43:16 +02:00
urosm 58895abe4d add `zathura` config 2023-08-22 23:43:16 +02:00
urosm 2673a9188e add `fontconfig` config 2023-08-22 23:43:16 +02:00
urosm 8197b64794 add `mako` config 2023-08-22 23:43:16 +02:00
urosm 2f906005e5 add `fuzzel` config 2023-08-22 23:43:16 +02:00
urosm a9225eef8b add `foot` config 2023-08-22 23:43:13 +02:00
6 changed files with 32 additions and 38 deletions

View File

@ -17,3 +17,8 @@ bright4=b8c3ff
bright5=ffb1c5
bright6=92ccff
bright7=f4f3f3
[search-bindings]
find-prev=Control+Shift+n
find-next=Control+n

View File

@ -16,8 +16,8 @@ set $email thunderbird
# menus
set $drun fuzzel
set $mountmenu fuzzel_mount.sh
set $findmenu fuzzel_find_file.sh
set $openmenu fuzzel_open_file.sh
set $findmenu fuzzel_find_and_open.sh
set $websearchmenu fuzzel_duckduckgo_lucky.sh
set $wifimenu $term_float nmtui
# colors
@ -54,8 +54,8 @@ bindsym $mod+shift+w exec $email
bindsym $mod+space exec $drun
bindsym $mod+home exec $wifimenu
bindsym $mod+insert exec $mountmenu
bindsym $mod+e exec $openmenu
bindsym $mod+shift+e exec $findmenu
bindsym $mod+e exec $findmenu
bindsym $mod+shift+e exec $websearchmenu
# notifications
bindsym $mod+slash exec notify-send -e -h string:x-canonical-private-synchronous:status "$(date)" "Battery: $(cat /sys/class/power_supply/BAT0/capacity)%"

View File

@ -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"

View File

@ -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

View File

@ -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

View File

@ -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