diff --git a/.config/ags/variables.js b/.config/ags/variables.js index 4623c695d..a367114e1 100644 --- a/.config/ags/variables.js +++ b/.config/ags/variables.js @@ -1,13 +1,16 @@ import Variable from 'resource:///com/github/Aylur/ags/variable.js'; +import Mpris from 'resource:///com/github/Aylur/ags/service/mpris.js'; const { exec } = Utils; - +import Gdk from 'gi://Gdk'; // Global vars for external control (through keybinds) export const showMusicControls = Variable(false, {}) export const showColorScheme = Variable(false, {}) globalThis['openMusicControls'] = showMusicControls; globalThis['openColorScheme'] = showColorScheme; +globalThis['mpris'] = Mpris; // Screen size export const SCREEN_WIDTH = Number(exec(`bash -c "xrandr --current | grep '*' | uniq | awk '{print $1}' | cut -d 'x' -f1 | head -1" | awk '{print $1}'`)); export const SCREEN_HEIGHT = Number(exec(`bash -c "xrandr --current | grep '*' | uniq | awk '{print $1}' | cut -d 'x' -f2 | head -1" | awk '{print $1}'`)); + diff --git a/.config/hypr/hyprland/keybinds.conf b/.config/hypr/hyprland/keybinds.conf index ed0c7e841..275d0dba4 100644 --- a/.config/hypr/hyprland/keybinds.conf +++ b/.config/hypr/hyprland/keybinds.conf @@ -81,7 +81,7 @@ bind = Super, B, exec, ags -t 'sideleft' bind = Super, A, exec, ags -t 'sideleft' bind = Super, O, exec, ags -t 'sideleft' bind = Super, N, exec, ags -t 'sideright' -bind = Super, M, exec, ags run-js 'openMusicControls.value = (!Mpris.getPlayer() ? false : !openMusicControls.value);' +bind = Super, M, exec, ags run-js 'openMusicControls.value = (!mpris.getPlayer() ? false : !openMusicControls.value);' bind = Super, Comma, exec, ags run-js 'openColorScheme.value = true; Utils.timeout(2000, () => openColorScheme.value = false);' bind = Super, K, exec, ags -t 'osk' bind = Control+Alt, Delete, exec, ags -t 'session' @@ -198,3 +198,4 @@ bindle = Alt, K, exec, ydotool key 108:1 108:0 bindle = Alt, J, exec, ydotool key 105:1 105:0 bindle = Alt, L, exec, ydotool key 106:1 106:0 +