aboutsummaryrefslogtreecommitdiff
path: root/config/i3
diff options
context:
space:
mode:
authorryo <ryo@nopwd.lol>2024-10-30 20:10:03 +0000
committerryo <ryo@nopwd.lol>2024-10-30 20:10:03 +0000
commitcc6d6fcfc6e8403e87dae9f092e61f0edf8e3cc6 (patch)
treef7f751a92c30b5ef7cf8770004c30479c516fdca /config/i3
Initial commit
Diffstat (limited to 'config/i3')
-rw-r--r--config/i3/config170
1 files changed, 170 insertions, 0 deletions
diff --git a/config/i3/config b/config/i3/config
new file mode 100644
index 0000000..46146e2
--- /dev/null
+++ b/config/i3/config
@@ -0,0 +1,170 @@
+# Ryo i3 config
+# https://ryo.nopwd.lol
+# version: alpha
+#
+# i3 userguide:
+# https://i3wm.org/docs/userguide.html
+
+set $mod Mod4
+
+font pango:monospace 8
+
+# =========== for you ===================
+
+# custom shortcuts
+bindsym $mod+Return exec alacritty
+bindsym $mod+d exec rofi -show drun
+bindsym $mod+Shift+b exec firefox
+bindsym $mod+Shift+p exec firefox -P proxy
+bindsym $mod+Shift+x exec xray.sh
+bindsym $mod+Shift+s --release exec scshot.sh
+bindsym $mod+Ctrl+s --release exec scshot.sh a
+
+# custom startups
+exec --no-startup-id alacritty
+exec --no-startup-id nm-applet
+
+exec --no-startup-id alacritty -n dropdown -e tmux new -s drop
+
+# =======================================
+
+floating_modifier $mod
+tiling_drag modifier titlebar
+
+gaps inner 5px
+
+# scratchpad
+for_window [instance="dropdown"] move scratchpad
+
+bindsym $mod+minus scratchpad show
+bindsym $mod+Shift+minus move scratchpad
+
+# fn + function keys
+bindsym XF86AudioRaiseVolume exec pamixer --increase 5 && pkill -SIGRTMIN+2 i3blocks
+bindsym XF86AudioLowerVolume exec pamixer --decrease 5 && pkill -SIGRTMIN+2 i3blocks
+bindsym XF86AudioMute exec pamixer --toggle-mute && pkill -SIGRTMIN+2 i3blocks
+
+bindsym XF86MonBrightnessUp exec brightnessctl set +5% && pkill -SIGRTMIN+3 i3blocks
+bindsym XF86MonBrightnessDown exec brightnessctl set 5%- && pkill -SIGRTMIN+3 i3blocks
+
+# close focused window
+bindsym $mod+Shift+q kill
+
+# change focus
+bindsym $mod+j focus down
+bindsym $mod+k focus up
+bindsym $mod+l focus right
+bindsym $mod+h focus left
+
+# alternatively, you can use the cursor keys:
+bindsym $mod+Left focus left
+bindsym $mod+Down focus down
+bindsym $mod+Up focus up
+bindsym $mod+Right focus right
+
+# move focused window
+bindsym $mod+Shift+j move left
+bindsym $mod+Shift+k move down
+bindsym $mod+Shift+l move up
+bindsym $mod+Shift+semicolon move right
+
+# alternatively, you can use the cursor keys:
+bindsym $mod+Shift+Left move left
+bindsym $mod+Shift+Down move down
+bindsym $mod+Shift+Up move up
+bindsym $mod+Shift+Right move right
+
+# split horizontal/vertical
+bindsym $mod+x split h
+bindsym $mod+z split v
+
+# enter fullscreen mode for the focused container
+bindsym $mod+f fullscreen toggle
+
+# change container layout (stacked, tabbed, toggle split)
+bindsym $mod+s layout stacking
+bindsym $mod+w layout tabbed
+bindsym $mod+e layout toggle split
+
+# toggle tiling / floating
+bindsym $mod+Shift+space floating toggle
+
+# change focus between tiling / floating windows
+bindsym $mod+space focus mode_toggle
+
+# focus the parent container
+bindsym $mod+a focus parent
+
+# workspaces
+set $ws1 "1"
+set $ws2 "2"
+set $ws3 "3"
+set $ws4 "4"
+set $ws5 "5"
+set $ws6 "6"
+set $ws7 "7"
+set $ws8 "8"
+set $ws9 "9"
+set $ws10 "10"
+
+# switch to workspace
+bindsym $mod+1 workspace number $ws1
+bindsym $mod+2 workspace number $ws2
+bindsym $mod+3 workspace number $ws3
+bindsym $mod+4 workspace number $ws4
+bindsym $mod+5 workspace number $ws5
+bindsym $mod+6 workspace number $ws6
+bindsym $mod+7 workspace number $ws7
+bindsym $mod+8 workspace number $ws8
+bindsym $mod+9 workspace number $ws9
+bindsym $mod+0 workspace number $ws10
+bindsym $mod+Tab workspace back_and_forth
+
+# move focused container to workspace
+bindsym $mod+Shift+1 move container to workspace number $ws1
+bindsym $mod+Shift+2 move container to workspace number $ws2
+bindsym $mod+Shift+3 move container to workspace number $ws3
+bindsym $mod+Shift+4 move container to workspace number $ws4
+bindsym $mod+Shift+5 move container to workspace number $ws5
+bindsym $mod+Shift+6 move container to workspace number $ws6
+bindsym $mod+Shift+7 move container to workspace number $ws7
+bindsym $mod+Shift+8 move container to workspace number $ws8
+bindsym $mod+Shift+9 move container to workspace number $ws9
+bindsym $mod+Shift+0 move container to workspace number $ws10
+
+# restart and reload
+bindsym $mod+Shift+c reload
+bindsym $mod+Shift+r restart
+
+# exit i3
+mode "exit" {
+ bindsym y exec i3-msg exit
+ bindsym Return mode "default"; exec pkill i3-nagbar
+ bindsym Escape mode "default"; exec pkill i3-nagbar
+}
+bindsym $mod+Shift+e mode "exit" exec ~/.local/script/i3nag.sh
+
+# resize window (you can also use the mouse for that)
+mode "resize" {
+ bindsym j resize shrink width 10 px or 10 ppt
+ bindsym k resize grow height 10 px or 10 ppt
+ bindsym l resize shrink height 10 px or 10 ppt
+ bindsym semicolon resize grow width 10 px or 10 ppt
+
+ bindsym Left resize shrink width 10 px or 10 ppt
+ bindsym Down resize grow height 10 px or 10 ppt
+ bindsym Up resize shrink height 10 px or 10 ppt
+ bindsym Right resize grow width 10 px or 10 ppt
+
+ # back to normal
+ bindsym Return mode "default"
+ bindsym Caps_Lock mode "default"
+ bindsym $mod+r mode "default"
+}
+
+bindsym $mod+r mode "resize"
+
+# start i3bar
+bar {
+ status_command i3blocks
+}