aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--brave/Makefile12
-rwxr-xr-xbrave/brave3
-rw-r--r--cryptsetup/Makefile15
-rwxr-xr-xcryptsetup/mount-devices35
-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-proj4
-rw-r--r--java-runtime/user-profile2
l---------python@australis1
l---------python@borealis1
l---------python@east1
l---------python@hades1
l---------python@heaven1
l---------python@hyperion1
l---------python@miniaurora1
l---------python@nadir1
l---------python@north1
l---------python@selene1
l---------python@south1
l---------python@west1
-rw-r--r--ssh/Makefile4
-rwxr-xr-xssh/ssh-archiso5
-rw-r--r--sshexec/Makefile10
-rwxr-xr-xsshexec/sshexec-archiso5
-rwxr-xr-xxorg-xrandr/resolution-changed14
-rwxr-xr-xxorg-xrandr/setres/__main__.py.gpp17
-rw-r--r--xpybar/config/xmonad-monitor.gpp4
-rw-r--r--xwallpaper/xinit14
-rw-r--r--yt-dlp/bash-aliases2
38 files changed, 223 insertions, 71 deletions
diff --git a/brave/Makefile b/brave/Makefile
new file mode 100644
index 0000000..b70f3b8
--- /dev/null
+++ b/brave/Makefile
@@ -0,0 +1,12 @@
+.POSIX:
+
+install:
+ ../check-installed-shebang brave
+ mkdir -p -- ~/.local/bin
+ test ! -e ~/.local/bin/brave || test -L ~/.local/bin/brave
+ ln -sf -- ~/.dotfiles/brave/brave ~/.local/bin/brave
+
+uninstall:
+ +! ../check-installed brave
+ +! ../check-installed brave-bin
+ -unlink -- ~/.local/bin/brave
diff --git a/brave/brave b/brave/brave
new file mode 100755
index 0000000..9971967
--- /dev/null
+++ b/brave/brave
@@ -0,0 +1,3 @@
+#!/bin/dash
+
+exec /usr/bin/brave --password-store=none "$@"
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/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..dfd00f9 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
@@ -52,7 +52,7 @@ cat > .gitignore <<EOF
EOF
mkdir -p -- .git/info
-printf '%s\n' '_*' '.hidden' '.makeenv' >> .git/info/exclude
+printf '%s\n' '_*' '._*' '.hidden' '.makeenv' >> .git/info/exclude
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/python@australis b/python@australis
new file mode 120000
index 0000000..ffded53
--- /dev/null
+++ b/python@australis
@@ -0,0 +1 @@
+python@zenith \ No newline at end of file
diff --git a/python@borealis b/python@borealis
new file mode 120000
index 0000000..ffded53
--- /dev/null
+++ b/python@borealis
@@ -0,0 +1 @@
+python@zenith \ No newline at end of file
diff --git a/python@east b/python@east
new file mode 120000
index 0000000..ffded53
--- /dev/null
+++ b/python@east
@@ -0,0 +1 @@
+python@zenith \ No newline at end of file
diff --git a/python@hades b/python@hades
new file mode 120000
index 0000000..ffded53
--- /dev/null
+++ b/python@hades
@@ -0,0 +1 @@
+python@zenith \ No newline at end of file
diff --git a/python@heaven b/python@heaven
new file mode 120000
index 0000000..ffded53
--- /dev/null
+++ b/python@heaven
@@ -0,0 +1 @@
+python@zenith \ No newline at end of file
diff --git a/python@hyperion b/python@hyperion
new file mode 120000
index 0000000..ffded53
--- /dev/null
+++ b/python@hyperion
@@ -0,0 +1 @@
+python@zenith \ No newline at end of file
diff --git a/python@miniaurora b/python@miniaurora
new file mode 120000
index 0000000..ffded53
--- /dev/null
+++ b/python@miniaurora
@@ -0,0 +1 @@
+python@zenith \ No newline at end of file
diff --git a/python@nadir b/python@nadir
new file mode 120000
index 0000000..ffded53
--- /dev/null
+++ b/python@nadir
@@ -0,0 +1 @@
+python@zenith \ No newline at end of file
diff --git a/python@north b/python@north
new file mode 120000
index 0000000..ffded53
--- /dev/null
+++ b/python@north
@@ -0,0 +1 @@
+python@zenith \ No newline at end of file
diff --git a/python@selene b/python@selene
new file mode 120000
index 0000000..ffded53
--- /dev/null
+++ b/python@selene
@@ -0,0 +1 @@
+python@zenith \ No newline at end of file
diff --git a/python@south b/python@south
new file mode 120000
index 0000000..ffded53
--- /dev/null
+++ b/python@south
@@ -0,0 +1 @@
+python@zenith \ No newline at end of file
diff --git a/python@west b/python@west
new file mode 120000
index 0000000..ffded53
--- /dev/null
+++ b/python@west
@@ -0,0 +1 @@
+python@zenith \ No newline at end of file
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/xorg-xrandr/resolution-changed b/xorg-xrandr/resolution-changed
index e1457ce..4e8856f 100755
--- a/xorg-xrandr/resolution-changed
+++ b/xorg-xrandr/resolution-changed
@@ -1,15 +1,23 @@
#!/bin/dash
reset_wallpaper_twice=0
+hostname="$(hostname | tr 'A-Z' 'a-z')"
-if ! test "$(hostname | tr '[A-Z]' '[a-z]')" = zenith; then
+if ! test "${hostname}" = zenith; then ## TODO how about the other east,north,hades,hyperion?
# Reset rat size in case DPI change modified scaling
xsetroot -cursor_name left_ptr || :
# Reset rat speed in case DPI changed
if test "${DESKTOP_SESSION}" = xmonad && test ! "${NO_MATE}" = y; then
- msd=/usr/lib/mate-settings-daemon/mate-settings-daemon
- if ! test -x "$msd"; then
+ if test -x /usr/lib/mate-settings-daemon/mate-settings-daemon; then
+ msd=/usr/lib/mate-settings-daemon/mate-settings-daemon
+ elif test -x /usr/bin/mate-settings-daemon; then
+ msd=/usr/bin/mate-settings-daemon
+ elif test -x /usr/libexec/mate-settings-daemon; then
+ msd=/usr/libexec/mate-settings-daemon
+ elif test -x /usr/libexec/mate-settings-daemon/mate-settings-daemon; then
+ msd=/usr/libexec/mate-settings-daemon/mate-settings-daemon
+ else
msd=mate-settings-daemon
fi
(exec $msd --replace &) || :
diff --git a/xorg-xrandr/setres/__main__.py.gpp b/xorg-xrandr/setres/__main__.py.gpp
index 9c0f1eb..b25f9d6 100755
--- a/xorg-xrandr/setres/__main__.py.gpp
+++ b/xorg-xrandr/setres/__main__.py.gpp
@@ -51,10 +51,25 @@ if hostname == 'zenith':
sec_position = 'left'
elif hostname == 'hades':
- prime, sec = None, None
+ prime = None
+ sec = None
embed = screen['eDP1']
+
+ prime_alt = None
+ sec_alt = None
+
embed.want_mode = '1920x1280'
+elif hostname == 'north':
+ prime = None
+ sec = None
+ embed = screen['eDP1']
+
+ prime_alt = None
+ sec_alt = None
+
+ embed.want_mode = '1920x1080'
+
%%>hostname="$(hostname | tr '[A-Z]' '[a-z]')"
%%>file="${HOME}/.dotfiles/.private/setres/${hostname}"
%%>if test -r "${file}"; then
diff --git a/xpybar/config/xmonad-monitor.gpp b/xpybar/config/xmonad-monitor.gpp
index df42701..92843bb 100644
--- a/xpybar/config/xmonad-monitor.gpp
+++ b/xpybar/config/xmonad-monitor.gpp
@@ -89,6 +89,8 @@ with open('/proc/cpuinfo', 'r') as f:
isvm = [line.replace('\n', ' ').replace('\t', ' ').split(':') for line in isvm if line]
isvm = any('hypervisor' in ':'.join(line[1:]).split(' ') for line in isvm if line[0].strip().startswith('flags'))
card1 = 'Ensoniq AudioPCI' if isvm else 'HDA Intel PCH'
+%%>elif test $hostname = hades; then
+card1 = 'HDA Intel PCH'
%%>else
card1 = 'HD-Audio Generic'
%%>fi
@@ -194,7 +196,7 @@ functions = [ [ myxmonad
#, myii
, None
, MyStat (lambda f : Clocked(f, 10))
-%%>if test ! "$hostname" = zenith; then
+%%>if test ! "$hostname" = zenith && test ! "$hostname" = north; then ## TODO how about east and hyperion?
, MyCGNegative()
%%>fi
, MyBrilliance(None)
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'