mirror of
https://github.com/librephoenix/nixos-config
synced 2025-10-19 10:04:03 +05:30
open in workspace underneath ranger scratch term by default
This commit is contained in:
parent
6aafa4a6af
commit
19487cb432
2 changed files with 70 additions and 57 deletions
|
@ -485,6 +485,21 @@ in
|
|||
#!/bin/sh
|
||||
hyprctl monitors -j | jq ".[$1] | .activeWorkspace.id"
|
||||
'')
|
||||
(pkgs.writeScriptBin "open-under-ranger" ''
|
||||
#!/bin/sh
|
||||
command="$1"
|
||||
echo $command
|
||||
file="''${*:2}"
|
||||
file=''${file// /\\ }
|
||||
echo $file
|
||||
workspace=$(hyprctl monitors -j | jq ".[] | select(.specialWorkspace.name == \"special:scratch_ranger\") | .activeWorkspace.id")
|
||||
if [ -z "''${workspace}" ]; then
|
||||
hyprctl dispatch exec -- "$command";
|
||||
else
|
||||
hyprctl dispatch exec "[workspace $workspace]" -- "$command" "$file";
|
||||
fi
|
||||
hyprctl dispatch togglespecialworkspace scratch_ranger
|
||||
'')
|
||||
(pkgs.writeScriptBin "screenshot-ocr" ''
|
||||
#!/bin/sh
|
||||
imgname="/tmp/screenshot-ocr-$(date +%Y%m%d%H%M%S).png"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue