From e7c38020033c0b1ae2c86386df962f6087a0107f Mon Sep 17 00:00:00 2001 From: Stephan Raabe Date: Mon, 9 Oct 2023 19:54:14 +0200 Subject: [PATCH] Adding bottom theme --- waybar/launch.sh | 6 +- waybar/{styles => themes}/default/config | 0 waybar/{styles => themes}/default/myconfig | 0 waybar/{styles => themes}/default/style.css | 0 waybar/themes/ml4w-bottom/config | 78 ++++++++++++++++++ waybar/themes/ml4w-bottom/dark/style.css | 14 ++++ waybar/themes/ml4w-bottom/light/style.css | 14 ++++ waybar/themes/ml4w-bottom/mixed/style.css | 14 ++++ waybar/themes/ml4w-bottom/myconfig | 79 +++++++++++++++++++ waybar/{styles => themes}/ml4w/config | 0 waybar/{styles => themes}/ml4w/dark/style.css | 0 .../{styles => themes}/ml4w/light/style.css | 0 .../{styles => themes}/ml4w/mixed/style.css | 0 waybar/{styles => themes}/ml4w/myconfig | 0 waybar/{styles => themes}/ml4w/style.css | 2 +- waybar/themeswitcher.sh | 8 +- 16 files changed, 207 insertions(+), 8 deletions(-) rename waybar/{styles => themes}/default/config (100%) rename waybar/{styles => themes}/default/myconfig (100%) rename waybar/{styles => themes}/default/style.css (100%) create mode 100644 waybar/themes/ml4w-bottom/config create mode 100644 waybar/themes/ml4w-bottom/dark/style.css create mode 100644 waybar/themes/ml4w-bottom/light/style.css create mode 100644 waybar/themes/ml4w-bottom/mixed/style.css create mode 100644 waybar/themes/ml4w-bottom/myconfig rename waybar/{styles => themes}/ml4w/config (100%) rename waybar/{styles => themes}/ml4w/dark/style.css (100%) rename waybar/{styles => themes}/ml4w/light/style.css (100%) rename waybar/{styles => themes}/ml4w/mixed/style.css (100%) rename waybar/{styles => themes}/ml4w/myconfig (100%) rename waybar/{styles => themes}/ml4w/style.css (99%) diff --git a/waybar/launch.sh b/waybar/launch.sh index bcd83cf..d4c5a5a 100755 --- a/waybar/launch.sh +++ b/waybar/launch.sh @@ -27,7 +27,7 @@ fi IFS=';' read -ra arrThemes <<< "$themestyle" echo ${arrThemes[0]} -if [ ! -f ~/dotfiles/waybar/styles${arrThemes[1]}/style.css ]; then +if [ ! -f ~/dotfiles/waybar/themes${arrThemes[1]}/style.css ]; then themestyle="/ml4w;/ml4w/light" fi @@ -36,7 +36,7 @@ fi # ----------------------------------------------------- if [[ $USER = "raabe" ]] then - waybar -c ~/dotfiles/waybar/styles${arrThemes[0]}/myconfig -s ~/dotfiles/waybar/styles${arrThemes[1]}/style.css & + waybar -c ~/dotfiles/waybar/themes${arrThemes[0]}/myconfig -s ~/dotfiles/waybar/themes${arrThemes[1]}/style.css & else - waybar -c ~/dotfiles/waybar/styles${arrThemes[0]}/config -s ~/dotfiles/waybar/styles${arrThemes[1]}/style.css & + waybar -c ~/dotfiles/waybar/themes${arrThemes[0]}/config -s ~/dotfiles/waybar/themes${arrThemes[1]}/style.css & fi diff --git a/waybar/styles/default/config b/waybar/themes/default/config similarity index 100% rename from waybar/styles/default/config rename to waybar/themes/default/config diff --git a/waybar/styles/default/myconfig b/waybar/themes/default/myconfig similarity index 100% rename from waybar/styles/default/myconfig rename to waybar/themes/default/myconfig diff --git a/waybar/styles/default/style.css b/waybar/themes/default/style.css similarity index 100% rename from waybar/styles/default/style.css rename to waybar/themes/default/style.css diff --git a/waybar/themes/ml4w-bottom/config b/waybar/themes/ml4w-bottom/config new file mode 100644 index 0000000..fc2f9a5 --- /dev/null +++ b/waybar/themes/ml4w-bottom/config @@ -0,0 +1,78 @@ +// __ __ _ +// \ \ / /_ _ _ _| |__ __ _ _ __ +// \ \ /\ / / _` | | | | '_ \ / _` | '__| +// \ V V / (_| | |_| | |_) | (_| | | +// \_/\_/ \__,_|\__, |_.__/ \__,_|_| +// |___/ +// +// by Stephan Raabe (2023) +// ----------------------------------------------------- +// +{ + // General Settings + + // Position TOP + // "layer": "top", + // "margin-top": 14, + // "margin-bottom": 0, + + // Position BOTTOM + "position": "bottom", + "margin-top": 0, + "margin-bottom": 14, + + "layer": "top", + "height": 16, + "margin-left": 0, + "margin-right": 0, + "spacing": 0, + + // Load Modules + "include": ["~/dotfiles/waybar/modules.json"], + + // Modules Left + "modules-left": [ + "custom/appmenu", + "custom/wallpaper", + "wlr/taskbar", + "group/quicklinks", + "hyprland/window" + ], + + // Modules Center + "modules-center": [ + "hyprland/workspaces" + ], + + // Modules Right + "modules-right": [ + "custom/updates", + "pulseaudio", + "bluetooth", + "battery", + "group/hardware", + "custom/cliphist", + "network", + "custom/exit", + "clock" + ], + + // Group Quicklinks + "group/quicklinks": { + "orientation": "horizontal", + "modules": [ + "custom/filemanager", + "custom/brave", + ] + }, + + // Group Hardware + "group/hardware": { + "orientation": "horizontal", + "modules": [ + "disk", + "cpu", + "memory" + ] + } +} diff --git a/waybar/themes/ml4w-bottom/dark/style.css b/waybar/themes/ml4w-bottom/dark/style.css new file mode 100644 index 0000000..e7512f1 --- /dev/null +++ b/waybar/themes/ml4w-bottom/dark/style.css @@ -0,0 +1,14 @@ +/* ----------------------------------------------------- + * Import Pywal colors + * ----------------------------------------------------- */ +@import '../../../../../.cache/wal/colors-waybar.css'; + +@define-color backgroundlight @color8; +@define-color backgrounddark #FFFFFF; +@define-color bordercolor @color8; +@define-color textcolor1 @color8; +@define-color textcolor2 #FFFFFF; +@define-color textcolor3 #FFFFFF; +@define-color iconcolor @color8; + +@import '../../ml4w/style.css'; diff --git a/waybar/themes/ml4w-bottom/light/style.css b/waybar/themes/ml4w-bottom/light/style.css new file mode 100644 index 0000000..268ee43 --- /dev/null +++ b/waybar/themes/ml4w-bottom/light/style.css @@ -0,0 +1,14 @@ +/* ----------------------------------------------------- + * Import Pywal colors + * ----------------------------------------------------- */ +@import '../../../../../.cache/wal/colors-waybar.css'; + +@define-color backgroundlight #FFFFFF; +@define-color backgrounddark @color11; +@define-color bordercolor #FFFFFF; +@define-color textcolor1 #FFFFFF; +@define-color textcolor2 @color11; +@define-color textcolor3 #FFFFFF; +@define-color iconcolor #FFFFFF; + +@import '../../ml4w/style.css'; diff --git a/waybar/themes/ml4w-bottom/mixed/style.css b/waybar/themes/ml4w-bottom/mixed/style.css new file mode 100644 index 0000000..b209d6d --- /dev/null +++ b/waybar/themes/ml4w-bottom/mixed/style.css @@ -0,0 +1,14 @@ +/* ----------------------------------------------------- + * Import Pywal colors + * ----------------------------------------------------- */ +@import '../../../../../.cache/wal/colors-waybar.css'; + +@define-color backgroundlight @color8; +@define-color backgrounddark #FFFFFF; +@define-color bordercolor @color8; +@define-color textcolor1 @color8; +@define-color textcolor2 #FFFFFF; +@define-color textcolor3 #FFFFFF; +@define-color iconcolor #FFFFFF; + +@import '../../ml4w/style.css'; diff --git a/waybar/themes/ml4w-bottom/myconfig b/waybar/themes/ml4w-bottom/myconfig new file mode 100644 index 0000000..7d3990b --- /dev/null +++ b/waybar/themes/ml4w-bottom/myconfig @@ -0,0 +1,79 @@ +// __ __ _ +// \ \ / /_ _ _ _| |__ __ _ _ __ +// \ \ /\ / / _` | | | | '_ \ / _` | '__| +// \ V V / (_| | |_| | |_) | (_| | | +// \_/\_/ \__,_|\__, |_.__/ \__,_|_| +// |___/ +// +// by Stephan Raabe (2023) +// ----------------------------------------------------- +// +{ + // Position TOP + // "position": "top", + // "margin-top": 14, + //"margin-bottom": 0, + + // Position BOTTOM + "position": "bottom", + "margin-bottom": 14, + "margin-top": 0, + + // General Settings + "layer": "top", + "height": 16, + "margin-left": 0, + "margin-right": 0, + "spacing": 0, + + // Load Modules + "include": ["~/dotfiles/waybar/modules.json"], + + // Modules Left + "modules-left": [ + "custom/appmenu", + "custom/wallpaper", + "wlr/taskbar", + "group/quicklinks", + "hyprland/window" + ], + + // Modules Center + "modules-center": [ + "hyprland/workspaces" + ], + + // Modules Right + "modules-right": [ + "custom/youtube", + "custom/updates", + "pulseaudio", + "bluetooth", + "battery", + "group/hardware", + "custom/cliphist", + "network", + "custom/exit", + "clock" + ], + + // Group Quicklinks + "group/quicklinks": { + "orientation": "horizontal", + "modules": [ + "custom/filemanager", + "custom/chatgpt", + "custom/windowsvm" + ] + }, + + // Group Hardware + "group/hardware": { + "orientation": "horizontal", + "modules": [ + "disk", + "cpu", + "memory" + ] + } +} diff --git a/waybar/styles/ml4w/config b/waybar/themes/ml4w/config similarity index 100% rename from waybar/styles/ml4w/config rename to waybar/themes/ml4w/config diff --git a/waybar/styles/ml4w/dark/style.css b/waybar/themes/ml4w/dark/style.css similarity index 100% rename from waybar/styles/ml4w/dark/style.css rename to waybar/themes/ml4w/dark/style.css diff --git a/waybar/styles/ml4w/light/style.css b/waybar/themes/ml4w/light/style.css similarity index 100% rename from waybar/styles/ml4w/light/style.css rename to waybar/themes/ml4w/light/style.css diff --git a/waybar/styles/ml4w/mixed/style.css b/waybar/themes/ml4w/mixed/style.css similarity index 100% rename from waybar/styles/ml4w/mixed/style.css rename to waybar/themes/ml4w/mixed/style.css diff --git a/waybar/styles/ml4w/myconfig b/waybar/themes/ml4w/myconfig similarity index 100% rename from waybar/styles/ml4w/myconfig rename to waybar/themes/ml4w/myconfig diff --git a/waybar/styles/ml4w/style.css b/waybar/themes/ml4w/style.css similarity index 99% rename from waybar/styles/ml4w/style.css rename to waybar/themes/ml4w/style.css index 15795d9..4fb52be 100644 --- a/waybar/styles/ml4w/style.css +++ b/waybar/themes/ml4w/style.css @@ -302,7 +302,7 @@ window#waybar.empty #window { #network.wifi { background-color: @backgroundlight; - color: @textcolor1; + color: @textcolor2; } /* ----------------------------------------------------- diff --git a/waybar/themeswitcher.sh b/waybar/themeswitcher.sh index 83601d2..cb3942d 100755 --- a/waybar/themeswitcher.sh +++ b/waybar/themeswitcher.sh @@ -1,11 +1,11 @@ #!/bin/bash -options=$(find ~/dotfiles/waybar/styles/ -maxdepth 2 -type d) +options=$(find ~/dotfiles/waybar/themes/ -maxdepth 2 -type d) listThemes="" for value in $options do - if [ ! $value == "$HOME/dotfiles/waybar/styles/" ]; then + if [ ! $value == "$HOME/dotfiles/waybar/themes/" ]; then if [ $(find $value -maxdepth 1 -type d | wc -l) = 1 ]; then - result=$(echo $value | sed "s#$HOME/dotfiles/waybar/styles/#/#g") + result=$(echo $value | sed "s#$HOME/dotfiles/waybar/themes/#/#g") IFS='/' read -ra arrThemes <<< "$result" echo $arrThemes listThemes+="/${arrThemes[1]};$result\n" @@ -19,4 +19,4 @@ choice=$(echo -e "$listThemes" | rofi -dmenu -config ~/dotfiles/rofi/config-wall if [ "$choice" ]; then echo "$choice" > ~/.cache/.themestyle.sh ~/dotfiles/waybar/launch.sh -fi \ No newline at end of file +fi