openbsd-ports/x11/i3/patches/patch-etc_config_keycodes

94 lines
4.0 KiB
Plaintext

$OpenBSD: patch-etc_config_keycodes,v 1.6 2021/02/12 23:14:05 sthen Exp $
Fix keycodes for the "Left", "Down", "Up" and "Right" keys: they're
different between Linux and OpenBSD.
Index: etc/config.keycodes
--- etc/config.keycodes.orig
+++ etc/config.keycodes
@@ -23,30 +23,30 @@ font pango:monospace 8
# xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the
# screen before suspend. Use loginctl lock-session to lock your screen.
-exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork
+#exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork
# NetworkManager is the most popular way to manage wireless networks on Linux,
# and nm-applet is a desktop environment-independent system tray GUI for it.
-exec --no-startup-id nm-applet
+#exec --no-startup-id nm-applet
# Use pactl to adjust volume in PulseAudio.
-set $refresh_i3status killall -SIGUSR1 i3status
-bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% && $refresh_i3status
-bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% && $refresh_i3status
-bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status
-bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status
+#set $refresh_i3status pkill -SIGUSR1 i3status
+#bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% && $refresh_i3status
+#bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% && $refresh_i3status
+#bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle && $refresh_i3status
+#bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle && $refresh_i3status
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
# start a terminal
-bindcode $mod+36 exec i3-sensible-terminal
+bindcode $mod+36 exec ${X11BASE}/bin/xterm
# kill focused window
bindcode $mod+Shift+24 kill
# start dmenu (a program launcher)
-bindcode $mod+40 exec --no-startup-id dmenu_run
+bindcode $mod+40 exec --no-startup-id ${LOCALBASE}/bin/dmenu_run
# A more modern dmenu replacement is rofi:
# bindcode $mod+40 exec "rofi -modi drun,run -show drun"
# There also is i3-dmenu-desktop which only displays applications shipping a
@@ -60,10 +60,10 @@ bindcode $mod+46 focus up
bindcode $mod+47 focus right
# alternatively, you can use the cursor keys:
-bindcode $mod+113 focus left
-bindcode $mod+116 focus down
-bindcode $mod+111 focus up
-bindcode $mod+114 focus right
+bindcode $mod+100 focus left
+bindcode $mod+104 focus down
+bindcode $mod+98 focus up
+bindcode $mod+102 focus right
# move focused window
bindcode $mod+Shift+44 move left
@@ -72,10 +72,10 @@ bindcode $mod+Shift+46 move up
bindcode $mod+Shift+47 move right
# alternatively, you can use the cursor keys:
-bindcode $mod+Shift+113 move left
-bindcode $mod+Shift+116 move down
-bindcode $mod+Shift+111 move up
-bindcode $mod+Shift+114 move right
+bindcode $mod+Shift+100 move left
+bindcode $mod+Shift+104 move down
+bindcode $mod+Shift+98 move up
+bindcode $mod+Shift+102 move right
# split in horizontal orientation
bindcode $mod+43 split h
@@ -161,10 +161,10 @@ mode "resize" {
bindcode 47 resize grow width 10 px or 10 ppt
# same bindings, but for the arrow keys
- bindcode 113 resize shrink width 10 px or 10 ppt
- bindcode 116 resize grow height 10 px or 10 ppt
- bindcode 111 resize shrink height 10 px or 10 ppt
- bindcode 114 resize grow width 10 px or 10 ppt
+ bindcode 100 resize shrink width 10 px or 10 ppt
+ bindcode 104 resize grow height 10 px or 10 ppt
+ bindcode 98 resize shrink height 10 px or 10 ppt
+ bindcode 102 resize grow width 10 px or 10 ppt
# back to normal: Enter or Escape or $mod+r
bindcode 36 mode "default"