dotfiles

custom linux config files managed with gnu stow

dotfiles

bin/bin/wm_menu


#!/bin/sh
ln=32
sb="#5E81AC"
sf="#222222"
nf="#c0c0c0"
nb="#3B4252"
fn="-misc-hack-nerd-font-mono-medium-i-normal--0-0-0-0-p-0-iso10646-1"
_RICE="-dim 0.75 -l $ln -sb $sb -sf $sf -nf $nf -sb $sb -c -fn $fn"

if [ ! -z "" ]; then
	exe=
else
	exe=`echo -e "app\nwww\nvid\nimg\nnet\nclip\npass\ncam\npdf\nscrot\nburp\npablo\ninvert\nquit" | dmenu $_RICE -p 'run'`
fi
[ ! -z "$exe" ] || exit

case $exe in
	app)
		dmenu_run $_RICE -p 'run'
	;;
	www)
		chromium
	;;
	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'
	;;
	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
			;;
		esac
	;;
	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
	;;
	*)
		notify-send '❓ what ❓'
	;;
esac

Download

raw zip tar