~chambln/dots

719900a874f17ef8f0590c5c37c948659f789e19 — Gregory Chamberlain 12 days ago 8f95eb6
Add config menu bound to Super + Space / Alt + F1
A pkgs/config/.local/share/config/menu.tsv => pkgs/config/.local/share/config/menu.tsv +15 -0
@@ 0,0 1,15 @@
File…
	Manage…	dicemenu
	View…	x=$(pathmenu -aF) && gview "$x"
	Edit…	x=$(pathmenu -aF) && gvi "$x"
Applications…	xdgmenu
Customise…
	This menu	gvi ~/.local/share/config/menu.tsv
	lobal key bindings	gvi ~/.config/sxhkd/sxhkdrc
	Wallpaper	bspc rule -a '*' -o state=floating; sxiv -rt ~/share/wallpapers
	Colours	d=~/.local/src/blue.cosine.dots/colour; x=$(pathmenu -c 'dmenu -i -p Colours' "$d") && { stow -Dt ~ "$d"/*/pkgs/*/; stow -t ~ "$x"/pkgs/*/; cat ~/.Xresources.d/* | xrdb; }
Help…
	Global key bindings	gview ~/.config/sxhkd/sxhkdrc
	Changing wallpaper	gview ~/.local/share/doc/sxiv/README.txt ~/.config/sxiv/exec/*
Audio	bspc rule -a '*' -o state=floating sticky=on; pavucontrol
Power…	~/bin/ctrlaltdelete

A pkgs/config/bin/config => pkgs/config/bin/config +4 -0
@@ 0,0 1,4 @@
#!/bin/sh

treemenu 'amenu "dmenu -i -p \"${line:-Menu}\""' \
  < ~/.local/share/config/menu.tsv | cut -f2 | sh

M pkgs/sxiv/.config/sxiv/exec/key-handler => pkgs/sxiv/.config/sxiv/exec/key-handler +6 -0
@@ 1,5 1,7 @@
#!/bin/sh -eu
# See pkgs/sxiv/.local/share/doc/sxiv for documentation on this.

# Identify the fitting method for xwallpaper.
case $1 in
    c) adjust=center ;;
    m) adjust=maximize ;;


@@ 9,6 11,10 @@ case $1 in
esac

case $1 in
    h|[Ff]1)
        ~/bin/gview ~/.local/share/doc/sxiv/README.txt \
                    ~/.config/sxiv/exec/*
        ;;
    [cmstz])
        read -r line
        mkdir -p ~/.config/wallpaper

A pkgs/sxiv/.local/share/doc/sxiv/README.txt => pkgs/sxiv/.local/share/doc/sxiv/README.txt +13 -0
@@ 0,0 1,13 @@
Custom key bindings in sxiv are described below.

    Ctrl-x h    Show documentation
    Ctrl-x c    Set as wallpaper using the center adjustment method.
    Ctrl-x m    Set as wallpaper using the maximize adjustment method.
    Ctrl-x s    Set as wallpaper using the stretch adjustment method.
    Ctrl-x t    Set as wallpaper using the tile adjustment method.
    Ctrl-x z    Set as wallpaper using the zoom adjustment method.

The EXTERNAL KEY HANDLER section of sxiv(1) explains how custom key
bindings work as well as which image(s) is/are acted upon.

See xwallpaper(1) for information on the wallpaper adjustment methods.

A wm/bspwm/pkgs/config/bin/gvi => wm/bspwm/pkgs/config/bin/gvi +3 -0
@@ 0,0 1,3 @@
#!/bin/sh

~/bin/terminal "${VISUAL:-${EDITOR:-vi}}" "$@"

A wm/bspwm/pkgs/config/bin/gview => wm/bspwm/pkgs/config/bin/gview +3 -0
@@ 0,0 1,3 @@
#!/bin/sh

~/bin/terminal "${PAGER:-less}" "$@"

A wm/bspwm/pkgs/config/bin/terminal => wm/bspwm/pkgs/config/bin/terminal +3 -0
@@ 0,0 1,3 @@
#!/bin/sh

"${TERMINAL:-xterm}" -e "$@"

M wm/bspwm/pkgs/wm/.config/sxhkd/sxhkdrc => wm/bspwm/pkgs/wm/.config/sxhkd/sxhkdrc +8 -15
@@ 1,17 1,6 @@
super + Escape
    pkill -USR1 -x sxhkd

super + F1
    bspc rule -a XTerm -o state=floating sticky=on ;\
    xterm -e less ~/.config/sxhkd/sxhkdrc ~/.config/bspwm/bspwmrc

super + F2
    bspc rule -a \* -o state=floating sticky=on ;\
    pavucontrol

super + F5
    ~/bin/gtk-toggle-theme

XF86AudioMute
    pactl set-sink-mute @DEFAULT_SINK@ toggle



@@ 30,11 19,15 @@ super + w
super + slash
    ~/bin/dicemenu

alt + F{2,3,4}
    {dmenu_run,xdgmenu,bspc node -c}
alt + F{1,2,3,4,5}
    {~/bin/config,dmenu_run,xdgmenu,bspc node -c,~/bin/gtk-toggle-theme}

alt + F6
    bspc rule -a \* -o state=floating sticky=on ;\
    pavucontrol

super + {_,shift + }p
    {dmenu_run,xdgmenu}
super + {F1,space}
    ~/bin/config {_,_}

super + shift + c
    bspc node -c