~alexdavid/dotfiles

ref: b6e23f59d542764f276ef2cc5766878576cf5c62 dotfiles/bin/toggle-colors -rwxr-xr-x 601 bytes
b6e23f59 — Alex David Switch back to qutebrowser 5 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/env bash

set -e

if [ -f ~/.config/isdark ]; then
  rm ~/.config/isdark
  cp ~/.config/alacritty/light.yml  ~/.config/alacritty/alacritty.yml
else
  touch ~/.config/isdark
  cp ~/.config/alacritty/dark.yml  ~/.config/alacritty/alacritty.yml
fi

~/.config/sway/set-wallpaper &
killall -s SIGUSR1 nvim || true

_ipc_socket="${XDG_RUNTIME_DIR}/qutebrowser/ipc-$(echo -n "$USER" | md5sum | cut -d' ' -f1)"

printf '{"args": [":config-source"], "target_arg": null, "version": "1.0.4", "protocol_version": 1, "cwd": "%s"}\n' \
       "${PWD}" | socat - UNIX-CONNECT:"${_ipc_socket}" 2>/dev/null