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
Nikolaos Karaolidis 0e0acc03d6 Update script names
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
2023-10-03 14:44:07 +01: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