Skip to content

Commit

Permalink
Implemented dmenu_all
Browse files Browse the repository at this point in the history
  • Loading branch information
aario committed Feb 26, 2017
1 parent 59f2a62 commit 16ff6f9
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ dist: clean
@echo creating dist tarball
@mkdir -p dmenu-${VERSION}
@cp LICENSE Makefile README arg.h config.def.h config.mk dmenu.1 \
drw.h util.h dmenu_path dmenu_run dmenu_win dmenu_vol dmenu_bl dmenu_media dmenu_custom dmenu_home dmenu_apps stest.1 ${SRC} \
drw.h util.h dmenu_path dmenu_run dmenu_win dmenu_vol dmenu_bl dmenu_media dmenu_custom dmenu_home dmenu_apps dmenu_all stest.1 ${SRC} \
dmenu-${VERSION}
@tar -cf dmenu-${VERSION}.tar dmenu-${VERSION}
@gzip dmenu-${VERSION}.tar
Expand All @@ -49,7 +49,7 @@ dist: clean
install: all
@echo installing executables to ${DESTDIR}${PREFIX}/bin
@mkdir -p ${DESTDIR}${PREFIX}/bin
@cp -f dmenu dmenu_path dmenu_run dmenu_win dmenu_vol dmenu_bl dmenu_media dmenu_custom dmenu_home dmenu_apps stest ${DESTDIR}${PREFIX}/bin
@cp -f dmenu dmenu_path dmenu_run dmenu_win dmenu_vol dmenu_bl dmenu_media dmenu_custom dmenu_home dmenu_apps dmenu_all stest ${DESTDIR}${PREFIX}/bin
@chmod 755 ${DESTDIR}${PREFIX}/bin/dmenu
@chmod 755 ${DESTDIR}${PREFIX}/bin/dmenu_path
@chmod 755 ${DESTDIR}${PREFIX}/bin/dmenu_run
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Added Features
* dmenu_custom Displays of a list of custom scripts located in $HOME/.dwm/custom_scripts
* dmenu_home Browses through home folder and opens files
* dmenu_apps Browses through applications menu and launches apps
* dmenu_all Shows a menu with shortcuts to all above items
* lines Default value of lines in config.def.h is now set to 10. Originally it was 0.
* Works best with my fork of dwm

Expand Down
10 changes: 10 additions & 0 deletions dmenu_all
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash
ITEMS=('BIN (Meta+P)' 'Applications (Meta+Escape)' 'Custom Scripts (Meta+C)' 'Switch Window List (Meta+W)' 'Adjust Volume (Meta+V' 'Adjust Brightness (Meta+B)' 'Control Media Player (Meta+N)' 'Browse Home Folder (Meta+H)')
COMMANDS=('dmenu_run' 'dmenu_apps' 'dmenu_custom' 'dmenu_win' 'dmenu_vol' 'dmenu_bl' 'dmenu_media' 'dmenu_home')
count=${#ITEMS[@]}
let "top=$count-1"
indexes=`seq 0 $top`
command_index=`for i in $indexes; do echo ${ITEMS[i]}; done | dmenu -n $@`
if [ "x$command_index" != "x" ]; then
bash ${COMMANDS[command_index]} $@
fi

0 comments on commit 16ff6f9

Please sign in to comment.