nixos-config

My NixOS configuration files

  1. 1
  2. 2
  3. 3
  4. 4
  5. 5
  6. 6
  7. 7
  8. 8
  9. 9
  10. 10
  11. 11
  12. 12
  13. 13
  14. 14
# https://unnamed.website/posts/switch-virtual-keyboard/
function switch_virtual_keyboard
    echo Starting $argv[1]
    kwriteconfig6 --file kwinrc --group Wayland --key InputMethod /run/current-system/sw/share/applications/$argv[1]
    busctl --user emit /kwinrc org.kde.kconfig.notify ConfigChanged a{saay} 1 Wayland 1 11 73 110 112 117 116 77 101 116 104 111 100
end

busctl --user monitor --match type=signal,interface=org.kde.KWin.TabletModeManager,member=tabletModeChanged | while read -l line
    if string match -q "*true*" $line
        switch_virtual_keyboard org.kde.plasma.keyboard.desktop
    else if string match -q "*false*" $line
        switch_virtual_keyboard fcitx5-wayland-launcher.desktop
    end
end