From f70bd9f21932014c988ccef7d29bf9289f62e565 Mon Sep 17 00:00:00 2001 From: Franek Date: Sat, 3 May 2025 08:42:15 +0200 Subject: [PATCH] Properly fix live CSS reloading & remove deprecated colors in Hyprlock --- .gitignore | 2 +- ags/app.ts | 6 +++-- ags/styles/components/_bar.scss | 2 +- ags/styles/components/_battery_info.scss | 4 ++-- ags/styles/components/_clipboard.scss | 2 +- ags/styles/components/_launcher.scss | 4 ++-- ags/styles/components/_quick_settings.scss | 2 +- ags/styles/style.scss | 2 +- ags/styles/theme_colors.scss | 1 + hypr/hyprlock.conf | 26 ++-------------------- hypr/hyprpaper.conf | 2 +- 11 files changed, 17 insertions(+), 36 deletions(-) create mode 120000 ags/styles/theme_colors.scss diff --git a/.gitignore b/.gitignore index 7a27d81..42a8d67 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,7 @@ # AGS node_modules/ @girs/ -styles/colors.scss # Hyprland hyprland.conf +hyprpaper.conf diff --git a/ags/app.ts b/ags/app.ts index 5f16882..67ee1ee 100644 --- a/ags/app.ts +++ b/ags/app.ts @@ -30,9 +30,11 @@ const setupBars = async (monitor_id: number) => { return windows; }; -const STYLES = `${GLib.get_user_config_dir()}/theme_colors.scss`; +const STYLES = GLib.get_user_config_dir() + "/ags/styles/style.scss"; +const THEME_COLORS_PATH = GLib.get_user_config_dir() + "/theme_colors.scss"; + const monitorCSS = () => monitorFile( - STYLES, + THEME_COLORS_PATH, () => { exec(`sass ${STYLES} /tmp/ags-style.css`); App.apply_css('/tmp/ags-style.css', true); diff --git a/ags/styles/components/_bar.scss b/ags/styles/components/_bar.scss index 0d0d05d..aaf91df 100644 --- a/ags/styles/components/_bar.scss +++ b/ags/styles/components/_bar.scss @@ -1,4 +1,4 @@ -@use '../../../theme_colors.scss' as *; +@use '../theme_colors.scss' as *; window.bar { font-weight: bold; diff --git a/ags/styles/components/_battery_info.scss b/ags/styles/components/_battery_info.scss index 1e79d3d..dfa446a 100644 --- a/ags/styles/components/_battery_info.scss +++ b/ags/styles/components/_battery_info.scss @@ -1,4 +1,4 @@ -@use '../../../theme_colors.scss' as *; +@use '../theme_colors.scss' as *; window.battery_info { font-weight: bold; @@ -53,4 +53,4 @@ window.battery_info button { color: $base0B; } } -} \ No newline at end of file +} diff --git a/ags/styles/components/_clipboard.scss b/ags/styles/components/_clipboard.scss index a34ee65..87cc45d 100644 --- a/ags/styles/components/_clipboard.scss +++ b/ags/styles/components/_clipboard.scss @@ -1,4 +1,4 @@ -@use '../../../theme_colors.scss' as *; +@use '../theme_colors.scss' as *; .clipboard { entry { diff --git a/ags/styles/components/_launcher.scss b/ags/styles/components/_launcher.scss index 7de36e8..b36eaf9 100644 --- a/ags/styles/components/_launcher.scss +++ b/ags/styles/components/_launcher.scss @@ -1,4 +1,4 @@ -@use '../../../theme_colors.scss' as *; +@use '../theme_colors.scss' as *; .launcher { entry { @@ -56,4 +56,4 @@ margin-bottom: 8px; } } -} \ No newline at end of file +} diff --git a/ags/styles/components/_quick_settings.scss b/ags/styles/components/_quick_settings.scss index 1711221..c7e4834 100644 --- a/ags/styles/components/_quick_settings.scss +++ b/ags/styles/components/_quick_settings.scss @@ -1,4 +1,4 @@ -@use '../../../theme_colors.scss' as *; +@use '../theme_colors.scss' as *; window.quick_settings { font-weight: bold; diff --git a/ags/styles/style.scss b/ags/styles/style.scss index 6ff7fbd..6e7bb1b 100644 --- a/ags/styles/style.scss +++ b/ags/styles/style.scss @@ -1,4 +1,4 @@ -@use '../../../theme_colors.scss' as *; +@use './theme_colors.scss' as *; @use 'variables' as *; @use 'mixins'; diff --git a/ags/styles/theme_colors.scss b/ags/styles/theme_colors.scss new file mode 120000 index 0000000..228e127 --- /dev/null +++ b/ags/styles/theme_colors.scss @@ -0,0 +1 @@ +/home/sadorowo/.config/theme_colors.scss \ No newline at end of file diff --git a/hypr/hyprlock.conf b/hypr/hyprlock.conf index 5867556..c3b3b32 100644 --- a/hypr/hyprlock.conf +++ b/hypr/hyprlock.conf @@ -1,5 +1,3 @@ -source = $HOME/.cache/wal/colors-hyprland.conf - general { enable_fingerprint = true fingerprint_ready_message = Place your finger on the sensor @@ -7,19 +5,14 @@ general { } background { - monitor = - path = screenshot - blur_passes = 1 + blur_passes = 2 contrast = 0.8 brightness = 0.4 - vibrancy = 0.1 - vibrancy_darkness = 0.4 } label { monitor = text = cmd[update:1000] echo $(date +"%H") - color = $color5 font_size = 180 font_family = SF Mono Black @@ -31,7 +24,6 @@ label { label { monitor = text = cmd[update:1000] echo $(date +"%M") - color = $color6 font_size = 100 font_family = SF Mono Black @@ -43,7 +35,6 @@ label { label { monitor = text = cmd[update:1000] echo $(date +"%S") - color = $color6 font_size = 60 font_family = SF Mono Black @@ -52,24 +43,12 @@ label { valign = center } -label { - monitor = - text = $FPRINTMESSAGE - color = $color6 - font_size = 15 - - position = 0, 100 - halign = center - valign = bottom -} - input-field { monitor = size = 250, 50 dots_size = 0.1 dots_spacing = 0.3 - font_color = $color6 - #fade_on_empty = true + fade_on_empty = true position = 0, 140 halign = center @@ -79,7 +58,6 @@ input-field { label { monitor = text = cmd[update:9000000] echo "$(curl -s 'wttr.in?format=%t' | tr -d '+')" - color = $color0 font_size = 24 font_family = SFMono Nerd Font diff --git a/hypr/hyprpaper.conf b/hypr/hyprpaper.conf index 773a283..3c82326 120000 --- a/hypr/hyprpaper.conf +++ b/hypr/hyprpaper.conf @@ -1 +1 @@ -/nix/store/bwhz6gwfbpjfyi8669nmdisr8vlcvrvs-home-manager-files/.config/hypr/hyprpaper.conf \ No newline at end of file +/nix/store/89nadapq2lq48hfm9v2a1zzd759n5pw4-home-manager-files/.config/hypr/hyprpaper.conf \ No newline at end of file