summaryrefslogtreecommitdiff
path: root/etc/aliases/x
blob: 7242c616911d08d8457eaeb23a3785ebc5cbb004 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
## vim:ft=zsh

# feh etc if X is running, x for startx otherwise
if pidof X &> /dev/null; then

	# quiet and verbose can actually be used together here.
	# quiet = suppress non-critical errors, verbose = show progress bars
	alias feh='feh --quiet --verbose'

	# Alias structure:
	# feh[theme][recursive?][slide-delay?]
	# theme = [f]ullscreen | [i]ndex | [j]ust | [t]humbnail
	# recursive: r for recursive, nothing otherwise
	# slide-delay:
	#     none   - no slideshow
	#     number - slideshow, $number seconds per image
	#     x      - slideshow, seconds will be specified on commandline
	#              (like "fehfrx 7 .")
	# the themes are defined in .fehrc
	alias fehf='feh -Tfull' # Fullscreen
	alias fehfr='feh -Tfull --recursive'
	alias fehi='feh .fehindex.jpg'
	alias fehj='feh -Tjust' # Screensaver-like
	alias fehjr='feh -Tjust --recursive'
	for i in {5,10,15,20}; {
		alias fehj$i="feh -Tjust --slideshow-delay $i"
		alias fehf$i="feh -Tfull --slideshow-delay $i"
		alias fehjr$i="feh -Tjust --slideshow-delay $i --recursive"
		alias fehfr$i="feh -Tfull --slideshow-delay $i --recursive"
	}
	alias fehjx='feh -Tjust --slideshow-delay'
	alias fehfx='feh -Tfull --slideshow-delay'
	alias fehjrx='feh -Tjust --recursive --slideshow-delay'
	alias fehfrx='feh -Tfull --recursive --slideshow-delay'
	alias feht='feh -Tthumbnail' # List thumbnails
	alias fehtr='feh -Tthumbnail --recursive'

	# Automatically upload screenshot plzkthx
	alias putscreen='put $(screenshot)'

	# Useful when a beamer is connected to my laptop
	alias rplayer='mplayer -vo x11 -zoom -vf scale=1024:-2'
else
	# start x and log out immediately
	alias x='unsetopt bg_nice; startx &! exit'
fi