diff --git a/config/ags/js/bar/battery.js b/config/ags/js/bar/battery.js index 3dee2b2..de4727b 100644 --- a/config/ags/js/bar/battery.js +++ b/config/ags/js/bar/battery.js @@ -1,4 +1,3 @@ -const { Battery } = ags.Service; const { Label, Icon, Stack, ProgressBar, Overlay, Box } = ags.Widget; import { Separator } from '../common.js'; const { exec } = ags.Utils; diff --git a/config/ags/js/bar/heart.js b/config/ags/js/bar/heart.js index 8a6d50e..6b9a2a8 100644 --- a/config/ags/js/bar/heart.js +++ b/config/ags/js/bar/heart.js @@ -20,7 +20,7 @@ export const Heart = EventBox({ className: 'toggle-off', halign: 'center', onPrimaryClickRelease: () => { - exec('/home/matt/.nix/config/ags/bin/heart.sh toggle'); + exec("bash -c '$AGS_PATH/heart.sh toggle'"); }, child: Box({ className: 'heart-toggle', diff --git a/config/ags/js/bar/notif-button.js b/config/ags/js/bar/notif-button.js index dd9ee14..943faba 100644 --- a/config/ags/js/bar/notif-button.js +++ b/config/ags/js/bar/notif-button.js @@ -4,13 +4,13 @@ import { EventBox } from '../common.js'; const deflisten = subprocess; deflisten( - ['bash', '-c', '/home/matt/.nix/config/ags/bin/notif.sh icon'], + ['bash', '-c', '$AGS_PATH/notif.sh icon'], (output) => { NotifButton.child.children[0].label = ' ' + output; }, ); deflisten( - ['bash', '-c', '/home/matt/.nix/config/ags/bin/notif-toggle.sh state'], + ['bash', '-c', '$AGS_PATH/notif-toggle.sh state'], (output) => { print(output) if (output == 'On') { @@ -24,7 +24,7 @@ export const NotifButton = EventBox({ className: 'toggle-off', onPrimaryClickRelease: function() { subprocess( - ['bash', '-c', '/home/matt/.nix/config/ags/bin/notif-toggle.sh toggle'], + ['bash', '-c', '$AGS_PATH/notif-toggle.sh toggle'], (output) => { print(output) if (output == 'On') { diff --git a/config/ags/js/bar/osk-toggle.js b/config/ags/js/bar/osk-toggle.js index 3b9b8ad..16d801b 100644 --- a/config/ags/js/bar/osk-toggle.js +++ b/config/ags/js/bar/osk-toggle.js @@ -5,7 +5,7 @@ const deflisten = subprocess; import { EventBox } from '../common.js'; deflisten( - ['bash', '-c', '/home/matt/.nix/config/ags/bin/osk-toggle.sh getState'], + ['bash', '-c', '$AGS_PATH/osk-toggle.sh getState'], (output) => { if (output == 'Running') { OskToggle.toggleClassName('toggle-on', true); @@ -18,7 +18,7 @@ export const OskToggle = EventBox({ className: 'toggle-off', onPrimaryClickRelease: function() { subprocess( - ['bash', '-c', '/home/matt/.nix/config/ags/bin/osk-toggle.sh toggle'], + ['bash', '-c', '$AGS_PATH/osk-toggle.sh toggle'], (output) => { if (output == 'Running') { OskToggle.toggleClassName('toggle-on', false); diff --git a/config/ags/js/bar/quick-settings.js b/config/ags/js/bar/quick-settings.js index 18ea78e..c27c1ab 100644 --- a/config/ags/js/bar/quick-settings.js +++ b/config/ags/js/bar/quick-settings.js @@ -4,7 +4,7 @@ import { EventBox } from '../common.js'; const deflisten = subprocess; deflisten( - ['bash', '-c', '/home/matt/.nix/config/ags/bin/qs-toggle.sh state'], + ['bash', '-c', '$AGS_PATH/qs-toggle.sh state'], (output) => { print(output) if (output == 'On') { @@ -18,7 +18,7 @@ export const QsToggle = EventBox({ className: 'toggle-off', onPrimaryClickRelease: function() { subprocess( - ['bash', '-c', '/home/matt/.nix/config/ags/bin/qs-toggle.sh toggle'], + ['bash', '-c', '$AGS_PATH/qs-toggle.sh toggle'], (output) => { print(output) if (output == 'On') { diff --git a/config/ags/js/bar/tablet-toggle.js b/config/ags/js/bar/tablet-toggle.js index e6628ba..7572a8d 100644 --- a/config/ags/js/bar/tablet-toggle.js +++ b/config/ags/js/bar/tablet-toggle.js @@ -7,7 +7,7 @@ export const TabletToggle = EventBox({ className: 'toggle-off', onPrimaryClickRelease: function() { subprocess( - ['bash', '-c', '/home/matt/.nix/config/ags/bin/tablet-toggle.sh toggle'], + ['bash', '-c', '$AGS_PATH/tablet-toggle.sh toggle'], (output) => { print(output) if (output == 'Tablet') { diff --git a/config/ags/js/powermenu.js b/config/ags/js/powermenu.js index b9c2db3..f43f2ed 100644 --- a/config/ags/js/powermenu.js +++ b/config/ags/js/powermenu.js @@ -9,7 +9,7 @@ export const Powermenu = ags.Widget.Window({ startWidget: ags.Widget.Button({ className: 'shutdown', - onPrimaryClickRelease: 'echo shutdown', + onPrimaryClickRelease: 'systemctl poweroff', child: ags.Widget.Label({ label: '襤', @@ -18,7 +18,7 @@ export const Powermenu = ags.Widget.Window({ centerWidget: ags.Widget.Button({ className: 'reboot', - onPrimaryClickRelease: 'echo reboot', + onPrimaryClickRelease: 'systemctl reboot', child: ags.Widget.Label({ label: '勒', @@ -27,7 +27,7 @@ export const Powermenu = ags.Widget.Window({ endWidget: ags.Widget.Button({ className: 'logout', - onPrimaryClickRelease: 'echo logout', + onPrimaryClickRelease: 'hyprctl dispatch exit', child: ags.Widget.Label({ label: '', diff --git a/config/hypr/main.conf b/config/hypr/main.conf index ab3fc44..a1bcefd 100644 --- a/config/hypr/main.conf +++ b/config/hypr/main.conf @@ -173,7 +173,7 @@ bind = $mainMod, T, togglespecialworkspace, thunder bind = $mainMod, C, killactive, bind = $mainMod, L, exec, $LOCK_PATH/lock.sh -bind = $mainMod SHIFT, E, exec, eww open closer && $EWW_PATH/open.sh powermenu +bind = $mainMod SHIFT, E, exec, ags toggle-window powermenu bindn =, Escape, exec, $EWW_PATH/close-opened.sh bind = $mainMod SHIFT, SPACE, togglefloating, bind = $mainMod, D, exec, wofi --show drun diff --git a/nixos/home/hyprland.nix b/nixos/home/hyprland.nix index af9e68f..360248a 100644 --- a/nixos/home/hyprland.nix +++ b/nixos/home/hyprland.nix @@ -33,6 +33,7 @@ in env = XDG_DATA_DIRS, ${pkgs.gsettings-desktop-schemas}/share/gsettings-schemas/${pkgs.gsettings-desktop-schemas.name}:${pkgs.gtk3}/share/gsettings-schemas/${pkgs.gtk3.name}:$XDG_DATA_DIRS $kora = "$HOME/.config/share" + env = AGS_PATH, ${configDir}/ags/bin env = EWW_PATH, ${configDir}/eww/scripts env = HYPR_PATH, ${configDir}/hypr/scripts env = LOCK_PATH, ${configDir}/gtklock/scripts