From 7ba4cca93eb03c3c520fe2967ef04b752c2b6c87 Mon Sep 17 00:00:00 2001 From: Dmitry Voronin Date: Thu, 12 Sep 2024 01:25:17 +0300 Subject: [PATCH] Sway : Move gaming and montoggle back to system. --- .../keyd/{wm => }/sway/keyboard-layout.json | 10 +- .readme/keyd/system/keyboard-layout.json | 16 ++- .readme/keyd/wm/gnome/keyboard-layout.json | 134 ------------------ Readme.md | 9 +- home/config/sway/module/Display.nix | 8 -- home/config/sway/module/System.nix | 2 + 6 files changed, 27 insertions(+), 152 deletions(-) rename .readme/keyd/{wm => }/sway/keyboard-layout.json (95%) delete mode 100644 .readme/keyd/wm/gnome/keyboard-layout.json diff --git a/.readme/keyd/wm/sway/keyboard-layout.json b/.readme/keyd/sway/keyboard-layout.json similarity index 95% rename from .readme/keyd/wm/sway/keyboard-layout.json rename to .readme/keyd/sway/keyboard-layout.json index d343599..2497fb8 100644 --- a/.readme/keyd/wm/sway/keyboard-layout.json +++ b/.readme/keyd/sway/keyboard-layout.json @@ -66,7 +66,13 @@ "Down", "Right", "Full-screen / Float", - "Toggle Gaming Monitor", + { + "c": "#cccccc" + }, + "G", + { + "c": "#8ec07c" + }, "Resize Left", "Resize Down", "Resize Up", @@ -99,10 +105,10 @@ "c": "#8ec07c" }, "Last notif / Dismiss", - "Toggle Focused Monitor", { "c": "#cccccc" }, + "M", "<\n,", ">\n.", "?\n/", diff --git a/.readme/keyd/system/keyboard-layout.json b/.readme/keyd/system/keyboard-layout.json index 07d2f0d..c4d9724 100644 --- a/.readme/keyd/system/keyboard-layout.json +++ b/.readme/keyd/system/keyboard-layout.json @@ -73,7 +73,13 @@ }, "D", "F", - "G", + { + "c": "#8ec07c" + }, + "Toggle Gaming Mode", + { + "c": "#cccccc" + }, "H", "J", "K", @@ -108,7 +114,13 @@ }, "B", "N", - "M", + { + "c": "#8ec07c" + }, + "Toggle Monitor Power", + { + "c": "#cccccc" + }, "<\n,", ">\n.", "?\n/", diff --git a/.readme/keyd/wm/gnome/keyboard-layout.json b/.readme/keyd/wm/gnome/keyboard-layout.json deleted file mode 100644 index 60d810d..0000000 --- a/.readme/keyd/wm/gnome/keyboard-layout.json +++ /dev/null @@ -1,134 +0,0 @@ -[ - [ - "~\n`", - "!\n1", - "@\n2", - "#\n3", - "$\n4", - "%\n5", - "^\n6", - "&\n7", - "*\n8", - "(\n9", - ")\n0", - "_\n-", - "+\n=", - { - "w": 2 - }, - "Backspace" - ], - [ - { - "c": "#8ec07c", - "w": 1.5 - }, - "Switch app", - "Prev Work-space", - "Maxi-mize", - "Next Work-space", - "Resize Mode", - { - "c": "#cccccc" - }, - "T", - "Y", - "U", - "I", - "O", - "P", - "{\n[", - "}\n]", - { - "w": 1.5 - }, - "|\n\\" - ], - [ - { - "c": "#8ec07c", - "w": 1.75 - }, - "Terminal", - "Tile Left", - "Mini-mize", - "Rile Right", - "Full-screen", - { - "c": "#cccccc" - }, - "G", - "H", - "J", - "K", - "L", - ":\n;", - "\"\n'", - { - "w": 2.25 - }, - "Enter" - ], - [ - { - "c": "#8ec07c", - "w": 2.25 - }, - "Alternative action", - "Lock", - "Close Window", - "Hide All Window", - "Screen select", - { - "c": "#cccccc" - }, - "B", - "N", - "M", - "<\n,", - ">\n.", - "?\n/", - { - "w": 2.75 - }, - "Shift" - ], - [ - { - "w": 1.25 - }, - "Ctrl", - { - "c": "#d79921", - "w": 1.25 - }, - "WM Controls", - { - "c": "#cccccc", - "w": 1.25 - }, - "Alt", - { - "c": "#8ec07c", - "w": 6.25 - }, - "Run", - { - "c": "#cccccc", - "w": 1.25 - }, - "Alt", - { - "w": 1.25 - }, - "Win", - { - "w": 1.25 - }, - "Menu", - { - "w": 1.25 - }, - "Ctrl" - ] -] \ No newline at end of file diff --git a/Readme.md b/Readme.md index b043375..923d70a 100644 --- a/Readme.md +++ b/Readme.md @@ -68,11 +68,8 @@ Yellow are modifier keys, they enable layers when held. Green ones are just modi
-WM keys -Sway:
-
-Gnome:
- +Sway keys +
@@ -99,7 +96,7 @@ Tmux:
System controls - +
[Link](http://www.keyboard-layout-editor.com) / [Source](https://github.com/ijprest/keyboard-layout-editor) of the tool I used to draw the images. diff --git a/home/config/sway/module/Display.nix b/home/config/sway/module/Display.nix index 24da735..c09d8e2 100644 --- a/home/config/sway/module/Display.nix +++ b/home/config/sway/module/Display.nix @@ -1,16 +1,8 @@ { ... }: { text = '' - # Example configuration: - # - # output HDMI-A-1 resolution 1920x1080 position 1920,0 - # # You can get the names of your outputs by running: swaymsg -t get_outputs output * scale 1 output "Huawei Technologies Co., Inc. ZQE-CBA 0xC080F622" pos 0,1080 output "ASUSTek COMPUTER INC ASUS VA24E R2LMTF127165" mode 1920x1080@74.986Hz transform 180 pos 780,0 - - # Display toggles. - bindsym --to-code $mod+m exec 'swayscript montoggle' - bindsym --to-code $mod+g exec 'swayscript gamingtoggle' ''; } diff --git a/home/config/sway/module/System.nix b/home/config/sway/module/System.nix index ec1500c..6e6b4ef 100644 --- a/home/config/sway/module/System.nix +++ b/home/config/sway/module/System.nix @@ -5,7 +5,9 @@ in { text = '' bindsym ${mod} input * xkb_switch_layout 0 bindsym --to-code ${mod}+c exec 'systemctl reboot -i' + bindsym --to-code ${mod}+g exec 'swayscript gamingtoggle' bindsym --to-code ${mod}+l exec 'powerlimit toggle' + bindsym --to-code ${mod}+m exec 'swayscript montoggle' bindsym --to-code ${mod}+p exec 'powersave toggle' bindsym --to-code ${mod}+r exec 'swayscript reload' bindsym --to-code ${mod}+v exec 'swayscript vpntoggle'