Switch to AGS v1.9.0 (#1092)

and switch bin name for [preparing migrating to agsv2](https://github.com/Aylur/ags/issues/618#issuecomment-2476866842)
This commit is contained in:
clsty
2025-02-10 09:04:28 +08:00
parent 44e29ab974
commit 285f817728
10 changed files with 94 additions and 33 deletions
@@ -164,8 +164,8 @@ apply_gtk() { # Using gradience-cli
}
apply_ags() {
ags run-js "handleStyles(false);"
ags run-js 'openColorScheme.value = true; Utils.timeout(2000, () => openColorScheme.value = false);'
agsv1 run-js "handleStyles(false);"
agsv1 run-js 'openColorScheme.value = true; Utils.timeout(2000, () => openColorScheme.value = false);'
}
apply_qt() {
@@ -17,8 +17,8 @@ switch() {
exit 0
fi
# ags run-js "wallpaper.set('')"
# sleep 0.1 && ags run-js "wallpaper.set('${imgpath}')" &
# agsv1 run-js "wallpaper.set('')"
# sleep 0.1 && agsv1 run-js "wallpaper.set('${imgpath}')" &
swww img "$imgpath" --transition-step 100 --transition-fps 120 \
--transition-type grow --transition-angle 30 --transition-duration 1 \
--transition-pos "$cursorposx, $cursorposy_inverted"
@@ -26,7 +26,7 @@ switch() {
if [ "$1" == "--noswitch" ]; then
imgpath=$(swww query | awk -F 'image: ' '{print $2}')
# imgpath=$(ags run-js 'wallpaper.get(0)')
# imgpath=$(agsv1 run-js 'wallpaper.get(0)')
elif [[ "$1" ]]; then
switch "$1"
else
+1 -1
View File
@@ -1,7 +1,7 @@
# Bar, wallpaper
exec-once = swww-daemon --format xrgb
exec-once = /usr/lib/geoclue-2.0/demos/agent & gammastep
exec-once = ags &
exec-once = agsv1 &
# Input method
exec-once = fcitx5
+20 -20
View File
@@ -39,7 +39,7 @@ bind = Super+Alt, R, exec, ~/.config/ags/scripts/record-script.sh # Record regio
bind = Ctrl+Alt, R, exec, ~/.config/ags/scripts/record-script.sh --fullscreen # [hidden] Record screen (no sound)
bind = Super+Shift+Alt, R, exec, ~/.config/ags/scripts/record-script.sh --fullscreen-sound # Record screen (with sound)
##! Session
bind = Ctrl+Super, L, exec, ags run-js 'lock.lock()' # [hidden]
bind = Ctrl+Super, L, exec, agsv1 run-js 'lock.lock()' # [hidden]
bind = Super, L, exec, loginctl lock-session # Lock
bind = Super+Shift, L, exec, loginctl lock-session # [hidden]
bindl = Super+Shift, L, exec, sleep 0.1 && systemctl suspend || loginctl suspend # Suspend system
@@ -150,25 +150,25 @@ bind = Alt, Tab, bringactivetotop, # [hidden] bring it to the top
#!
##! Widgets
bindr = Ctrl+Super, R, exec, killall ags ydotool; ags & # Restart widgets
bindr = Ctrl+Super+Alt, R, exec, hyprctl reload; killall ags ydotool; ags & # [hidden]
bind = Ctrl+Alt, Slash, exec, ags run-js 'cycleMode();' # Cycle bar mode (normal, focus)
bindir = Super, Super_L, exec, ags -t 'overview' # Toggle overview/launcher
bind = Super, Tab, exec, ags -t 'overview' # [hidden]
bind = Super, Slash, exec, for ((i=0; i<$(hyprctl monitors -j | jq length); i++)); do ags -t "cheatsheet""$i"; done # Show cheatsheet
bind = Super, B, exec, ags -t 'sideleft' # Toggle left sidebar
bind = Super, A, exec, ags -t 'sideleft' # [hidden]
bind = Super, O, exec, ags -t 'sideleft' # [hidden]
bind = Super, N, exec, ags -t 'sideright' # Toggle right sidebar
bind = Super, M, exec, ags run-js 'openMusicControls.value = (!mpris.getPlayer() ? false : !openMusicControls.value);' # Toggle music controls
bind = Super, Comma, exec, ags run-js 'openColorScheme.value = true; Utils.timeout(2000, () => openColorScheme.value = false);' # View color scheme and options
bind = Super, K, exec, for ((i=0; i<$(hyprctl monitors -j | jq length); i++)); do ags -t "osk""$i"; done # Toggle on-screen keyboard
bind = Ctrl+Alt, Delete, exec, for ((i=0; i<$(hyprctl monitors -j | jq length); i++)); do ags -t "session""$i"; done # Toggle power menu
bind = Ctrl+Super, G, exec, for ((i=0; i<$(hyprctl monitors -j | jq length); i++)); do ags -t "crosshair""$i"; done # Toggle crosshair
bindle=, XF86MonBrightnessUp, exec, ags run-js 'brightness.screen_value += 0.05; indicator.popup(1);' # [hidden]
bindle=, XF86MonBrightnessDown, exec, ags run-js 'brightness.screen_value -= 0.05; indicator.popup(1);' # [hidden]
bindl = , XF86AudioMute, exec, ags run-js 'indicator.popup(1);' # [hidden]
bindl = Super+Shift,M, exec, ags run-js 'indicator.popup(1);' # [hidden]
bindr = Ctrl+Super, R, exec, killall agsv1 ydotool; agsv1 & # Restart widgets
bindr = Ctrl+Super+Alt, R, exec, hyprctl reload; killall agsv1 ydotool; agsv1 & # [hidden]
bind = Ctrl+Alt, Slash, exec, agsv1 run-js 'cycleMode();' # Cycle bar mode (normal, focus)
bindir = Super, Super_L, exec, agsv1 -t 'overview' # Toggle overview/launcher
bind = Super, Tab, exec, agsv1 -t 'overview' # [hidden]
bind = Super, Slash, exec, for ((i=0; i<$(hyprctl monitors -j | jq length); i++)); do agsv1 -t "cheatsheet""$i"; done # Show cheatsheet
bind = Super, B, exec, agsv1 -t 'sideleft' # Toggle left sidebar
bind = Super, A, exec, agsv1 -t 'sideleft' # [hidden]
bind = Super, O, exec, agsv1 -t 'sideleft' # [hidden]
bind = Super, N, exec, agsv1 -t 'sideright' # Toggle right sidebar
bind = Super, M, exec, agsv1 run-js 'openMusicControls.value = (!mpris.getPlayer() ? false : !openMusicControls.value);' # Toggle music controls
bind = Super, Comma, exec, agsv1 run-js 'openColorScheme.value = true; Utils.timeout(2000, () => openColorScheme.value = false);' # View color scheme and options
bind = Super, K, exec, for ((i=0; i<$(hyprctl monitors -j | jq length); i++)); do agsv1 -t "osk""$i"; done # Toggle on-screen keyboard
bind = Ctrl+Alt, Delete, exec, for ((i=0; i<$(hyprctl monitors -j | jq length); i++)); do agsv1 -t "session""$i"; done # Toggle power menu
bind = Ctrl+Super, G, exec, for ((i=0; i<$(hyprctl monitors -j | jq length); i++)); do agsv1 -t "crosshair""$i"; done # Toggle crosshair
bindle=, XF86MonBrightnessUp, exec, agsv1 run-js 'brightness.screen_value += 0.05; indicator.popup(1);' # [hidden]
bindle=, XF86MonBrightnessDown, exec, agsv1 run-js 'brightness.screen_value -= 0.05; indicator.popup(1);' # [hidden]
bindl = , XF86AudioMute, exec, agsv1 run-js 'indicator.popup(1);' # [hidden]
bindl = Super+Shift,M, exec, agsv1 run-js 'indicator.popup(1);' # [hidden]
# Testing
# bind = SuperAlt, f12, exec, notify-send "Hyprland version: $(hyprctl version | head -2 | tail -1 | cut -f2 -d ' ')" "owo" -a 'Hyprland keybind'
@@ -0,0 +1,2 @@
/ags/
/libgnome-volume-control/
@@ -0,0 +1,56 @@
# Borrowed from https://github.com/kotontrion/PKGBUILDS/blob/main/agsv1/PKGBUILD
#
# Maintainer: kotontrion <kotontrion@tutanota.de>
# This package is only intended to be used while migrating from ags v1.8.2 to ags v2.0.0.
# Many ags configs are quite big and it takes a while to migrate, therefore I made this package
# to install ags v1.8.2 as "agsv1", so both versions can be installed at the same time, making it
# possible to migrate bit by bit while still having a working v1 config around.
#
# First update the aylurs-gtk-shell package to v2, then install this one.
#
# This package won't receive any updates anymore, so as soon as you migrated, uninstall this one.
pkgname=illogical-impulse-agsv1
_pkgname=ags
pkgver=1.9.0
pkgrel=1
pkgdesc="Aylurs's Gtk Shell (AGS), An eww inspired gtk widget system."
arch=('x86_64')
url="https://github.com/Aylur/ags"
license=('GPL-3.0-only')
makedepends=('git' 'gobject-introspection' 'meson' 'glib2-devel' 'npm' 'typescript')
depends=('gvfs' 'gjs' 'glib2' 'glib2-devel' 'glibc' 'gtk3' 'gtk-layer-shell' 'libpulse' 'pam' 'gnome-bluetooth-3.0' 'gammastep')
optdepends=('gnome-bluetooth-3.0: required for bluetooth service'
'greetd: required for greetd service'
'libdbusmenu-gtk3: required for systemtray service'
'libsoup3: required for the Utils.fetch feature'
'libnotify: required for sending notifications'
'networkmanager: required for network service'
'power-profiles-daemon: required for powerprofiles service'
'upower: required for battery service')
conflicts=('illogical-impulse-ags')
backup=('etc/pam.d/ags')
source=("$pkgname-$pkgver.tar.gz::https://github.com/Aylur/ags/archive/refs/tags/v${pkgver}.tar.gz"
"git+https://gitlab.gnome.org/GNOME/libgnome-volume-control")
sha256sums=('962f99dcf202eef30e978d1daedc7cdf213e07a3b52413c1fb7b54abc7bd08e6'
SKIP)
prepare() {
cd "$srcdir/$_pkgname-$pkgver"
mv -T "$srcdir"/libgnome-volume-control subprojects/gvc
}
build() {
cd "$srcdir/$_pkgname-$pkgver"
npm install
arch-meson build --libdir "lib/$_pkgname" -Dbuild_types=true
meson compile -C build
}
package() {
cd "$srcdir/$_pkgname-$pkgver"
meson install -C build --destdir "$pkgdir"
rm ${pkgdir}/usr/bin/ags
ln -sf /usr/share/com.github.Aylur.ags/com.github.Aylur.ags ${pkgdir}/usr/bin/agsv1
}
+1 -1
View File
@@ -101,7 +101,7 @@ install-local-pkgbuild() {
# Install core dependencies from the meta-packages
metapkgs=(./arch-packages/illogical-impulse-{audio,python,backlight,basic,fonts-themes,gnome,gtk,portal,screencapture,widgets})
metapkgs+=(./arch-packages/illogical-impulse-ags)
metapkgs+=(./arch-packages/illogical-impulse-agsv1)
metapkgs+=(./arch-packages/illogical-impulse-hyprland)
metapkgs+=(./arch-packages/illogical-impulse-microtex-git)
metapkgs+=(./arch-packages/illogical-impulse-oneui4-icons-git)
+1 -1
View File
@@ -10,7 +10,7 @@ source ./scriptdata/installers
source ./scriptdata/environment-variables
if command -v pacman >/dev/null 2>&1;then printf "\e[31m[$0]: pacman found, it seems that the system is ArchLinux or Arch-based distro. Aborting...\e[0m\n";exit 1;fi
install-ags
install-agsv1
install-Rubik
install-Gabarito
install-OneUI
+7 -5
View File
@@ -23,16 +23,18 @@ install-yay() {
}
# Not for Arch(based) distro.
install-ags (){
x mkdir -p $base/cache/ags
x cd $base/cache/ags
install-agsv1 (){
x mkdir -p $base/cache/agsv1
x cd $base/cache/agsv1
try git init -b main
try git remote add origin https://github.com/Aylur/ags.git
x git pull origin main && git submodule update --init --recursive
x git checkout 05e0f23534fa30c1db2a142664ee8f71e38db260
x git fetch --tags
x git checkout v1.9.0
x npm install
x meson setup build # --reconfigure
x meson install -C build
x sudo mv /usr/local/bin/ags{,v1}
x cd $base
}
@@ -146,7 +148,7 @@ install-python-packages (){
# Only for Arch(based) distro.
handle-deprecated-dependencies (){
printf "\e[36m[$0]: Removing deprecated dependencies:\e[0m\n"
for i in illogical-impulse-{microtex,pymyc-aur} {hyprutils,hyprpicker,hyprlang,hypridle,hyprland-qt-support,hyprland-qtutils,hyprlock,xdg-desktop-portal-hyprland,hyprcursor,hyprwayland-scanner,hyprland}-git;do try sudo pacman --noconfirm -Rdd $i;done
for i in illogical-impulse-{microtex,pymyc-aur,ags} {hyprutils,hyprpicker,hyprlang,hypridle,hyprland-qt-support,hyprland-qtutils,hyprlock,xdg-desktop-portal-hyprland,hyprcursor,hyprwayland-scanner,hyprland}-git;do try sudo pacman --noconfirm -Rdd $i;done
# Convert old dependencies to non explicit dependencies so that they can be orphaned if not in meta packages
remove_bashcomments_emptylines ./scriptdata/previous_dependencies.conf ./cache/old_deps_stripped.conf
readarray -t old_deps_list < ./cache/old_deps_stripped.conf
+1
View File
@@ -1,5 +1,6 @@
### This file contains a list of dependencies which were previously explicitly installed that are now installed using meta packages
### Must be one package per line as it needs to be compared against the explicitly installed list from pacman
illogical-impulse-ags
axel
bc
coreutils