Compare commits

..

No commits in common. "6a9d286e5565b4bbb63f1813a92613b821c7d2a3" and "7fe95c8b72495035a97dab6b003e18d9b1fd70d1" have entirely different histories.

5 changed files with 6 additions and 20 deletions

View File

@ -48,7 +48,7 @@
:orientation "h"
:space-evenly false
:halign "center"
:onclick "~/.config/scripts/workspacefocus/focusleft.sh"
:onclick "hyprctl eval 'hl.dsp.focus({workspace=\"r-1\"})'"
{""}
)
@ -78,7 +78,7 @@
:orientation "h"
:space-evenly false
:halign "center"
:onclick "~/.config/scripts/workspacefocus/focusright.sh"
:onclick "hyprctl eval 'hl.dsp.focus({workspace=\"r+1\"})'"
{""}
)

View File

@ -13,14 +13,6 @@ 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
@ -41,8 +33,8 @@ fi
echo "Rotating monitor '$curmon' from $currot to $newrot ($direction)"
# 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})"
# Apply new rotation to monitor (hyprctl keyword doesn't work with Lua config)
hyprctl eval "hl.monitor({output='$curmon', transform=$newrot})"
# Detect touchscreen device name
touchdev=$(hyprctl devices -j | jq -r '.touch[0].name // empty')

View File

@ -1,3 +0,0 @@
#!/bin/bash
hyprctl dispatch 'hl.dsp.focus({ workspace = "r-1" })'

View File

@ -1,3 +0,0 @@
#!/bin/bash
hyprctl dispatch 'hl.dsp.focus({ workspace = "r+1" })'

View File

@ -140,5 +140,5 @@ end, { expr = true, silent = true })
-- CR confirms CoC selection
vim.keymap.set("i", "<CR>", function()
return vim.fn["coc#pum#visible"]() == 1 and vim.fn["coc#pum#confirm"]() or "<CR>"
end, { expr = true, silent = true })
return vim.fn.pumvisible() == 1 and "<C-Y>" or "<CR>"
end, { expr = true })