bin/bin/wm_menu #!/bin/sh ln=32 sb="#87875F" sf="#222222" nf="#c0c0c0" fn="-misc-hack-nerd-font-mono-medium-i-normal--0-0-0-0-p-0-iso10646-1" fn="hax" _RICE="-dim 0.75 -l $ln -sb $sb -sf $sf -nf $nf -sb $sb -c -fn $fn" wat(){ notify-send '❓ what ❓' } if [ -n "" ]; then exe= else exe=`echo -e "app\nwww\nvid\nimg\nnet\ndisplay\nclip\npass\ncam\npdf\nscrot\nemoji\nburp\npablo\ninvert\nquit" | dmenu $_RICE -p '▎▍▌▋▊'` fi [ -n "$exe" ] || exit case $exe in app) dmenu_run $_RICE -p 'run' ;; www) chromium --allow-file-access-from-files --allow-file-access --allow-cross-origin-auth-prompt ;; vid*) urxvt -e bash -c "`printf "%s'" ${exe} | sed "s!vid!mpv !"`" ;; img*) curl -o /tmp/img -s `echo ${exe} | sed "s!img !!"` && sxiv -a /tmp/img && rm /tmp/img ;; pdf*) curl -o /tmp/pdf -s `echo ${exe} | sed "s!pdf !!"` && zathura /tmp/pdf && rm /tmp/pdf ;; clip) clipmenu $_RICE -p 'clipboard' ;; pass) passmenu $_RICE -p 'pass' ;; net) networkmanager_dmenu $_RICE -p 'innernetz' ;; display) display=`echo -e "alone\nlab\nwork" | dmenu $_RICE -p 'where am i?'` case $display in alone) ~/.screenlayout/solo2.sh ;; lab) ~/.screenlayout/lab.sh ;; work) ~/.screenlayout/multi.sh.old ;; *) wat ;; esac ~/bin/display ;; cam) ~/bin/cam ;; scrot) scrot=`echo -e "fullscreen\narea\nvid" | dmenu $_RICE -p 'scrot'` case $scrot in fullscreen) scrot -d 2 ~/lib/img/$(date "+%Y-%m-%d_%H-%M-%S")_scrot.png ;; area) import -window root -crop `slop -f "%g"` ~/lib/img/$(date "+%Y-%m-%d_%H-%M-%S")_slop_scrot.png ;; *) wat ;; esac ;; emoji) ~/bin/emoji ;; burp) ~/src/burp/burppro ;; pablo) # fix function/media keys echo 2 | sudo tee /sys/module/hid_apple/parameters/fnmode # launch pablodraw TERM=xterm mono /usr/share/pablodraw/PabloDraw.exe ;; invert) xcalib -i -a ;; quit) poweroff ;; *) wat ;; esac