Add iio-lock plugin for orientation locking (#13)
* Made a iio-hyprland plugin for noctalia kill iio-hyprland and restart it depending on the locked setting. The plugin has: -control center toggle -Bar wigdet for toggle of state --If rigth clicked this wigdet will open the panel -Panel for calling by msg --Panel also added possibally to specify lock direction -Bar wiget for open panel --Useful for touch - Tested with hyprland 0.55.4 and noctalia v5.0.0 - Should work with sway using iio-sway (not tested) * add en.json to translation unify settings keys for consistent naming update names add iio-service so tools work independently refactor code for readability and remove unused logic update readme add thumbnail * Updated plugin.toml names Reworked panel code * bump version * Make arrow buttons apply relative orientation instead of fixed original directions * fixed wrong labels * Delete iio_lock/iio_lock.luau * Delete iio_lock/iio_panel.luau * Delete iio_lock/shortcut.luau * make noctalia.getConfig the sole config accessor --------- Co-authored-by: Lemmy <studio@quadbyte.net>
This commit is contained in:
co-authored by
Lemmy
parent
2d637f9651
commit
ae06d34fcb
@@ -0,0 +1,95 @@
|
||||
id = "nikolaj-zwergius/iio_lock"
|
||||
name = "iio-lock"
|
||||
version = "1.0.0"
|
||||
min_noctalia = "5.0.0"
|
||||
author = "nikolaj-zwergius"
|
||||
license = "MIT"
|
||||
dependencies = ["pgrep","pkill","iio-hyprland","iio-sway","hyprctl","swaymsg"]
|
||||
tags = ["hyprland","sway","desktop","utility"]
|
||||
icon = "lock"
|
||||
description = "Orientation lock for 2‑in‑1 devices using iio-hyprland and similar."
|
||||
|
||||
|
||||
[[setting]]
|
||||
key = "iio"
|
||||
type = "select"
|
||||
label_key = "settings.iio.label"
|
||||
description_key = "settings.iio.description"
|
||||
default = "iio-hyprland"
|
||||
options = [
|
||||
{ value = "iio-hyprland", label_key = "settings.iio.options.hyprland" },
|
||||
{ value = "iio-sway", label_key = "settings.iio.options.sway" },
|
||||
]
|
||||
|
||||
[[setting]]
|
||||
key = "transform-order"
|
||||
type = "string"
|
||||
label_key = "settings.transform.label"
|
||||
description_key = "settings.transform.description"
|
||||
default = "0,1,2,3"
|
||||
|
||||
[[setting]]
|
||||
key = "vm"
|
||||
type = "select"
|
||||
label_key = "settings.wm.label"
|
||||
description_key = "settings.wm.description"
|
||||
default = "hyprland"
|
||||
options = [
|
||||
{ value = "hyprland", label_key = "settings.wm.options.hyprland" },
|
||||
{ value = "sway", label_key = "settings.wm.options.sway" },
|
||||
]
|
||||
|
||||
[[setting]]
|
||||
key = "locked"
|
||||
type = "glyph"
|
||||
label_key = "settings.glyph.locked.label"
|
||||
description_key = "settings.glyph.locked.description"
|
||||
default = "lock"
|
||||
|
||||
[[setting]]
|
||||
key = "unlocked"
|
||||
type = "glyph"
|
||||
label_key = "settings.glyph.unlocked.label"
|
||||
description_key = "settings.glyph.unlocked.description"
|
||||
default = "lock-open-2"
|
||||
|
||||
|
||||
[[service]]
|
||||
id = "iio-service"
|
||||
entry = "iio-service.luau"
|
||||
|
||||
[[widget]]
|
||||
id = "iio-lock"
|
||||
entry = "iio-lock.luau"
|
||||
|
||||
[[widget]]
|
||||
id = "lock-panel"
|
||||
entry = "iio-panel.luau"
|
||||
|
||||
[[widget.setting]]
|
||||
key = "unlocked"
|
||||
type = "glyph"
|
||||
label_key = "settings.glyph.unlocked.label"
|
||||
description_key = "settings.glyph.unlocked.description"
|
||||
default = "rotate-rectangle"
|
||||
|
||||
[[widget.setting]]
|
||||
key = "locked"
|
||||
type = "glyph"
|
||||
label_key = "settings.glyph.locked.label"
|
||||
description_key = "settings.glyph.locked.description"
|
||||
default = "rotate-rectangle"
|
||||
|
||||
|
||||
|
||||
[[shortcut]]
|
||||
id = "toggle"
|
||||
entry = "cc-toggle.luau"
|
||||
|
||||
[[panel]]
|
||||
id = "panel"
|
||||
entry = "panel.luau"
|
||||
width = 420
|
||||
height = 410
|
||||
placement = "floating"
|
||||
position = "center"
|
||||
Reference in New Issue
Block a user