diff options
Diffstat (limited to '')
| -rw-r--r-- | Makefile | 2 | ||||
| -rwxr-xr-x | dmenu-websearch | 2 | ||||
| -rwxr-xr-x | mail-compose | 6 | ||||
| -rwxr-xr-x | open-file | 20 | ||||
| -rwxr-xr-x | popup-cal12 | 2 | ||||
| -rwxr-xr-x | popup-cal3 | 2 | ||||
| -rwxr-xr-x | popup-terminal | 2 | ||||
| -rwxr-xr-x | terminal | 5 | ||||
| -rwxr-xr-x | xedit | 8 | ||||
| -rwxr-xr-x | xedit-filter | 5 | ||||
| -rwxr-xr-x | xplumb | 9 |
11 files changed, 37 insertions, 26 deletions
| @@ -27,12 +27,14 @@ SCRIPTS = addressgrep \ | |||
| 27 | sfeed-browser \ | 27 | sfeed-browser \ |
| 28 | spawn \ | 28 | spawn \ |
| 29 | templess \ | 29 | templess \ |
| 30 | terminal \ | ||
| 30 | togglemute \ | 31 | togglemute \ |
| 31 | translate \ | 32 | translate \ |
| 32 | trash \ | 33 | trash \ |
| 33 | urlgrep \ | 34 | urlgrep \ |
| 34 | volume \ | 35 | volume \ |
| 35 | websearch \ | 36 | websearch \ |
| 37 | xedit \ | ||
| 36 | xedit-filter \ | 38 | xedit-filter \ |
| 37 | xkboptions \ | 39 | xkboptions \ |
| 38 | xplumb \ | 40 | xplumb \ |
diff --git a/dmenu-websearch b/dmenu-websearch index 04df2fc..d1af538 100755 --- a/dmenu-websearch +++ b/dmenu-websearch | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | #!/bin/sh | 1 | #!/bin/sh |
| 2 | 2 | ||
| 3 | # Popup $TERMINAL prompting for websearch | 3 | # dmenu prompt for websearch |
| 4 | # Requires: dmenu (or similar), websearch | 4 | # Requires: dmenu (or similar), websearch |
| 5 | 5 | ||
| 6 | menu=${MENU:-dmenu} | 6 | menu=${MENU:-dmenu} |
diff --git a/mail-compose b/mail-compose index 1c293f0..40b4d05 100755 --- a/mail-compose +++ b/mail-compose | |||
| @@ -1,8 +1,6 @@ | |||
| 1 | #!/bin/sh | 1 | #!/bin/sh |
| 2 | 2 | ||
| 3 | # Open a mail composer. | 3 | # Open a mail composer. |
| 4 | # Requires: mblaze | 4 | # Requires: mblaze, terminal |
| 5 | 5 | ||
| 6 | terminal=${TERMINAL:-xterm} | 6 | terminal -e mcom $@ |
| 7 | |||
| 8 | $terminal -e mcom $@ | ||
| @@ -4,19 +4,19 @@ | |||
| 4 | # Launches files based on their mimetypes | 4 | # Launches files based on their mimetypes |
| 5 | # Use option -s devour to swallow or -s " " to open normally from terminal | 5 | # Use option -s devour to swallow or -s " " to open normally from terminal |
| 6 | # Use -t to specify mimetype | 6 | # Use -t to specify mimetype |
| 7 | # Requires: dmenu_path or similar (fallback) | 7 | # Requires: dmenu_path or similar (fallback), dmenu-filepicker |
| 8 | # dmenu-filepicker | ||
| 9 | 8 | ||
| 10 | menu=${MENU:-dmenu} | 9 | menu=${MENU:-dmenu} |
| 11 | 10 | ||
| 12 | video=${VIDEOPLAYER:-mpv} | 11 | # Change default apps here |
| 13 | music=${MUSICPLAYER:-mpv} | 12 | video="mpv" |
| 14 | pdf=${VIEWER:-zathura} | 13 | music="mpv --player-operation-mode=pseudo-gui" |
| 15 | img=${IMAGEVIEWER:-imv} | 14 | pdf="zathura" |
| 16 | word=${TEXTDOCUMENT:-libreoffice} | 15 | img="imv" |
| 17 | sheet=${SPREADSHEET:-libreoffice} | 16 | word="libreoffice" |
| 18 | html=${HTMLVIEWER:-firefox} | 17 | sheet="libreoffice" |
| 19 | xedit=${XEDITOR:-gedit} | 18 | html="firefox --new-window" |
| 19 | xedit="xedit" | ||
| 20 | 20 | ||
| 21 | openfile() { | 21 | openfile() { |
| 22 | f="$@" | 22 | f="$@" |
diff --git a/popup-cal12 b/popup-cal12 index 3469a4c..cbe089a 100755 --- a/popup-cal12 +++ b/popup-cal12 | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | #!/bin/sh | 1 | #!/bin/sh |
| 2 | 2 | ||
| 3 | # Popup $TERMINAL displaying cal -3 | 3 | # Popup terminal displaying cal -3 |
| 4 | # Requires: st (suckless terminal) | 4 | # Requires: st (suckless terminal) |
| 5 | 5 | ||
| 6 | st -T "stfloat" -g 69x36+620+250 -e sh -c 'cal $(date +%Y); read x' | 6 | st -T "stfloat" -g 69x36+620+250 -e sh -c 'cal $(date +%Y); read x' |
| @@ -1,6 +1,6 @@ | |||
| 1 | #!/bin/sh | 1 | #!/bin/sh |
| 2 | 2 | ||
| 3 | # Popup $TERMINAL displaying cal -3 | 3 | # Popup terminal displaying cal -3 |
| 4 | # Requires: st (suckless terminal) | 4 | # Requires: st (suckless terminal) |
| 5 | 5 | ||
| 6 | st -T "stfloat" -g 68x11+620+450 -e sh -c 'cal -3; read x' | 6 | st -T "stfloat" -g 68x11+620+450 -e sh -c 'cal -3; read x' |
diff --git a/popup-terminal b/popup-terminal index 8863eb3..a9a20d1 100755 --- a/popup-terminal +++ b/popup-terminal | |||
| @@ -2,4 +2,4 @@ | |||
| 2 | 2 | ||
| 3 | # TODO maybe I want to run e.g. tmux in this? | 3 | # TODO maybe I want to run e.g. tmux in this? |
| 4 | 4 | ||
| 5 | st -T "stfloat" -g 85x25+550+300 $@ | 5 | st -T "stfloat" -g 85x25+550+300 tmux new-session $@ |
diff --git a/terminal b/terminal new file mode 100755 index 0000000..d751592 --- /dev/null +++ b/terminal | |||
| @@ -0,0 +1,5 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | # My default terminal | ||
| 4 | |||
| 5 | st -e tmux new-session $@ | ||
| @@ -0,0 +1,8 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | # My X editor | ||
| 4 | # Requires: terminal | ||
| 5 | |||
| 6 | editor=${EDITOR:-${VISUAL:-vi}} | ||
| 7 | |||
| 8 | terminal $editor | ||
diff --git a/xedit-filter b/xedit-filter index 93e908c..9422760 100755 --- a/xedit-filter +++ b/xedit-filter | |||
| @@ -1,10 +1,9 @@ | |||
| 1 | #/!bin/sh | 1 | #/!bin/sh |
| 2 | 2 | ||
| 3 | # Open stdin in a text editor and sends modified selection to stdout | 3 | # Open stdin in a text editor and sends modified selection to stdout |
| 4 | 4 | # Requires: xeditor | |
| 5 | xeditor=${XEDITOR:-gedit} | ||
| 6 | 5 | ||
| 7 | f=$(mktemp) | 6 | f=$(mktemp) |
| 8 | cat > "$f" | 7 | cat > "$f" |
| 9 | $xeditor "$f" && cat "$f" | 8 | xeditor "$f" && cat "$f" |
| 10 | 9 | ||
| @@ -5,7 +5,8 @@ | |||
| 5 | # some possibilities (open file, open url, man page...). If none is matched, | 5 | # some possibilities (open file, open url, man page...). If none is matched, |
| 6 | # a choice is prompted. | 6 | # a choice is prompted. |
| 7 | 7 | ||
| 8 | # Requires: dmenu (or similar), mail-compose, open-file, websearch, xsel | 8 | # Requires: dmenu (or similar), mail-compose, open-file, terminal, websearch, |
| 9 | # xedit, xsel | ||
| 9 | 10 | ||
| 10 | # TODO: | 11 | # TODO: |
| 11 | # send mail to email address; | 12 | # send mail to email address; |
| @@ -13,8 +14,6 @@ | |||
| 13 | # choice: pipe to another program | 14 | # choice: pipe to another program |
| 14 | 15 | ||
| 15 | browser=${BROWSER:-firefox} | 16 | browser=${BROWSER:-firefox} |
| 16 | terminal=${TERMINAL:-xterm} | ||
| 17 | xeditor=${XEDITOR:-gedit} | ||
| 18 | menu=${MENU:-dmenu} | 17 | menu=${MENU:-dmenu} |
| 19 | menuopts="-l 10" | 18 | menuopts="-l 10" |
| 20 | 19 | ||
| @@ -34,7 +33,7 @@ choice() { | |||
| 34 | elif [ "$chosen" = "edit" ]; then | 33 | elif [ "$chosen" = "edit" ]; then |
| 35 | f=$(mktemp) | 34 | f=$(mktemp) |
| 36 | xsel > "$f" | 35 | xsel > "$f" |
| 37 | $xeditor "$f" | 36 | xedit "$f" |
| 38 | fi | 37 | fi |
| 39 | } | 38 | } |
| 40 | 39 | ||
| @@ -47,7 +46,7 @@ tryman() { | |||
| 47 | number=$(echo "$1" | sed 's/[^1-8]//g') | 46 | number=$(echo "$1" | sed 's/[^1-8]//g') |
| 48 | name=$(echo "$1" | sed 's/([1-8])//g' | sed 's/ //g') | 47 | name=$(echo "$1" | sed 's/([1-8])//g' | sed 's/ //g') |
| 49 | if [ $(man -w "$number" "$name" | wc -l) = 1 ]; then | 48 | if [ $(man -w "$number" "$name" | wc -l) = 1 ]; then |
| 50 | $terminal -e man "$number" "$name" | 49 | terminal -e man "$number" "$name" |
| 51 | return 0 | 50 | return 0 |
| 52 | else | 51 | else |
| 53 | return 1 | 52 | return 1 |
