From e1a22b19efdf542480868f1c250f11ace3a275c1 Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Mon, 6 May 2024 16:45:26 +0900 Subject: Style change of ags which should work well with Dark / Light switcher. Keybinds moved to UserConfigs --- config/hypr/scripts/DarkLight.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'config/hypr/scripts') diff --git a/config/hypr/scripts/DarkLight.sh b/config/hypr/scripts/DarkLight.sh index 6c9f610f..6d6c57c9 100755 --- a/config/hypr/scripts/DarkLight.sh +++ b/config/hypr/scripts/DarkLight.sh @@ -9,6 +9,7 @@ dark_wallpapers="$wallpaper_base_path/Dark" light_wallpapers="$wallpaper_base_path/Light" hypr_config_path="$HOME/.config/hypr" swaync_style="$HOME/.config/swaync/style.css" +ags_style="$HOME/.config/ags/user/style.css" SCRIPTSDIR="$HOME/.config/hypr/scripts" notif="$HOME/.config/swaync/images/bell.png" dark_rofi_pywal="$HOME/.cache/wal/colors-rofi-dark.rasi" @@ -74,6 +75,15 @@ else sed -i '/@define-color noti-bg-alt/s/#.*;/#F0F0F0;/' "${swaync_style}" fi +# ags color change +if [ "$next_mode" = "Dark" ]; then + sed -i '/@define-color noti-bg/s/rgba([0-9]*,\s*[0-9]*,\s*[0-9]*,\s*[0-9.]*);/rgba(0, 0, 0, 0.8);/' "${ags_style}" + sed -i '/@define-color noti-bg-alt/s/#.*;/#111111;/' "${ags_style}" +else + sed -i '/@define-color noti-bg/s/rgba([0-9]*,\s*[0-9]*,\s*[0-9]*,\s*[0-9.]*);/rgba(255, 255, 255, 0.9);/' "${ags_style}" + sed -i '/@define-color noti-bg-alt/s/#.*;/#F0F0F0;/' "${ags_style}" +fi + # Set Dynamic Wallpaper for Dark or Light Mode if [ "$next_mode" = "Dark" ]; then next_wallpaper="$(find "${dark_wallpapers}" -type f \( -iname "*.jpg" -o -iname "*.png" \) -print0 | shuf -n1 -z | xargs -0)" -- cgit v1.2.3 From 423140c7fb7cd1263f08702cbb8439a091ceddb8 Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Tue, 7 May 2024 09:32:28 +0900 Subject: small adjust for better ags overview search box and prompt --- config/ags/user/style.css | 17 +++++++++-------- config/hypr/scripts/DarkLight.sh | 6 ++++-- config/hypr/scripts/Refresh.sh | 3 ++- 3 files changed, 15 insertions(+), 11 deletions(-) (limited to 'config/hypr/scripts') diff --git a/config/ags/user/style.css b/config/ags/user/style.css index ff6b8a57..0519fb17 100644 --- a/config/ags/user/style.css +++ b/config/ags/user/style.css @@ -6,9 +6,10 @@ /* @import '../../../.cache/wal/colors-waybar-rgba.css'; */ /* define some colors */ -@define-color border-color @color2; -@define-color border-color-alt @color7; -@define-color noti-bg rgba(0, 0, 0, 0.8); +@define-color border-color @color2; +@define-color border-color-alt @color7; +@define-color text-color rgba(255, 255, 255, 0.7); +@define-color noti-bg rgba(0, 0, 0, 0.4); @define-color noti-bg-alt #111111; widget { @@ -35,13 +36,13 @@ widget { padding: 0rem 1.364rem; padding-right: 2.864rem; background-color: @noti-bg; - color: @color2; - caret-color: transparent; + color: @text-color; + caret-color: inherit; font-weight: bolder; } .overview-search-box selection { background-color: @noti-bg; - color: @border-color; + color: @text-color; } .overview-search-box-extended { @@ -50,7 +51,7 @@ widget { } .overview-search-prompt { - color: @color2; + color: @text-color; } .overview-search-icon { @@ -79,7 +80,7 @@ widget { min-width: 28.773rem; padding: 0.682rem; background-color: @noti-bg; - color: @border-color; + color: @text-color; font-weight: bold; } diff --git a/config/hypr/scripts/DarkLight.sh b/config/hypr/scripts/DarkLight.sh index 6d6c57c9..f9d2a933 100755 --- a/config/hypr/scripts/DarkLight.sh +++ b/config/hypr/scripts/DarkLight.sh @@ -77,10 +77,12 @@ fi # ags color change if [ "$next_mode" = "Dark" ]; then - sed -i '/@define-color noti-bg/s/rgba([0-9]*,\s*[0-9]*,\s*[0-9]*,\s*[0-9.]*);/rgba(0, 0, 0, 0.8);/' "${ags_style}" + sed -i '/@define-color noti-bg/s/rgba([0-9]*,\s*[0-9]*,\s*[0-9]*,\s*[0-9.]*);/rgba(0, 0, 0, 0.4);/' "${ags_style}" + sed -i '/@define-color text-color/s/rgba([0-9]*,\s*[0-9]*,\s*[0-9]*,\s*[0-9.]*);/rgba(255, 255, 255, 0.7);/' "${ags_style}" sed -i '/@define-color noti-bg-alt/s/#.*;/#111111;/' "${ags_style}" else - sed -i '/@define-color noti-bg/s/rgba([0-9]*,\s*[0-9]*,\s*[0-9]*,\s*[0-9.]*);/rgba(255, 255, 255, 0.9);/' "${ags_style}" + sed -i '/@define-color noti-bg/s/rgba([0-9]*,\s*[0-9]*,\s*[0-9]*,\s*[0-9.]*);/rgba(255, 255, 255, 0.4);/' "${ags_style}" + sed -i '/@define-color text-color/s/rgba([0-9]*,\s*[0-9]*,\s*[0-9]*,\s*[0-9.]*);/rgba(0, 0, 0, 0.7);/' "${ags_style}" sed -i '/@define-color noti-bg-alt/s/#.*;/#F0F0F0;/' "${ags_style}" fi diff --git a/config/hypr/scripts/Refresh.sh b/config/hypr/scripts/Refresh.sh index bf806e01..aeae77d1 100755 --- a/config/hypr/scripts/Refresh.sh +++ b/config/hypr/scripts/Refresh.sh @@ -1,6 +1,6 @@ #!/bin/bash # /* ---- 💫 https://github.com/JaKooLit 💫 ---- */ ## -# Scripts for refreshing waybar, rofi, swaync, pywal colors +# Scripts for refreshing ags waybar, rofi, swaync, pywal colors SCRIPTSDIR=$HOME/.config/hypr/scripts UserScripts=$HOME/.config/hypr/UserScripts @@ -22,6 +22,7 @@ for _prs in "${_ps[@]}"; do fi done +# quit ags ags -q sleep 0.3 -- cgit v1.2.3 From ae0629bc443e0752c01646972a6dc5e4cea9c9f7 Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Tue, 7 May 2024 18:09:03 +0900 Subject: small tweak / bug fix --- config/hypr/UserConfigs/Startup_Apps.conf | 1 + config/hypr/UserConfigs/UserKeybinds.conf | 2 ++ config/hypr/scripts/RefreshNoWaybar.sh | 3 +++ 3 files changed, 6 insertions(+) (limited to 'config/hypr/scripts') diff --git a/config/hypr/UserConfigs/Startup_Apps.conf b/config/hypr/UserConfigs/Startup_Apps.conf index 78d06363..2f529d61 100644 --- a/config/hypr/UserConfigs/Startup_Apps.conf +++ b/config/hypr/UserConfigs/Startup_Apps.conf @@ -23,6 +23,7 @@ exec-once = $scriptsDir/Polkit.sh exec-once = waybar & exec-once = nm-applet --indicator & exec-once = swaync & +exec-once = ags & #exec-once = blueman-applet & #exec-once = rog-control-center & diff --git a/config/hypr/UserConfigs/UserKeybinds.conf b/config/hypr/UserConfigs/UserKeybinds.conf index 6dc461a8..eede1669 100644 --- a/config/hypr/UserConfigs/UserKeybinds.conf +++ b/config/hypr/UserConfigs/UserKeybinds.conf @@ -14,6 +14,8 @@ $UserScripts = $HOME/.config/hypr/UserScripts # rofi App launcher #bindr = $mainMod, $mainMod_L, exec, pkill rofi || rofi -show drun -modi drun,filebrowser,run,window # Super Key to Launch rofi menu bind = $mainMod, D, exec, pkill rofi || rofi -show drun -modi drun,filebrowser,run,window + +# ags overview bind = $mainMod, A, exec, pkill rofi || true && ags -t 'overview' bind = $mainMod, Return, exec, $term # Launch terminal diff --git a/config/hypr/scripts/RefreshNoWaybar.sh b/config/hypr/scripts/RefreshNoWaybar.sh index 689bccf0..42d67adc 100755 --- a/config/hypr/scripts/RefreshNoWaybar.sh +++ b/config/hypr/scripts/RefreshNoWaybar.sh @@ -25,6 +25,9 @@ for _prs in "${_ps[@]}"; do fi done +# quit ags +ags -q + # Pywal refresh ${SCRIPTSDIR}/PywalSwww.sh & -- cgit v1.2.3 From 777b43ff16e642cfbfb1643f977c1de8d0d21050 Mon Sep 17 00:00:00 2001 From: JaKooLit Date: Wed, 8 May 2024 09:51:28 +0900 Subject: Wlogout.sh tweaked small tweak waybar modules --- config/hypr/scripts/Wlogout.sh | 55 ++++++++++++++++++++++++++---------------- config/waybar/modules | 2 +- 2 files changed, 35 insertions(+), 22 deletions(-) (limited to 'config/hypr/scripts') diff --git a/config/hypr/scripts/Wlogout.sh b/config/hypr/scripts/Wlogout.sh index 58e1fd68..f3746530 100755 --- a/config/hypr/scripts/Wlogout.sh +++ b/config/hypr/scripts/Wlogout.sh @@ -4,12 +4,14 @@ # wlogout (Power, Screen Lock, Suspend, etc) # Set variables for parameters -A_2160=680 -B_2160=750 -A_1440=500 -B_1440=550 -A_1080=400 -B_1080=400 +A_2160=450 +B_2160=450 +A_1600=400 +B_1600=400 +A_1440=350 +B_1440=350 +A_1080=50 +B_1080=50 A_720=50 B_720=50 @@ -23,22 +25,33 @@ fi resolution=$(hyprctl -j monitors | jq -r '.[] | select(.focused==true) | .height / .scale' | awk -F'.' '{print $1}') hypr_scale=$(hyprctl -j monitors | jq -r '.[] | select(.focused==true) | .scale') -echo "Detected Resolution: $resolution" - # Set parameters based on screen resolution and scaling factor if ((resolution >= 2160)); then - wlogout --protocol layer-shell -b 3 -T $(awk "BEGIN {printf \"%.0f\", $A_2160 * 2160 * $hypr_scale / $resolution}") -B $(awk "BEGIN {printf \"%.0f\", $B_2160 * 2160 * $hypr_scale / $resolution}") & - echo "Setting parameters for resolution >= 2160p" -elif ((resolution >= 1440)); then - wlogout --protocol layer-shell -b 6 -T $(awk "BEGIN {printf \"%.0f\", $A_1440 * 1440 * $hypr_scale / $resolution}") -B $(awk "BEGIN {printf \"%.0f\", $B_1440 * 1440 * $hypr_scale / $resolution}") & - echo "Setting parameters for resolution >= 1440p" -elif ((resolution >= 1080)); then - wlogout --protocol layer-shell -b 6 -T $(awk "BEGIN {printf \"%.0f\", $A_1080 * 1080 * $hypr_scale / $resolution}") -B $(awk "BEGIN {printf \"%.0f\", $B_1080 * 1080 * $hypr_scale / $resolution}") & - echo "Setting parameters for resolution >= 1080p" -elif ((resolution > 720)); then - wlogout --protocol layer-shell -b 3 -T $(awk "BEGIN {printf \"%.0f\", $A_720 * 720 * $hypr_scale / $resolution}") -B $(awk "BEGIN {printf \"%.0f\", $B_720 * 720 * $hypr_scale / $resolution}") & - echo "Setting parameters for resolution >= 720p" + T_val=$(awk "BEGIN {printf \"%.0f\", $A_2160 * 2160 * $hypr_scale / $resolution}") + B_val=$(awk "BEGIN {printf \"%.0f\", $B_2160 * 2160 * $hypr_scale / $resolution}") + echo "Setting parameters for resolution >= 4k" + wlogout --protocol layer-shell -b 6 -T $T_val -B $B_val & +elif ((resolution >= 1600 && resolution < 2160)); then + T_val=$(awk "BEGIN {printf \"%.0f\", $A_1600 * 1600 * $hypr_scale / $resolution}") + B_val=$(awk "BEGIN {printf \"%.0f\", $B_1600 * 1600 * $hypr_scale / $resolution}") + echo "Setting parameters for resolution >= 2.5k and < 4k" + wlogout --protocol layer-shell -b 6 -T $T_val -B $B_val & +elif ((resolution >= 1440 && resolution < 1600)); then + T_val=$(awk "BEGIN {printf \"%.0f\", $A_1440 * 1440 * $hypr_scale / $resolution}") + B_val=$(awk "BEGIN {printf \"%.0f\", $B_1440 * 1440 * $hypr_scale / $resolution}") + echo "Setting parameters for resolution >= 2k and < 2.5k" + wlogout --protocol layer-shell -b 6 -T $T_val -B $B_val & +elif ((resolution >= 1080 && resolution < 1440)); then + T_val=$(awk "BEGIN {printf \"%.0f\", $A_1080 * 1080 * $hypr_scale / $resolution}") + B_val=$(awk "BEGIN {printf \"%.0f\", $B_1080 * 1080 * $hypr_scale / $resolution}") + echo "Setting parameters for resolution >= 1080p and < 2k" + wlogout --protocol layer-shell -b 3 -T $T_val -B $B_val & +elif ((resolution >= 720 && resolution < 1080)); then + T_val=$(awk "BEGIN {printf \"%.0f\", $A_720 * 720 * $hypr_scale / $resolution}") + B_val=$(awk "BEGIN {printf \"%.0f\", $B_720 * 720 * $hypr_scale / $resolution}") + echo "Setting parameters for resolution >= 720p and < 1080p" + wlogout --protocol layer-shell -b 3 -T $T_val -B $B_val & else + echo "Setting default parameters" wlogout & - echo "Setting default parameters for resolution <= 720p" -fi \ No newline at end of file +fi diff --git a/config/waybar/modules b/config/waybar/modules index f42f89d0..a2357e20 100644 --- a/config/waybar/modules +++ b/config/waybar/modules @@ -192,7 +192,7 @@ "critical": 15 }, "format": "{icon} {capacity}%", - "format-charging": "{capacity}%", + "format-charging": " {capacity}%", "format-plugged": "󱘖 {capacity}%", "format-alt-click": "click", "format-full": "{icon} Full", -- cgit v1.2.3