Add more comments

This commit is contained in:
Stephan Raabe 2023-10-18 16:15:52 +02:00
parent b87cfe609c
commit 75a2170015
3 changed files with 24 additions and 9 deletions

View File

@ -9,14 +9,18 @@ Waybar Wiki: https://github.com/Alexays/Waybar/wiki
## Create your own theme
Please check the configurations of the folders in ~/dotfiles/waybar/themes/
Create a folder for your theme and add your configuration. A good starting point is to copy the default folder with the default waybar theme.
The main theme folder holds the core config file and stylesheet.
Create subfolders to save variations like in the folder ml4w.
You can include stylesheets from other themes to standardize your themes like in the theme ml4w-bottom.
Create a folder for your theme and add your configuration.
A good starting point is to copy the default folder with the default waybar theme.
The main theme folder includes the core config file and stylesheet.
Waybar configuration: https://github.com/Alexays/Waybar/wiki/Configuration
Create subfolders to save variations like in the folder ml4w. You can include stylesheets from other themes to standardize your themes like in the theme ml4w-bottom.
## Stylesheet
The style.css saves the Stylesheet of the theme.
The style.css includes the style file of the theme.
Waybar Styling: https://github.com/Alexays/Waybar/wiki/Styling
## Define theme name

View File

@ -9,14 +9,18 @@
# -----------------------------------------------------
# -----------------------------------------------------
# Quit running waybar instances
# Quit all running waybar instances
# -----------------------------------------------------
killall waybar
# -----------------------------------------------------
# Get current theme information
# Default theme: /THEMEFOLDER;/VARIATION
# -----------------------------------------------------
themestyle="/ml4w;/ml4w/light"
# -----------------------------------------------------
# Get current theme information from .cache/.themestyle.sh
# -----------------------------------------------------
if [ -f ~/.cache/.themestyle.sh ]; then
themestyle=$(cat ~/.cache/.themestyle.sh)
else
@ -32,7 +36,7 @@ if [ ! -f ~/dotfiles/waybar/themes${arrThemes[1]}/style.css ]; then
fi
# -----------------------------------------------------
# Loading the configuration based on the username
# Loading the configuration and style file based on the username
# -----------------------------------------------------
if [[ $USER = "raabe" ]]
then

View File

@ -8,7 +8,14 @@
# by Stephan Raabe (2023)
# -----------------------------------------------------
# -----------------------------------------------------
# Default theme folder
# -----------------------------------------------------
themes_path="$HOME/dotfiles/waybar/themes"
# -----------------------------------------------------
# Initialize arrays
# -----------------------------------------------------
listThemes=""
listNames=""
@ -40,7 +47,7 @@ listNames=${listNames::-2}
choice=$(echo -e "$listNames" | rofi -dmenu -config ~/dotfiles/rofi/config-wallpaper.rasi -no-show-icons -width 30 -p "Themes" -format i)
# -----------------------------------------------------
# Set new theme by writing the theme information to ~/.cache
# Set new theme by writing the theme information to ~/.cache/.themestyle.sh
# -----------------------------------------------------
if [ "$choice" ]; then
echo "${listThemes[$choice+1]}" > ~/.cache/.themestyle.sh