ugh
This commit is contained in:
parent
d24af7bef5
commit
d0c8e279ca
6 changed files with 226 additions and 54 deletions
15
scripts/nirilof
Executable file
15
scripts/nirilof
Executable file
|
@ -0,0 +1,15 @@
|
|||
#/usr/bin/env nu
|
||||
|
||||
def main [app: string, command: string] {
|
||||
let open = try {
|
||||
niri msg --json windows | from json | where app_id == $app | get id | first
|
||||
} catch {
|
||||
0
|
||||
}
|
||||
|
||||
if $open > 0 {
|
||||
niri msg action focus-window --id $open
|
||||
} else {
|
||||
bash -c $"($command) &"
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue