summaryrefslogtreecommitdiff
path: root/zsh/.zshrc
blob: 3addc2a1180238fe30aab7fe177180cbfceb1686 (plain) (blame)
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
# load sway on first tty
if [ "$(tty)" = "/dev/tty1" ]; then
	export XDG_SESSION_TYPE=wayland
	export XDG_CURRENT_DESKTOP=sway
	export SDL_VIDEODRIVER=wayland
	export SDL_AUDIODRIVER=pipewire
	export MOZ_ENABLE_WAYLAND=1
	export MOZ_WEBRENDER=1
	export QT_QPA_PLATFORM=wayland
	export QT_QPA_PLATFORMTHEME=gtk2
	export CLUTTER_BACKEND=wayland
	export _JAVA_AWT_WM_NONREPARENTING=1
	case $HOST in
		"aeon"|"drummer"|"redwood") 
			export GDK_BACKEND="wayland,x11"
			export LIBVA_DRIVER_NAME=radeonsi
			export AMD_VULKAN_ICD=RADV
			;;
		*)
			export GDK_BACKEND="wayland"
			;;
	esac
	exec dbus-launch --sh-syntax --exit-with-session sway
fi

# zsh
autoload -U compinit promptinit
compinit -d $XDG_CACHE_HOME/zsh/zcompdump-$ZSH_VERSION
setopt hist_ignore_all_dups
setopt autocd
setopt extendedglob
promptinit; prompt gentoo
zstyle ':completion:*' cache-path $XDG_CACHE_HOME/zsh/zcompcache use-cache 1

export GPG_TTY=$(tty)

alias ytdl='yt-dlp --add-metadata --write-thumbnail --prefer-ffmpeg -f "(bestvideo[vcodec^=av01]/bestvideo)+(bestaudio[acodec=opus]/bestaudio[ext=webm]/bestaudio)/best" --sub-langs all --write-subs --merge-output-format mkv'
alias ytdla="yt-dlp --add-metadata --prefer-ffmpeg -f bestaudio --extract-audio --audio-format opus --audio-quality 0 -o \"${HOME}/music/%(artist)s/%(title)s\""
alias wi=whois
alias mitmproxy="mitmproxy --set confdir=${XDG_CONFIG_HOME}/mitmproxy"
alias mitmweb="mitmweb --set confdir=${XDG_CONFIG_HOME}/mitmproxy"

bindkey "^[[1;3D" backward-word
bindkey "^[[1;3C" forward-word