From 70ebd9bb2227f05936ec4e1d9fdc3c2fd20e7808 Mon Sep 17 00:00:00 2001 From: Stephan Raabe Date: Tue, 12 Sep 2023 22:55:47 +0200 Subject: [PATCH 1/2] Updates --- rofi/config.rasi | 1 + 1 file changed, 1 insertion(+) diff --git a/rofi/config.rasi b/rofi/config.rasi index d62dbd0..f5f634a 100644 --- a/rofi/config.rasi +++ b/rofi/config.rasi @@ -15,6 +15,7 @@ configuration { drun-display-format: "{name}"; font: "Fira Sans SemiBold 11"; modi: "window,run,drun"; + /* show-icons: true; */ } /* Dark theme. */ From 46f08ec666ddef1438e803bb218e5067d1e3262d Mon Sep 17 00:00:00 2001 From: Stephan Raabe Date: Wed, 13 Sep 2023 11:20:50 +0200 Subject: [PATCH 2/2] Minor bugfix --- hypr/hyprland.conf | 1 + scripts/updates.sh | 17 +++++++++++++---- waybar/config | 11 ++++++++++- waybar/launch.sh | 2 +- 4 files changed, 25 insertions(+), 6 deletions(-) diff --git a/hypr/hyprland.conf b/hypr/hyprland.conf index 76c528e..f58c52c 100644 --- a/hypr/hyprland.conf +++ b/hypr/hyprland.conf @@ -46,6 +46,7 @@ env = XCURSOR_SIZE,24 # ----------------------------------------------------- input { kb_layout = de + # kb_layout = en kb_variant = kb_model = kb_options = diff --git a/scripts/updates.sh b/scripts/updates.sh index b21c5d0..f71cde5 100755 --- a/scripts/updates.sh +++ b/scripts/updates.sh @@ -32,22 +32,31 @@ fi updates=$(("$updates_arch" + "$updates_aur")) +# ----------------------------------------------------- +# Testing +# ----------------------------------------------------- + +# Overwrite updates with numbers for testing +# updates=100 + +# test JSON output +# printf '{"text": "0", "alt": "0", "tooltip": "0 Updates", "class": "red"}' +# exit + # ----------------------------------------------------- # Output in JSON format for Waybar Module custom-updates # ----------------------------------------------------- css_class="green" -# test classes -# printf '{"text": "0", "alt": "0", "tooltip": "0 Updates", "class": "red"}' -# exit - if [ "$updates" -gt $threshhold_yellow ]; then css_class="yellow" fi + if [ "$updates" -gt $threshhold_red ]; then css_class="red" fi + if [ "$updates" -gt $threshhold_green ]; then printf '{"text": "%s", "alt": "%s", "tooltip": "%s Updates", "class": "%s"}' "$updates" "$updates" "$updates" "$css_class" else diff --git a/waybar/config b/waybar/config index 4866d90..61b193b 100644 --- a/waybar/config +++ b/waybar/config @@ -10,10 +10,19 @@ // { // General Settings + + // Position TOP "layer": "top", - "height": 16, "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, diff --git a/waybar/launch.sh b/waybar/launch.sh index 7eb606b..efeacd6 100755 --- a/waybar/launch.sh +++ b/waybar/launch.sh @@ -16,7 +16,7 @@ killall waybar # ----------------------------------------------------- # Loading the configuration based on the username # ----------------------------------------------------- -if [[ $USER = "raabe" ]] +if [[ $USER = "raabe2" ]] then waybar -c ~/dotfiles/waybar/myconfig & -s ~/dotfiles/waybar/style.css else