Johan Rong před 6 měsíci
rodič
revize
6f48056b4f

+ 29 - 1
home/features/application/sway/default.nix

@@ -41,12 +41,39 @@ in
             "Right" = "resize grow width 10 px or 10 ppt";
 
             # Exit mode
-            "${mod}+r" = "mode default";
+            "Escape" = "mode default";
             "Return" = "mode default";
           };
           passthrough = { # Passthrough mode, disables all sway keybinds to let other apps use them, eg. use sway mod in other apps.
             "${mod}+c" = "mode default";
           };
+          futhark = {
+            "f" = "exec wtype ᚠ";
+            "u" = "exec wtype ᚢ";
+            "q" = "exec wtype ᚦ";
+            "a" = "exec wtype ᚨ";
+            "r" = "exec wtype ᚱ";
+            "k" = "exec wtype ᚲ";
+            "x" = "exec wtype ᚷ";
+            "v" = "exec wtype ᚹ";
+            "h" = "exec wtype ᚺ";
+            "n" = "exec wtype ᚾ";
+            "i" = "exec wtype ᛁ";
+            "j" = "exec wtype ᛃ";
+            "ae" = "exec wtype ᛇ";
+            "p" = "exec wtype ᛈ";
+            "z" = "exec wtype ᛉ";
+            "s" = "exec wtype ᛊ";
+            "t" = "exec wtype ᛏ";
+            "b" = "exec wtype ᛒ";
+            "e" = "exec wtype ᛖ";
+            "m" = "exec wtype ᛗ";
+            "l" = "exec wtype ᛚ";
+            "g" = "exec wtype ᛝ";
+            "d" = "exec wtype ᛞ";
+            "o" = "exec wtype ᛟ";
+            "Escape" = "mode default";
+          };
         };
         keybindings = {
           "${mod}+Shift+r" = "reload";
@@ -57,6 +84,7 @@ in
           "${mod}+r" = "mode \"resize\"";
 
           "${mod}+c" = "mode \"passthrough\"";
+          "${mod}+x" = "mode \"futhark\"";
 
           "${mod}+Shift+e" = "exec /home/johron/.config/rofi/powermenu/type-1/powermenu.sh";
 

+ 15 - 6
home/features/application/sway/scripts.nix

@@ -69,14 +69,9 @@
           DEVICE=$(ip route | awk '/default/ {print $5; exit}')
 
           if [[ -n "$DEVICE" ]]; then
-              # Get local IPv4 address
               IP=$(ip -4 addr show "$DEVICE" | awk '/inet / {print $2}' | cut -d/ -f1 | head -n1)
 
-              if [[ -n "$IP" ]]; then
-                  RESULT="$DEVICE ($IP)"
-              else
-                  RESULT="$DEVICE (no ip)"
-              fi
+              RESULT="$DEVICE"
           else
               RESULT="Disconnected"
           fi
@@ -118,6 +113,20 @@
         '';
         executable = true;
       };
+      #futhark-xkb = {
+      #  target = ".config/xkb/symbols/futhark";
+      #  text = ''
+      #    default partial alphanumeric_keys
+      #    xkb_symbols "basic" {
+#
+      #        name[Group1]= "Futhark";
+#
+      #        key <AD04> { [ U16A0 ] }; // f -> ᚠ
+#
+      #        include "no(basic)"
+      #    };
+      #  '';
+      #};
     };
   };
 }

+ 1 - 0
nixos/flavors/desktop/sway/default.nix

@@ -13,6 +13,7 @@
     nomacs
     gammastep
     geoclue2
+    wtype
   ];
 
   programs.sway = {