mirror of
https://github.com/xsghetti/HyprCrux.git
synced 2025-07-03 13:50:38 -04:00
updates
This commit is contained in:
parent
1f8cb3c145
commit
610604e80f
253 changed files with 27055 additions and 44 deletions
30
.config/ags/variables.js
Normal file
30
.config/ags/variables.js
Normal file
|
@ -0,0 +1,30 @@
|
|||
const { Gtk } = imports.gi;
|
||||
import Variable from 'resource:///com/github/Aylur/ags/variable.js';
|
||||
import Mpris from 'resource:///com/github/Aylur/ags/service/mpris.js';
|
||||
import * as Utils from 'resource:///com/github/Aylur/ags/utils.js';
|
||||
const { exec, execAsync } = Utils;
|
||||
|
||||
Gtk.IconTheme.get_default().append_search_path(`${App.configDir}/assets/icons`);
|
||||
|
||||
// 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}'`));
|
||||
|
||||
// Mode switching
|
||||
export const currentShellMode = Variable('normal', {}) // normal, focus
|
||||
globalThis['currentMode'] = currentShellMode;
|
||||
globalThis['cycleMode'] = () => {
|
||||
if (currentShellMode.value === 'normal') {
|
||||
currentShellMode.value = 'focus';
|
||||
} else {
|
||||
currentShellMode.value = 'normal';
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue