aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--alsause/Makefile15
-rwxr-xr-xalsause/dalsause4
-rw-r--r--bash/aliases3
-rw-r--r--bash/bashrc6
-rw-r--r--brave/Makefile2
-rw-r--r--cryptsetup/Makefile15
-rwxr-xr-xcryptsetup/mount-devices35
-rwxr-xr-xdmenu/plumb22
-rw-r--r--emacs-go-mode/Makefile11
-rw-r--r--emacs-go-mode/init-go-mode.el (renamed from emacs/init-go-mode.el)0
-rw-r--r--emacs-haskell-mode/Makefile11
-rw-r--r--emacs-haskell-mode/init-haskell-mode.el (renamed from emacs/init-haskell-mode.el)0
-rw-r--r--emacs/Makefile19
-rw-r--r--emacs/init.el52
-rw-r--r--ffmpeg/Makefile5
-rw-r--r--ffmpeg/bash-aliases25
-rwxr-xr-xffmpeg/resize-and-transcode2
-rw-r--r--gdb/Makefile11
-rw-r--r--gdb/init-gdb.el (renamed from emacs/init-gdb.el)0
-rwxr-xr-xgit/new-c-proj8
-rw-r--r--java-runtime/user-profile2
-rw-r--r--ssh/Makefile4
-rwxr-xr-xssh/ssh-archiso5
-rw-r--r--sshexec/Makefile10
-rwxr-xr-xsshexec/sshexec-archiso5
-rw-r--r--xmonad/xinit3
-rw-r--r--xorg-server/xkbdbind.config.h.gpp1
-rw-r--r--xwallpaper/xinit14
-rw-r--r--yt-dlp/bash-aliases2
29 files changed, 224 insertions, 68 deletions
diff --git a/alsause/Makefile b/alsause/Makefile
new file mode 100644
index 0000000..d0e39be
--- /dev/null
+++ b/alsause/Makefile
@@ -0,0 +1,15 @@
+.POSIX:
+
+install:
+ ../check-installed-shebang dalsause
+ ../check-in-path dmenu tr sed cut echo
+ mkdir -p -- ~/.local/bin
+ test ! -e ~/.local/bin/dalsause || test -L ~/.local/bin/dalsause
+ ln -sf -- ~/.dotfiles/alsause/dalsause ~/.local/bin/dalsause
+
+uninstall:
+ +! ../check-installed alsause
+ -unlink -- ~/.local/bin/dalsause
+
+clean:
+ @:
diff --git a/alsause/dalsause b/alsause/dalsause
new file mode 100755
index 0000000..f5491ef
--- /dev/null
+++ b/alsause/dalsause
@@ -0,0 +1,4 @@
+#!/bin/dash
+set -e
+dev="$(alsause | tr '\t' ' ' | sed 's/ / /' | dmenu -p 'Choose default audio output' -i -l 20)"
+alsause "$(echo "$dev" | cut -d ' ' -f 1)
diff --git a/bash/aliases b/bash/aliases
index d978492..75a1eda 100644
--- a/bash/aliases
+++ b/bash/aliases
@@ -69,6 +69,9 @@ alias l='ls -CF'
#DESCRIPTION: Go to the parent directory
alias ..="cd .."
+#DESCRIPTION: Print each argument, each on their own line
+alias echoln="printf '%s\n'"
+
#libnotify
diff --git a/bash/bashrc b/bash/bashrc
index 26a319a..f3c31e5 100644
--- a/bash/bashrc
+++ b/bash/bashrc
@@ -62,3 +62,9 @@ elif test "$TERM" = xterm; then
export TERM=xterm-256color
fi
featherweight-off
+
+
+# Use yellow colour on hostname if logged in remotely
+if printenv | grep -q '^SSH_\(CONNECTION\|CLIENT\|TTY\)'; then
+ hostname-colour 33
+fi
diff --git a/brave/Makefile b/brave/Makefile
index dc5f0c2..b70f3b8 100644
--- a/brave/Makefile
+++ b/brave/Makefile
@@ -1,7 +1,5 @@
.POSIX:
-XINITRC_ORDER = 20
-
install:
../check-installed-shebang brave
mkdir -p -- ~/.local/bin
diff --git a/cryptsetup/Makefile b/cryptsetup/Makefile
new file mode 100644
index 0000000..0666bc6
--- /dev/null
+++ b/cryptsetup/Makefile
@@ -0,0 +1,15 @@
+.POSIX:
+
+install:
+ ../check-installed-shebang mount-devices
+ ../check-in-path test
+ ../check-in-path mountpoint
+ ../check-in-path cryptsetup
+ ../check-in-path mount
+ mkdir -p -- ~/.local/bin
+ test ! -e ~/.local/bin/mount-devices || test -L ~/.local/bin/mount-devices
+ ln -sf -- ~/.dotfiles/cryptsetup/mount-devices ~/.local/bin/mount-devices
+
+uninstall:
+ +! ../check-installed cryptsetup
+ -unlink -- ~/.local/bin/mount-devices
diff --git a/cryptsetup/mount-devices b/cryptsetup/mount-devices
new file mode 100755
index 0000000..a26fd1c
--- /dev/null
+++ b/cryptsetup/mount-devices
@@ -0,0 +1,35 @@
+#!/bin/sh
+
+# Although the name doesn't indicate it, this is only for encrypted
+# partitions, and it exists only because systemd is absolutely
+# terrible at mounting encrypted filesystems. Thanks you, Lennart
+# and all the idiots that thought your craps smelled good.
+
+cd /devices
+
+for f in *; do
+ # Make sure the symlink points to an available device
+ if ! test -e "$f"; then
+ continue
+ fi
+
+ # Make sure that the device should be mounted in /media/
+ if ! test -d "/media/$f"; then
+ continue;
+ fi
+
+ # Make sure the device is not already mounted
+ if mountpoint -q "/media/$f"; then
+ continue;
+ fi
+
+ # If the device has not been decrypted already, attempt to decrypt it
+ if ! test -e "/dev/mapper/$f"; then
+ if ! cryptsetup open "/devices/$f" "$f"; then
+ continue
+ fi
+ fi
+
+ # And of course, mount the decrypted device
+ mount "/dev/mapper/$f" "/media/$f"
+done
diff --git a/dmenu/plumb b/dmenu/plumb
index c0d98f3..d7c45e1 100755
--- a/dmenu/plumb
+++ b/dmenu/plumb
@@ -13,6 +13,7 @@ fi
sel="$(xclip -o)"
url="$(printf '%s' "$sel" | tr -d '\n')"
file="$(printf '%s' "$sel" | tr -d '\n')"
+lower="$(printf '%s' "$sel" | tr A-Z a-z | sed 's/Å/å/g' | sed 's/Ä/ä/g' | sed 's/Ö/ö/g' | sed 's/Ü/ü/g' | sed 's/É/é/g' | sed 's/À/à/g')"
if test -z "$sel"; then
exit 0
@@ -52,6 +53,13 @@ if printf '%s\n' "$url" | grep '^\(https\?://\|www\.\)[^[:space:]./]\+\.[^[:spac
}
fi
+if test $(printf '%s\n' "$sel" | wc -l) = 1 && printf '%s\n' "$sel" | grep -q '^[A-Za-z0-9_-]\{11,11\}$'; then
+ functions="$functions youtube"
+ youtube () {
+ exec $WEB_BROWSER -- "https://youtube.com/watch?v=$sel";
+ }
+fi
+
if printf '%s\n' "$url" | grep '^\(mailto:\)\?\("[^"]\+"\|[a-zA-Z0-9!#$%&'\''*+/=?^_`{|}~-]\+\(\.[a-zA-Z0-9!#$%&'\''*+/=?^_`{|}~-]\)*\)@[^[:space:]./]\+\.[^[:space:]/]*$' > /dev/null; then
functions="$functions email-client"
email-client () {
@@ -66,11 +74,25 @@ if test -r "$file" && file "$file" | grep '\(PNG\|JPEG\) image' > /dev/null; the
}
fi
+if test ! "$lower" = "$sel"; then
+ functions="$functions wiktionary.en.lower-case"
+ wiktionary.en.lower-case () {
+ exec $WEB_BROWSER "https://en.wiktionary.org/wiki/$lower";
+ }
+fi
+
functions="$functions wiktionary.en"
wiktionary.en () {
exec $WEB_BROWSER "https://en.wiktionary.org/wiki/$sel";
}
+if test ! "$lower" = "$sel"; then
+ functions="$functions wiktionary.sv.lower-case"
+ wiktionary.sv.lower-case () {
+ exec $WEB_BROWSER "https://sv.wiktionary.org/wiki/$lower";
+ }
+fi
+
functions="$functions wiktionary.sv"
wiktionary.sv () {
exec $WEB_BROWSER "https://sv.wiktionary.org/wiki/$sel";
diff --git a/emacs-go-mode/Makefile b/emacs-go-mode/Makefile
new file mode 100644
index 0000000..ea3f8be
--- /dev/null
+++ b/emacs-go-mode/Makefile
@@ -0,0 +1,11 @@
+.POSIX:
+
+install:
+ mkdir -p -- ~/.config/emacs
+ test -L ~/.config/emacs/init-go-mode.el || test ! -e ~/.config/emacs/init-go-mode.el
+ ln -sf -- ~/.dotfiles/emacs-go-mode/init-go-mode.el ~/.config/emacs/
+
+uninstall:
+ +! ../check-installed emacs-go-mode
+ -unlink -- ~/.config/emacs/init-go-mode.el
+ -rmdir -- ~/.config/emacs
diff --git a/emacs/init-go-mode.el b/emacs-go-mode/init-go-mode.el
index 56e3c16..56e3c16 100644
--- a/emacs/init-go-mode.el
+++ b/emacs-go-mode/init-go-mode.el
diff --git a/emacs-haskell-mode/Makefile b/emacs-haskell-mode/Makefile
new file mode 100644
index 0000000..3605590
--- /dev/null
+++ b/emacs-haskell-mode/Makefile
@@ -0,0 +1,11 @@
+.POSIX:
+
+install:
+ mkdir -p -- ~/.config/emacs
+ test -L ~/.config/emacs/init-haskell-mode.el || test ! -e ~/.config/emacs/init-haskell-mode.el
+ ln -sf -- ~/.dotfiles/emacs-haskell-mode/init-haskell-mode.el ~/.config/emacs/
+
+uninstall:
+ +! ../check-installed emacs-haskell-mode
+ -unlink -- ~/.config/emacs/init-haskell-mode.el
+ -rmdir -- ~/.config/emacs
diff --git a/emacs/init-haskell-mode.el b/emacs-haskell-mode/init-haskell-mode.el
index 6fe75c2..6fe75c2 100644
--- a/emacs/init-haskell-mode.el
+++ b/emacs-haskell-mode/init-haskell-mode.el
diff --git a/emacs/Makefile b/emacs/Makefile
index 9fa5799..665bde5 100644
--- a/emacs/Makefile
+++ b/emacs/Makefile
@@ -14,22 +14,8 @@ install:
fi; \
ln -sf -- .config/emacs ~/.emacs.d; \
fi
- printf '; %s\n; %s\n\n' > ~/.config/emacs/init.el \
- 'This file is generated by ~/.dotfiles/emacs/Makefile' \
- '!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!'
- cat -- init.el >> ~/.config/emacs/init.el
- if ../check-installed emacs-go-mode 2>/dev/null; then \
- printf '\n' >> ~/.config/emacs/init.el && \
- cat -- init-go-mode.el >> ~/.config/emacs/init.el; \
- fi
- if ../check-installed emacs-haskell-mode; then\
- printf '\n' >> ~/.config/emacs/init.el && \
- cat -- init-haskell-mode.el >> ~/.config/emacs/init.el; \
- fi
- if ../check-installed gdb; then \
- printf '\n' >> ~/.config/emacs/init.el && \
- cat -- init-gdb.el >> ~/.config/emacs/init.el; \
- fi
+ test -L ~/.config/emacs/init.el || test ! -e ~/.config/emacs/init.el
+ ln -sf -- ~/.dotfiles/emacs/init.el ~/.config/emacs/init.el
if grep Ubuntu < /etc/lsb-release >/dev/null 2>/dev/null; then \
mkdir -p -- ~/.config/profile.d && \
(test ! -e ~/.config/profile.d/emacs || \
@@ -52,3 +38,4 @@ uninstall:
-unlink -- ~/.emacs.d
-rmdir -- ~/.config/emacs
-unlink -- ~/.local/bin/e
+ test ! -d ../.work/emacs || (cd ../.work/emacs && $(MAKE) uninstall)
diff --git a/emacs/init.el b/emacs/init.el
index a807fa7..432b772 100644
--- a/emacs/init.el
+++ b/emacs/init.el
@@ -4,21 +4,25 @@
;; You may delete these explanatory comments.
(package-initialize)
+
+;; Enable the upcase-region function which is disabled by default
(put 'upcase-region 'disabled nil)
-(custom-set-variables
- ;; custom-set-variables was added by Custom.
- ;; If you edit it by hand, you could mess it up, so be careful.
- ;; Your init file should contain only one such instance.
- ;; If there is more than one, they won't work right.
- '(inhibit-startup-screen t))
-(setq display-time-string-forms
- '((propertize (concat " " 24-hours ":" minutes " ")
- )))
+;; Never show the startup screen (go to scratch if there is no file specified)
+(custom-set-variables '(inhibit-startup-screen t))
+
+
+;; Display column number after line number
(column-number-mode)
+
+
+;; Configure and display clock
+(setq display-time-string-forms
+ '((propertize (concat " " 24-hours ":" minutes " ") )))
(display-time-mode)
+
; (set-default-font "-misc-fixed-medium-r-normal--13-*-75-75-c-70-iso8859-1")
;; TODO set-default-font stopped working
@@ -34,16 +38,34 @@
(set-face-foreground 'font-lock-comment-face "red")
+
+;; Fix up C mode
+;;;; disable electric mode
(add-hook 'after-change-major-mode-hook (lambda() (electric-indent-mode -1)))
(add-hook 'c-mode-hook (lambda () (electric-indent-local-mode)))
-
+;;;; use tab as indentation
(defvaralias 'c-basic-offset 'tab-width)
+;; TODO trailing whitespaces are removed even where I want them
+
+
+;; TODO I can probably remove these, do not remember why they were added
(global-set-key (kbd "DEL") 'backward-delete-char)
(setq c-backspace-function 'backward-delete-char)
-(setq vc-follow-symlinks nil)
-(setq vc-handled-backends nil)
-(add-to-list 'auto-mode-alist '("/PKGBUILD$" . shell-script-mode))
-(add-to-list 'auto-mode-alist '("/APKBUILD$" . shell-script-mode))
-(setq auto-mode-alist (cons '("\.cl$" . c-mode) auto-mode-alist))
+;; Version control configurations
+(setq vc-follow-symlinks nil) ; Do not follow symlinks in version control
+(setq vc-handled-backends nil) ; Do not use version control features
+
+
+;; Addition rules for major mode selection
+(add-to-list 'auto-mode-alist '("/PKGBUILD$" . shell-script-mode)) ; arch linux build scripts
+(add-to-list 'auto-mode-alist '("/APKBUILD$" . shell-script-mode)) ; alpine linux build scripts
+(setq auto-mode-alist (cons '("\.cl$" . c-mode) auto-mode-alist)) ; OpenCL source files
+
+
+
+;; Load configurations from installed for other packages
+((lambda ()
+ (dolist (file (directory-files (expand-file-name "~/.config/emacs/") t "^init-.*\\.el$"))
+ (load-file file))))
diff --git a/ffmpeg/Makefile b/ffmpeg/Makefile
index 2c472b0..c9f54c0 100644
--- a/ffmpeg/Makefile
+++ b/ffmpeg/Makefile
@@ -8,13 +8,8 @@ install:
mkdir -p -- ~/.local/bin
ln -sf -- ~/.dotfiles/ffmpeg/resize-and-transcode ~/.local/bin/
ln -sf -- ~/.dotfiles/ffmpeg/resize-and-transcode-recursively ~/.local/bin/
- mkdir -p -- ~/.config/bash/aliases.d
- test ! -e ~/.config/bash/aliases.d/ffmpeg || test -L ~/.config/bash/aliases.d/ffmpeg
- ln -sf -- ~/.dotfiles/ffmpeg/bash-aliases ~/.config/bash/aliases.d/ffmpeg
uninstall:
+! ../check-installed ffmpeg
- -unlink -- ~/.config/bash/aliases.d/ffmpeg
- -rmdir -- ~/.config/bash/aliases.d
-unlink -- ~/.local/bin/resize-and-transcode
-unlink -- ~/.local/bin/resize-and-transcode-recursively
diff --git a/ffmpeg/bash-aliases b/ffmpeg/bash-aliases
deleted file mode 100644
index 41846c8..0000000
--- a/ffmpeg/bash-aliases
+++ /dev/null
@@ -1,25 +0,0 @@
-# -*- shell-script -*-
-
-remove-video-on-all () (
- for ext in opus aac mp3 m4a; do
- for f in *.{mkv,mp4,webm}; do
- if ffmpeg -i "$f" -map 0:a -codec copy -y -- "$f.$ext"; then
- rm -- "$f"
- else
- rm -- "$f.$ext"
- fi
- done
- done
-)
-
-remove-video-on-all-1 () (
- for ext in opus aac mp3 m4a; do
- for f in *."$1"; do
- if ffmpeg -i "$f" -map 0:a -codec copy -y -- "$f.$ext"; then
- rm -- "$f"
- else
- rm -- "$f.$ext"
- fi
- done
- done
-)
diff --git a/ffmpeg/resize-and-transcode b/ffmpeg/resize-and-transcode
index cecad85..c247b3e 100755
--- a/ffmpeg/resize-and-transcode
+++ b/ffmpeg/resize-and-transcode
@@ -100,7 +100,7 @@ if test -z "$scale" && test "$codec" = '-c:v copy'; then
fi
ttysetting="$(stty -g)"
-ffmpeg -i "$input" $scale $codec -c:a copy -- "$output"
+ffmpeg -i file:"$input" $scale $codec -c:a copy -- file:"$output"
ret=$?
stty "$ttysetting"
diff --git a/gdb/Makefile b/gdb/Makefile
new file mode 100644
index 0000000..874d896
--- /dev/null
+++ b/gdb/Makefile
@@ -0,0 +1,11 @@
+.POSIX:
+
+install:
+ mkdir -p -- ~/.config/emacs
+ test -L ~/.config/emacs/init-gdb.el || test ! -e ~/.config/emacs/init-gdb.el
+ ln -sf -- ~/.dotfiles/gdb/init-gdb.el ~/.config/emacs/
+
+uninstall:
+ +! ../check-installed gdb
+ -unlink -- ~/.config/emacs/init-gdb.el
+ -rmdir -- ~/.config/emacs
diff --git a/emacs/init-gdb.el b/gdb/init-gdb.el
index 51b1a35..51b1a35 100644
--- a/emacs/init-gdb.el
+++ b/gdb/init-gdb.el
diff --git a/git/new-c-proj b/git/new-c-proj
index 7676e9f..503bdf9 100755
--- a/git/new-c-proj
+++ b/git/new-c-proj
@@ -19,7 +19,7 @@ git init .
cat > LICENSE <<EOF
ISC License
-© $(date +%Y) Mattias Andrée <maandree@kth.se>
+© $(date +%Y) Mattias Andrée <m@maandree.se>
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
@@ -39,7 +39,9 @@ cat > .gitignore <<EOF
*~
*.o
*.a
+*.t
*.lo
+*.to
*.su
*.so
*.so.*
@@ -52,7 +54,9 @@ cat > .gitignore <<EOF
EOF
mkdir -p -- .git/info
-printf '%s\n' '_*' '.hidden' '.makeenv' >> .git/info/exclude
+printf '%s\n' '_*' '._*' '.hidden' '.makeenv' >> .git/info/exclude
+
+printf '%s\n' 'MAKEENV_OPTS_OPT_ATTACHED_ARG = j' 'CC = gcc-extreme -std=c99' >> .makeenv
if printf '%s\n' "$1" | grep '^lib' >/dev/null 2>/dev/null; then
UPPERCASE="$(printf '%s\n' "$1" | tr '[a-z-]' '[A-Z_]')"
diff --git a/java-runtime/user-profile b/java-runtime/user-profile
index 9b60457..f20b9a4 100644
--- a/java-runtime/user-profile
+++ b/java-runtime/user-profile
@@ -1,3 +1,3 @@
# -*- shell-script -*-
-export _JAVA_OPTIONS='-Djdk.gtk.version=2.2'
+export _JAVA_OPTIONS='-Djdk.gtk.version=2.2 -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel'
diff --git a/ssh/Makefile b/ssh/Makefile
index be4b0d5..4a3dba4 100644
--- a/ssh/Makefile
+++ b/ssh/Makefile
@@ -55,6 +55,9 @@ install:
mkdir -p -- ~/.config/bash/aliases.d
test ! -e ~/.config/bash/aliases.d/openssh || test -L ~/.config/bash/aliases.d/openssh
ln -sf -- ~/.dotfiles/openssh/bash-aliases ~/.config/bash/aliases.d/openssh
+ mkdir -p -- ~/.local/bin
+ test ! -e ~/.local/bin/ssh-archiso || test -L ~/.local/bin/ssh-archiso
+ ln -sf -- ~/.dotfiles/openssh/ssh-archiso ~/.local/bin/ssh-archiso
uninstall:
+! ../check-installed ssh
@@ -70,3 +73,4 @@ uninstall:
-rm -f -- .ssh-config
-unlink -- ~/.config/bash/aliases.d/openssh
-rmdir -- ~/.config/bash/aliases.d
+ -unlink -- ~/.local/bin/ssh-archiso
diff --git a/ssh/ssh-archiso b/ssh/ssh-archiso
new file mode 100755
index 0000000..f3b7fc7
--- /dev/null
+++ b/ssh/ssh-archiso
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+printf '\033[1m%s\033[m\n\n' 'The password is simply "arch"' >&2
+
+exec ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null root@archiso "$@"
diff --git a/sshexec/Makefile b/sshexec/Makefile
new file mode 100644
index 0000000..c2be226
--- /dev/null
+++ b/sshexec/Makefile
@@ -0,0 +1,10 @@
+.POSIX:
+
+install:
+ mkdir -p -- ~/.local/bin
+ test ! -e ~/.local/bin/sshexec-archiso || test -L ~/.local/bin/sshexec-archiso
+ ln -sf -- ~/.dotfiles/sshexec/sshexec-archiso ~/.local/bin/sshexec-archiso
+
+uninstall:
+ +! ../check-installed sshexec
+ -unlink -- ~/.local/bin/sshexec-archiso
diff --git a/sshexec/sshexec-archiso b/sshexec/sshexec-archiso
new file mode 100755
index 0000000..303726c
--- /dev/null
+++ b/sshexec/sshexec-archiso
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+printf '\033[1m%s\033[m\n\n' 'The password is simply "arch"' >&2
+
+exec sshexec -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null root@archiso "$@"
diff --git a/xmonad/xinit b/xmonad/xinit
index 1b7bacb..27bbd7f 100644
--- a/xmonad/xinit
+++ b/xmonad/xinit
@@ -9,6 +9,9 @@ if test "${SESSION}" = xmonad; then
# Use GTK2 theming in Qt applications
export QT_QPA_PLATFORMTHEME=gtk2
+ # Use client-side decorations GTK3 and newer
+ export GTK_CSD=1
+
# Start GTK2 settings daemon
if test ! "${NO_MATE}" = y; then
if test -x /usr/lib/mate-settings-daemon/mate-settings-daemon; then
diff --git a/xorg-server/xkbdbind.config.h.gpp b/xorg-server/xkbdbind.config.h.gpp
index a832b4c..22839a0 100644
--- a/xorg-server/xkbdbind.config.h.gpp
+++ b/xorg-server/xkbdbind.config.h.gpp
@@ -16,6 +16,7 @@ static struct hotkey hotkeys[] = {
{XK_F10, MOD | S, 1, CMD("sh", "-c", "amixer "AMIXER_DEFAULT_CARD" -- set \"${MAIN_ALSA_MIXER}\" 5%-")},
{XK_F11, MOD | S, 1, CMD("sh", "-c", "amixer "AMIXER_DEFAULT_CARD" -- set \"${MAIN_ALSA_MIXER}\" 5%+")},
{XK_F12, MOD | S, 0, CMD("sh", "-c", "amixer "AMIXER_DEFAULT_CARD" -- set \"${MAIN_ALSA_MIXER}\" 100%")},
+ {XK_a, MOD, 0, CMD("dalsause")},
{XK_u, MOD, 0, CMD("unicode")},
{XK_i, MOD, 0, CMD("ipa")},
{XK_p, MOD, 0, CMD("dmenu_run")},
diff --git a/xwallpaper/xinit b/xwallpaper/xinit
index 9080e46..7648dd2 100644
--- a/xwallpaper/xinit
+++ b/xwallpaper/xinit
@@ -1,5 +1,19 @@
# -*- shell-script -*-
+# Set default background
+target="$(readlink -- ~/.config/background)"
+if test "${target}" = backgrounds/default || test "${target}" = backgrounds/default-travel || test "${target}" = backgrounds/default-nontravel; then
+ if where="$(where)" 2>/dev/null; then
+ if test "${where}" = travelling && test -f ~/.config/backgrounds/default-travel; then
+ ln -sf -- backgrounds/default-travel ~/.config/background
+ elif test -f ~/.config/backgrounds/default-nontravel; then
+ ln -sf -- backgrounds/default-nontravel ~/.config/background
+ else
+ ln -sf -- backgrounds/default ~/.config/background
+ fi
+ fi
+fi
+
# Set background
if test -f ~/.config/background."${SESSION_}"; then
xwallpaper --zoom ~/.config/background."${SESSION_}"
diff --git a/yt-dlp/bash-aliases b/yt-dlp/bash-aliases
index a4724a4..2200bea 100644
--- a/yt-dlp/bash-aliases
+++ b/yt-dlp/bash-aliases
@@ -1,3 +1,3 @@
# -*- shell-script -*-
-alias yt-dlp='yt-dlp --compat-options filename-sanitization'
+alias yt-dlp='yt-dlp --compat-options filename-sanitization --cookies-from-browser brave'