Skip to content

Commit 7be1e3c

Browse files
committed
oboro => [11 cantrips][1 hypr][1 library][1 spells]
1 parent 73bbc86 commit 7be1e3c

3 files changed

Lines changed: 16 additions & 2 deletions

File tree

cantrips/02-rename-ws.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,5 @@ elif pgrep herbstluftwm; then
3535
elif pgrep hyprland; then
3636
WS=$(hyprctl activeworkspace | head -n 1 | cut -d' ' -f3)
3737
WSNUM=$(hyprctl activeworkspace | head -n 1 | grep -oE '\([^)]+\)' | tr -d '()' | cut -d: -f1)
38-
hyprctl dispatch renameworkspace "$WS" "$WSNUM: $NEW"
38+
hyprctl dispatch "hl.dsp.workspace.rename({ workspace = '$WSNUM', name = '$WSNUM: $NEW' })"
3939
fi

spells/move-all-ws-to.spell

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
# Moves all workspaces (except 10) to another monitor
3+
4+
# hypr docs: https://alejandrominaya.github.io/hyprland-lua-docs/
5+
6+
monitor=$(hyprctl monitors | awk '$1 == "Monitor" {print $2}' | picker)
7+
8+
hyprctl eval "
9+
for _, w in pairs(hl.get_workspaces()) do
10+
if w.id > 0 and w.id ~= 10 and w.monitor.name ~= '$monitor' then
11+
hl.notification.create({ text = 'Moving '..w.id, duration = 10000 })
12+
hl.dispatch(hl.dsp.workspace.move({ workspace = w, monitor = '$monitor' }))
13+
end
14+
end
15+
"

spells/picker.spell

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#!/bin/bash
22

3-
set -x
43
use_tofi() {
54
args=(--fuzzy-match=true)
65
[ "$prompt" ] && args+=(--prompt "$prompt ")

0 commit comments

Comments
 (0)