aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--Makefile2
-rwxr-xr-xdmenu-websearch2
-rwxr-xr-xmail-compose6
-rwxr-xr-xopen-file20
-rwxr-xr-xpopup-cal122
-rwxr-xr-xpopup-cal32
-rwxr-xr-xpopup-terminal2
-rwxr-xr-xterminal5
-rwxr-xr-xxedit8
-rwxr-xr-xxedit-filter5
-rwxr-xr-xxplumb9
11 files changed, 37 insertions, 26 deletions
diff --git a/Makefile b/Makefile
index dc6edfc..08b419e 100644
--- a/Makefile
+++ b/Makefile
@@ -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
6menu=${MENU:-dmenu} 6menu=${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
6terminal=${TERMINAL:-xterm} 6terminal -e mcom $@
7
8$terminal -e mcom $@
diff --git a/open-file b/open-file
index 055aad2..848fd9b 100755
--- a/open-file
+++ b/open-file
@@ -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
10menu=${MENU:-dmenu} 9menu=${MENU:-dmenu}
11 10
12video=${VIDEOPLAYER:-mpv} 11# Change default apps here
13music=${MUSICPLAYER:-mpv} 12video="mpv"
14pdf=${VIEWER:-zathura} 13music="mpv --player-operation-mode=pseudo-gui"
15img=${IMAGEVIEWER:-imv} 14pdf="zathura"
16word=${TEXTDOCUMENT:-libreoffice} 15img="imv"
17sheet=${SPREADSHEET:-libreoffice} 16word="libreoffice"
18html=${HTMLVIEWER:-firefox} 17sheet="libreoffice"
19xedit=${XEDITOR:-gedit} 18html="firefox --new-window"
19xedit="xedit"
20 20
21openfile() { 21openfile() {
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
6st -T "stfloat" -g 69x36+620+250 -e sh -c 'cal $(date +%Y); read x' 6st -T "stfloat" -g 69x36+620+250 -e sh -c 'cal $(date +%Y); read x'
diff --git a/popup-cal3 b/popup-cal3
index 766c9cb..6dfed54 100755
--- a/popup-cal3
+++ b/popup-cal3
@@ -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
6st -T "stfloat" -g 68x11+620+450 -e sh -c 'cal -3; read x' 6st -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
5st -T "stfloat" -g 85x25+550+300 $@ 5st -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
5st -e tmux new-session $@
diff --git a/xedit b/xedit
new file mode 100755
index 0000000..d456be8
--- /dev/null
+++ b/xedit
@@ -0,0 +1,8 @@
1#!/bin/sh
2
3# My X editor
4# Requires: terminal
5
6editor=${EDITOR:-${VISUAL:-vi}}
7
8terminal $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
5xeditor=${XEDITOR:-gedit}
6 5
7f=$(mktemp) 6f=$(mktemp)
8cat > "$f" 7cat > "$f"
9$xeditor "$f" && cat "$f" 8xeditor "$f" && cat "$f"
10 9
diff --git a/xplumb b/xplumb
index 68b8cda..8fec4ac 100755
--- a/xplumb
+++ b/xplumb
@@ -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
15browser=${BROWSER:-firefox} 16browser=${BROWSER:-firefox}
16terminal=${TERMINAL:-xterm}
17xeditor=${XEDITOR:-gedit}
18menu=${MENU:-dmenu} 17menu=${MENU:-dmenu}
19menuopts="-l 10" 18menuopts="-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

Generated with cgit - Back to sebastiano.tronto.net