Merge branch 'retrozinndev:ryo' into ryo
This commit is contained in:
+4
-2
@@ -5,9 +5,11 @@ import AstalHyprland from "gi://AstalHyprland";
|
||||
import { execAsync } from "astal";
|
||||
|
||||
|
||||
export const uwsmIsActive: boolean = await execAsync(
|
||||
"uwsm check is-active hyprland-uwsm.desktop"
|
||||
).then(() => true).catch(() => false);
|
||||
const astalApps: AstalApps.Apps = new AstalApps.Apps();
|
||||
const uwsmIsActive: boolean = await execAsync("uwsm check is-active").then((stdout) =>
|
||||
/hyprland/gi.test(stdout)).catch(() => false);
|
||||
|
||||
let appsList: Array<AstalApps.Application> = astalApps.get_list();
|
||||
|
||||
export function getApps(): Array<AstalApps.Application> {
|
||||
|
||||
@@ -1,11 +1,17 @@
|
||||
import { monitorFile, Process } from "astal";
|
||||
import { execAsync, Gio, monitorFile } from "astal";
|
||||
import { App } from "astal/gtk3";
|
||||
import { uwsmIsActive } from "./apps";
|
||||
|
||||
const monitoringPaths = [ "./scripts", "./window", "./app.ts", "env.d.ts" ];
|
||||
|
||||
export function restartInstance(instanceName?: string): void {
|
||||
Process.exec_async(`astal -q ${ instanceName || App.instanceName || "astal" }`, () => {});
|
||||
Process.exec_async(`ags run`, () => {});
|
||||
execAsync(`astal -q ${ instanceName ?? App.instanceName ?? "astal" }`);
|
||||
Gio.Subprocess.new(
|
||||
( uwsmIsActive ?
|
||||
[ "uwsm", "app", "--", "ags", "run" ]
|
||||
: [ "ags", "run" ]),
|
||||
Gio.SubprocessFlags.STDOUT_PIPE | Gio.SubprocessFlags.STDERR_PIPE
|
||||
);
|
||||
}
|
||||
|
||||
export function monitorPaths(): void {
|
||||
|
||||
@@ -8,9 +8,9 @@
|
||||
# From: https://github.com/retrozinndev/colorshell
|
||||
|
||||
|
||||
if uwsm check is-active; then
|
||||
hyprctl dispatch exec "uwsm app -- $@" > /dev/null
|
||||
if uwsm check is-active "hyprland-uwsm.desktop"; then
|
||||
exec uwsm app -- "$@"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
hyprctl dispatch exec "$@" > /dev/null
|
||||
exec "$@"
|
||||
|
||||
@@ -14,8 +14,8 @@ exec-once = systemctl enable --user --now hyprsunset
|
||||
exec-once = systemctl enable --user --now hyprpaper
|
||||
|
||||
# Scripts
|
||||
exec-once = $exec sh $XDG_CONFIG_HOME/hypr/scripts/gen-pywal.sh
|
||||
exec-once = $exec sleep 3 && sh $XDG_CONFIG_HOME/hypr/scripts/load-hyprsunset.sh # wait some time to actually set the filters
|
||||
exec-once = sh $XDG_CONFIG_HOME/hypr/scripts/gen-pywal.sh
|
||||
exec-once = sleep 3 && sh $XDG_CONFIG_HOME/hypr/scripts/load-hyprsunset.sh # wait some time to actually set the filters
|
||||
|
||||
# Shell
|
||||
exec-once = $exec ags run
|
||||
|
||||
Reference in New Issue
Block a user