Restructing the entire dotfile repo!

This commit is contained in:
Derek Taylor
2019-01-15 15:27:01 -06:00
parent 57f834c56f
commit 2ff59758f1
131 changed files with 16150 additions and 0 deletions

12
.jwm/menus/recent-files.sh Executable file
View File

@@ -0,0 +1,12 @@
#!/bin/sh
XBEL_PATH=/home/dt/.local/share/recently-used.xbel
MAX_ITEMS=20
if [[ -e $XBEL_PATH ]];then
ITEMS=$(sed -rn 's_.*file://([^"]*).*_<Program label="\1">rox -s "\1"</Program>_ p' "$XBEL_PATH")
else
ITEMS="<Program label=\"File ${XBEL_PATH##*/} not found!\"></Program>"
fi
echo "<JWM>"
echo -e "${ITEMS//%/\\x}" | tail -n $MAX_ITEMS
echo "</JWM>"

25
.jwm/menus/shutdown.sh Executable file
View File

@@ -0,0 +1,25 @@
#!/bin/sh
DIALOG=Xdialog
$DIALOG --allow-close\
--stdout\
--title 'Exit'\
--menu 'Choose action..'\
15 50 10 \
'Shutdown' "" \
'Reboot' "" \
'Suspend to RAM' "" \
'Suspend to Disk' "" \
1> /tmp/exitval.$$ 2> /dev/null
ACTION=`cat /tmp/exitval.$$`
rm -f /tmp/exitval.$$
case $ACTION in
'Shutdown') sudo halt ;;
'Reboot') sudo reboot ;;
'Suspend to RAM') sudo s2ram ;;
'Suspend to Disk') sudo s2disk ;;
*) exit ;;
esac