mirror of
https://github.com/alyraffauf/nixcfg.git
synced 2024-11-25 21:31:54 -05:00
hyprland: toggleable switch for tablet mode
This commit is contained in:
parent
bd1b97a191
commit
b8a7477b5b
|
@ -141,11 +141,6 @@
|
||||||
(lib.getExe pkgs.gammastep)
|
(lib.getExe pkgs.gammastep)
|
||||||
]
|
]
|
||||||
else []
|
else []
|
||||||
)
|
|
||||||
++ (
|
|
||||||
if config.alyraffauf.desktop.hyprland.tabletMode.virtKeyboard
|
|
||||||
then [(defaultApps.virtKeyboard)]
|
|
||||||
else []
|
|
||||||
);
|
);
|
||||||
|
|
||||||
screenshot = rec {
|
screenshot = rec {
|
||||||
|
@ -189,6 +184,19 @@
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
tablet = pkgs.writeShellScript "hyprland-tablet" ''
|
||||||
|
STATE=`${lib.getExe pkgs.dconf} read /org/gnome/desktop/a11y/applications/screen-keyboard-enabled`
|
||||||
|
|
||||||
|
if [ $STATE -z ] || [ $STATE == "false" ]; then
|
||||||
|
if ! [ `pgrep -f ${defaultApps.virtKeyboard}` ]; then
|
||||||
|
${defaultApps.virtKeyboard} &
|
||||||
|
fi
|
||||||
|
${lib.getExe pkgs.dconf} write /org/gnome/desktop/a11y/applications/screen-keyboard-enabled true
|
||||||
|
elif [ $STATE == "true" ]; then
|
||||||
|
${lib.getExe pkgs.dconf} write /org/gnome/desktop/a11y/applications/screen-keyboard-enabled false
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
|
||||||
# Media/hardware commands
|
# Media/hardware commands
|
||||||
brightness = rec {
|
brightness = rec {
|
||||||
bin = lib.getExe' pkgs.swayosd "swayosd-client";
|
bin = lib.getExe' pkgs.swayosd "swayosd-client";
|
||||||
|
@ -242,8 +250,7 @@
|
||||||
bindl=,switch:off:Lid Switch,exec,${clamshell} off
|
bindl=,switch:off:Lid Switch,exec,${clamshell} off
|
||||||
|
|
||||||
# Enable virtual keyboard in tablet mode
|
# Enable virtual keyboard in tablet mode
|
||||||
bindl=,switch:on:Lenovo Yoga Tablet Mode Control switch,exec,${lib.getExe pkgs.dconf} write /org/gnome/desktop/a11y/applications/screen-keyboard-enabled true
|
bindl=,switch:Lenovo Yoga Tablet Mode Control switch,exec,${tablet}
|
||||||
bindl=,switch:off:Lenovo Yoga Tablet Mode Control switch,exec,${lib.getExe pkgs.dconf} write /org/gnome/desktop/a11y/applications/screen-keyboard-enabled false
|
|
||||||
|
|
||||||
# unscale XWayland apps
|
# unscale XWayland apps
|
||||||
xwayland {
|
xwayland {
|
||||||
|
|
Loading…
Reference in a new issue