From 11fd77fe634471834e2ed54119ac71b7b5250724 Mon Sep 17 00:00:00 2001 From: Tom van der Lee Date: Tue, 8 Sep 2015 19:24:40 +0200 Subject: Added dmenu_app as default app launcher --- herbstluftwm/.config/herbstluftwm/autostart | 1 - herbstluftwm/.config/herbstluftwm/dmenu_theme.sh | 10 ++++++++++ herbstluftwm/.config/herbstluftwm/hlwm-keybindings | 4 +++- 3 files changed, 13 insertions(+), 2 deletions(-) create mode 100755 herbstluftwm/.config/herbstluftwm/dmenu_theme.sh (limited to 'herbstluftwm') diff --git a/herbstluftwm/.config/herbstluftwm/autostart b/herbstluftwm/.config/herbstluftwm/autostart index 6d39725..aa7c430 100755 --- a/herbstluftwm/.config/herbstluftwm/autostart +++ b/herbstluftwm/.config/herbstluftwm/autostart @@ -16,7 +16,6 @@ dmenu_screen=0 dmenu_width=400 dmenu_height=30 dmenu_lines=9 -dmenu_title="Run:" geometry=($(hc monitor_rect $dmenu_screen)) diff --git a/herbstluftwm/.config/herbstluftwm/dmenu_theme.sh b/herbstluftwm/.config/herbstluftwm/dmenu_theme.sh new file mode 100755 index 0000000..6b825ce --- /dev/null +++ b/herbstluftwm/.config/herbstluftwm/dmenu_theme.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +theme_dir="$HLWM_CONF_DIR/themes" +themes=$(ls "$theme_dir" | grep -vE "current|template") +theme=$(echo "$themes" | dmenu "$@") + +if [ -n "$theme" ] && [ -f "$theme_dir/$theme" ]; then + ln -sf "$theme" "$theme_dir/current" && herbstclient reload +fi + diff --git a/herbstluftwm/.config/herbstluftwm/hlwm-keybindings b/herbstluftwm/.config/herbstluftwm/hlwm-keybindings index 2843a89..1711760 100644 --- a/herbstluftwm/.config/herbstluftwm/hlwm-keybindings +++ b/herbstluftwm/.config/herbstluftwm/hlwm-keybindings @@ -10,7 +10,9 @@ hc keybind $Mod-Shift-q quit hc keybind $Mod-Shift-r chain , spawn echo "!! HLWM reload config !!" , reload hc keybind $Mod-Shift-c close hc keybind $Mod-Return spawn xterm -hc keybind $Mod-grave spawn dmenu_run -h $dmenu_height -w $dmenu_width -x $dmenu_x -y $dmenu_y -p $dmenu_title -s $dmenu_screen -l $dmenu_lines -fn "$HLWM_PANEL_FONT" -nb $HLWM_BG_COLOR -nf $HLWM_FG_COLOR -sb $HLWM_ACCENT_COLOR -sf $HLWM_BG_COLOR +hc keybind $Mod-grave spawn dmenu_app -i -h $dmenu_height -w $dmenu_width -x $dmenu_x -y $dmenu_y -p "Launch:" -s $dmenu_screen -l $dmenu_lines -fn "$HLWM_PANEL_FONT" -nb $HLWM_BG_COLOR -nf $HLWM_FG_COLOR -sb $HLWM_ACCENT_COLOR -sf $HLWM_BG_COLOR +hc keybind $Mod-e spawn dmenu_run -i -h $dmenu_height -w $dmenu_width -x $dmenu_x -y $dmenu_y -p "Execute:" -s $dmenu_screen -l $dmenu_lines -fn "$HLWM_PANEL_FONT" -nb $HLWM_BG_COLOR -nf $HLWM_FG_COLOR -sb $HLWM_ACCENT_COLOR -sf $HLWM_BG_COLOR +hc keybind $Mod-t spawn env HLWM_CONF_DIR=$HLWM_CONF_DIR $HLWM_CONF_DIR/dmenu_theme.sh -i -h $dmenu_height -w $dmenu_width -x $dmenu_x -y $dmenu_y -p "Theme:" -s $dmenu_screen -l $dmenu_lines -fn "$HLWM_PANEL_FONT" -nb $HLWM_BG_COLOR -nf $HLWM_FG_COLOR -sb $HLWM_ACCENT_COLOR -sf $HLWM_BG_COLOR hc keybind XF86AudioLowerVolume spawn amixer set Master 1%- hc keybind XF86AudioRaiseVolume spawn amixer set Master 1%+ -- cgit v1.2.3