From b8991d38936680885874cb97fc194b86799aa7cd Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Tue, 23 Jan 2024 12:00:37 +0700 Subject: [PATCH] back to swww (for performance) --- .config/ags/config.js | 4 ++-- .../ags/scripts/color_generation/generate_colors_material.py | 3 ++- .config/ags/scripts/color_generation/switchwall.sh | 3 ++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.config/ags/config.js b/.config/ags/config.js index f0df524c7..40e9ede28 100644 --- a/.config/ags/config.js +++ b/.config/ags/config.js @@ -6,7 +6,7 @@ import * as Utils from 'resource:///com/github/Aylur/ags/utils.js' // Widgets import { Bar, BarCornerTopleft, BarCornerTopright } from './widgets/bar/main.js'; import Cheatsheet from './widgets/cheatsheet/main.js'; -import DesktopBackground from './widgets/desktopbackground/main.js'; +// import DesktopBackground from './widgets/desktopbackground/main.js'; // import Dock from './widgets/dock/main.js'; import Corner from './widgets/screencorners/main.js'; import Indicator from './widgets/indicators/main.js'; @@ -34,7 +34,7 @@ function applyStyle() { applyStyle(); const Windows = () => [ - forMonitors(DesktopBackground), + // forMonitors(DesktopBackground), // Dock(), Overview(), forMonitors(Indicator), diff --git a/.config/ags/scripts/color_generation/generate_colors_material.py b/.config/ags/scripts/color_generation/generate_colors_material.py index 99363b5c3..4af7dd5c9 100755 --- a/.config/ags/scripts/color_generation/generate_colors_material.py +++ b/.config/ags/scripts/color_generation/generate_colors_material.py @@ -34,7 +34,8 @@ elif len(sys.argv) > 1 and sys.argv[1] == '--color': newtheme = themeFromSourceColor(argbFromHex(colorstr)) else: # try: - imagePath = subprocess.check_output("ags run-js 'wallpaper.get(0)'", shell=True) + # imagePath = subprocess.check_output("ags run-js 'wallpaper.get(0)'", shell=True) + imagePath = subprocess.check_output("swww query | awk -F 'image: ' '{print $2}'", shell=True) imagePath = imagePath[:-1].decode("utf-8") img = Image.open(imagePath) basewidth = 64 diff --git a/.config/ags/scripts/color_generation/switchwall.sh b/.config/ags/scripts/color_generation/switchwall.sh index 84f109e42..30cf01baf 100755 --- a/.config/ags/scripts/color_generation/switchwall.sh +++ b/.config/ags/scripts/color_generation/switchwall.sh @@ -1,7 +1,8 @@ #!/usr/bin/bash if [ "$1" == "--noswitch" ]; then - imgpath=$(ags run-js 'wallpaper.get(0)') + imgpath=$(swww query | awk -F 'image: ' '{print $2}') + # imgpath=$(ags run-js 'wallpaper.get(0)') else # Select and set image (hyprland) cd "$HOME/Pictures"