mirror of
https://github.com/VectorKappa/dotfiles.git
synced 2025-12-19 08:16:10 +01:00
added binfiles from chrysostomus/bspwm-scripts, fixed eaten space
This commit is contained in:
24
bin/finder
Executable file
24
bin/finder
Executable file
@@ -0,0 +1,24 @@
|
||||
#!/bin/sh
|
||||
# A fuzzy file-finder and opener based on dmenu
|
||||
# Requires: dmenu, xdg-utils
|
||||
if ! [ -f "$HOME/.dmenurc" ]; then
|
||||
cp /usr/share/dmenu/dmenurc $HOME/.dmenurc
|
||||
fi
|
||||
. $HOME/.dmenurc
|
||||
|
||||
eval $(xdotool getmouselocation --shell)
|
||||
menu_widht=600
|
||||
monitor_widht=$(wattr w $(lsw -r))
|
||||
monitor_height=$(wattr h $(lsw -r))
|
||||
lines=20
|
||||
menu_height=$(( $lines * 23 ))
|
||||
maxx=$(( $monitor_widht - $menu_widht ))
|
||||
miny=$PANEL_HEIGHT
|
||||
maxy=$(( $monitor_height - $menu_height ))
|
||||
XP=$X
|
||||
[[ $XP -gt $maxx ]] && XP=$maxx
|
||||
YP=$Y
|
||||
[[ $YP -lt $miny ]] && YP=$miny
|
||||
[[ $YP -gt $maxy ]] && YP=$maxy
|
||||
|
||||
find ~/ | sed 's/ /\\ /g' | sort -f | dmenu -i -l $lines -y $YP -x $XP -w $menu_widht -fn $DMENU_FN -nb $DMENU_NB -nf $DMENU_NF -sf $DMENU_SF -sb $DMENU_SB | xargs xdg-open
|
||||
Reference in New Issue
Block a user