This repository has been archived on 2025-07-31. You can view files and clone it, but cannot push or open issues or pull requests.
Files
dotfiles/.config/awesome/scripts/switch_theme.sh
2022-04-14 00:35:06 +03:00

20 lines
473 B
Bash
Executable File

#!/bin/bash
theme=$(grep -o -P '(?<=local theme = ").*(?=")' /home/nick/.config/awesome/theme/init.lua)
case $theme in
"nordic_legion")
new_theme="abstract_office"
;;
"abstract_office")
new_theme="nordic_legion"
;;
*)
esac
# Replace the theme in the init.lua file
sed -i "s/local theme = .*$/local theme = \"$new_theme\"/" /home/nick/.config/awesome/theme/init.lua
# Restart awesome
echo 'awesome.restart()' | awesome-client