feat(ags): add path variable and use powermenu widget
This commit is contained in:
parent
087901b2d6
commit
59ae78fb54
9 changed files with 14 additions and 14 deletions
|
@ -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;
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -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') {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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') {
|
||||
|
|
|
@ -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') {
|
||||
|
|
|
@ -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: '',
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue