blob: e3f42cbb01a8024d3bc6999db0b8edc48b0c0386 (
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
|
#!/usr/bin/env bash
#
# mostly stolen from jb55 https://github.com/jb55/bin/blob/master/themeswitch
usage () {
printf "usage: xtheme <dark|light>\n"
exit 1
}
export XTHEME="$1"
[ -z "$XTHEME" ] && usage
[ "$XTHEME" != "dark" ] && [ "$XTHEME" != "light" ] && usage
# switch terminal theme
home-manager switch
# set emacs theme using emacsclient
if [ "$XTHEME" == "light" ]
then
exec emacsclient \
--eval "(bs/switch-theme 'light)" &
else
exec emacsclient \
--eval "(bs/switch-theme 'dark)" &
fi
systemctl --user restart polybar &
wait
|