mirror of
https://forge.katzen.cafe/schrottkatze/nix-configs.git
synced 2024-12-23 09:45:52 +01:00
19 lines
348 B
Text
19 lines
348 B
Text
|
#!/usr/bin/env nu
|
||
|
|
||
|
def main [ ] {
|
||
|
let reg = (
|
||
|
xwininfo -id (xdotool getactivewindow)
|
||
|
| lines
|
||
|
| parse '{key}: {value}'
|
||
|
| str trim
|
||
|
| get value
|
||
|
| echo {
|
||
|
x: $in.1
|
||
|
y: $in.2
|
||
|
w: $in.5
|
||
|
h: $in.6
|
||
|
}
|
||
|
);
|
||
|
|
||
|
flameshot gui --region $"($reg.w)x($reg.h)+($reg.x)+($reg.y)" -c -p ~/Pictures/screenshots
|
||
|
}
|