Compare commits
2 Commits
7fe95c8b72
...
6a9d286e55
| Author | SHA1 | Date |
|---|---|---|
|
|
6a9d286e55 | |
|
|
a8e9a4b49b |
|
|
@ -48,7 +48,7 @@
|
|||
:orientation "h"
|
||||
:space-evenly false
|
||||
:halign "center"
|
||||
:onclick "hyprctl eval 'hl.dsp.focus({workspace=\"r-1\"})'"
|
||||
:onclick "~/.config/scripts/workspacefocus/focusleft.sh"
|
||||
{""}
|
||||
)
|
||||
|
||||
|
|
@ -78,7 +78,7 @@
|
|||
:orientation "h"
|
||||
:space-evenly false
|
||||
:halign "center"
|
||||
:onclick "hyprctl eval 'hl.dsp.focus({workspace=\"r+1\"})'"
|
||||
:onclick "~/.config/scripts/workspacefocus/focusright.sh"
|
||||
{""}
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -13,6 +13,14 @@ monitors_json=$(hyprctl monitors -j)
|
|||
|
||||
curmon=$(echo "$monitors_json" | jq -r '.[] | select(.focused) | .name')
|
||||
currot=$(echo "$monitors_json" | jq -r '.[] | select(.focused) | .transform')
|
||||
curscale=$(echo "$monitors_json" | jq -r '.[] | select(.focused) | .scale')
|
||||
curwidth=$(echo "$monitors_json" | jq -r '.[] | select(.focused) | .width')
|
||||
curheight=$(echo "$monitors_json" | jq -r '.[] | select(.focused) | .height')
|
||||
currefresh=$(echo "$monitors_json" | jq -r '.[] | select(.focused) | .refreshRate | round')
|
||||
curx=$(echo "$monitors_json" | jq -r '.[] | select(.focused) | .x')
|
||||
cury=$(echo "$monitors_json" | jq -r '.[] | select(.focused) | .y')
|
||||
|
||||
curmode="${curwidth}x${curheight}@${currefresh}"
|
||||
|
||||
# Calculate new rotation
|
||||
if [[ "$direction" == "cw" ]]; then
|
||||
|
|
@ -33,8 +41,8 @@ fi
|
|||
|
||||
echo "Rotating monitor '$curmon' from $currot to $newrot ($direction)"
|
||||
|
||||
# Apply new rotation to monitor (hyprctl keyword doesn't work with Lua config)
|
||||
hyprctl eval "hl.monitor({output='$curmon', transform=$newrot})"
|
||||
# Apply new rotation while preserving current mode and scale
|
||||
hyprctl eval "hl.monitor({output='$curmon', mode='$curmode', position='${curx}x${cury}', scale=$curscale, transform=$newrot})"
|
||||
|
||||
# Detect touchscreen device name
|
||||
touchdev=$(hyprctl devices -j | jq -r '.touch[0].name // empty')
|
||||
|
|
|
|||
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/bash
|
||||
|
||||
hyprctl dispatch 'hl.dsp.focus({ workspace = "r-1" })'
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/bash
|
||||
|
||||
hyprctl dispatch 'hl.dsp.focus({ workspace = "r+1" })'
|
||||
|
|
@ -140,5 +140,5 @@ end, { expr = true, silent = true })
|
|||
|
||||
-- CR confirms CoC selection
|
||||
vim.keymap.set("i", "<CR>", function()
|
||||
return vim.fn.pumvisible() == 1 and "<C-Y>" or "<CR>"
|
||||
end, { expr = true })
|
||||
return vim.fn["coc#pum#visible"]() == 1 and vim.fn["coc#pum#confirm"]() or "<CR>"
|
||||
end, { expr = true, silent = true })
|
||||
|
|
|
|||
Loading…
Reference in New Issue