forked from Shinonome/dots-hyprland
fix music controls keybind
This commit is contained in:
@@ -1,13 +1,16 @@
|
|||||||
import Variable from 'resource:///com/github/Aylur/ags/variable.js';
|
import Variable from 'resource:///com/github/Aylur/ags/variable.js';
|
||||||
|
import Mpris from 'resource:///com/github/Aylur/ags/service/mpris.js';
|
||||||
const { exec } = Utils;
|
const { exec } = Utils;
|
||||||
|
import Gdk from 'gi://Gdk';
|
||||||
|
|
||||||
// Global vars for external control (through keybinds)
|
// Global vars for external control (through keybinds)
|
||||||
export const showMusicControls = Variable(false, {})
|
export const showMusicControls = Variable(false, {})
|
||||||
export const showColorScheme = Variable(false, {})
|
export const showColorScheme = Variable(false, {})
|
||||||
globalThis['openMusicControls'] = showMusicControls;
|
globalThis['openMusicControls'] = showMusicControls;
|
||||||
globalThis['openColorScheme'] = showColorScheme;
|
globalThis['openColorScheme'] = showColorScheme;
|
||||||
|
globalThis['mpris'] = Mpris;
|
||||||
|
|
||||||
// Screen size
|
// 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_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}'`));
|
export const SCREEN_HEIGHT = Number(exec(`bash -c "xrandr --current | grep '*' | uniq | awk '{print $1}' | cut -d 'x' -f2 | head -1" | awk '{print $1}'`));
|
||||||
|
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ bind = Super, B, exec, ags -t 'sideleft'
|
|||||||
bind = Super, A, exec, ags -t 'sideleft'
|
bind = Super, A, exec, ags -t 'sideleft'
|
||||||
bind = Super, O, exec, ags -t 'sideleft'
|
bind = Super, O, exec, ags -t 'sideleft'
|
||||||
bind = Super, N, exec, ags -t 'sideright'
|
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, Comma, exec, ags run-js 'openColorScheme.value = true; Utils.timeout(2000, () => openColorScheme.value = false);'
|
||||||
bind = Super, K, exec, ags -t 'osk'
|
bind = Super, K, exec, ags -t 'osk'
|
||||||
bind = Control+Alt, Delete, exec, ags -t 'session'
|
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, J, exec, ydotool key 105:1 105:0
|
||||||
bindle = Alt, L, exec, ydotool key 106:1 106:0
|
bindle = Alt, L, exec, ydotool key 106:1 106:0
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user