~pvsr/dotfiles

ref: 29f40f21ff7c4961514138c57c317bb2d4a34915 dotfiles/i3/.config/i3/config -rwxr-xr-x 5.7 KiB
29f40f21 — Peter Rice slight adjustment of vim keys 4 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
set $base00 #263238
set $base01 #2c393f
set $base02 #37474f
set $base03 #707880
set $base04 #c9ccd3
set $base05 #cdd3de
set $base06 #d5dbe5
set $base07 #ffffff
set $base08 #ec5f67
set $base09 #ea9560
set $base0A #ffcc00
set $base0B #8bd649
set $base0C #80cbc4
set $base0D #89ddff
set $base0E #82aaff
set $base0F #ec5f67

# super key
set $mod Mod4
font pango:Roboto Mono, Noto Sans CJK JP, fontawesome 10
floating_modifier $mod
bindsym $mod+Return exec i3-sensible-terminal
bindsym $mod+Shift+q kill
bindsym $mod+d exec j4-dmenu-desktop --dmenu="dmenu -fn 'robotomono-11' -i"

bindsym $mod+h focus left
bindsym $mod+j focus down
bindsym $mod+k focus up
bindsym $mod+l focus right

bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right

bindsym $mod+Shift+h move left
bindsym $mod+Shift+j move down
bindsym $mod+Shift+k move up
bindsym $mod+Shift+l move right

bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right

bindsym $mod+u split h
bindsym $mod+v split v
bindsym $mod+f fullscreen
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split
bindsym $mod+Shift+space floating toggle
bindsym $mod+space focus mode_toggle
bindsym $mod+a focus parent
#bindsym $mod+d focus child

bindsym $mod+1 workspace 1
bindsym $mod+2 workspace 2
bindsym $mod+3 workspace 3
bindsym $mod+4 workspace 4
bindsym $mod+5 workspace 5
bindsym $mod+6 workspace 6
bindsym $mod+7 workspace 7
bindsym $mod+8 workspace 8
bindsym $mod+9 workspace 9
bindsym $mod+0 workspace 10

bindsym $mod+Shift+1 move container to workspace 1
bindsym $mod+Shift+2 move container to workspace 2
bindsym $mod+Shift+3 move container to workspace 3
bindsym $mod+Shift+4 move container to workspace 4
bindsym $mod+Shift+5 move container to workspace 5
bindsym $mod+Shift+6 move container to workspace 6
bindsym $mod+Shift+7 move container to workspace 7
bindsym $mod+Shift+8 move container to workspace 8
bindsym $mod+Shift+9 move container to workspace 9
bindsym $mod+Shift+0 move container to workspace 10

bindsym $mod+Shift+c reload
bindsym $mod+Shift+r restart
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'"

bindsym $mod+r mode "resize"
mode "resize" {
        bindsym h resize shrink width 10 px or 10 ppt
        bindsym j resize grow height 10 px or 10 ppt
        bindsym k resize shrink height 10 px or 10 ppt
        bindsym l 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

        bindsym Return mode "default"
        bindsym Escape mode "default"
        bindcode Control+34 mode "default"
}

bindsym $mod+q mode "$mode_system"
bar {
    position      top
    tray_output   none
    # status_command i3status
    status_command i3blocks
    colors {
        separator $base08
        background $base01
        statusline $base0C
        focused_workspace $base03 $base0B $base00
        active_workspace $base03 $base03 $base00
        inactive_workspace $base03 $base06 $base00
        urgent_workspace $base03 $base08 $base00
        binding_mode $base00 $base0A $base00
  }
}

client.focused $base0B $base0B $base00 $base0B $base0B
client.focused_inactive $base01 $base01 $base05 $base03 $base01
client.unfocused $base01 $base01 $base05 $base01 $base01
client.urgent $base08 $base08 $base00 $base08 $base08
client.placeholder $base00 $base00 $base05 $base00 $base00
client.background $base07

# custom shortcuts
bindcode 172 exec mpc toggle && pkill -RTMIN+11 i3blocks
bindcode 173 exec mpc prev && pkill -RTMIN+11 i3blocks
bindcode 171 exec mpc next && pkill -RTMIN+11 i3blocks
bindcode 174 exec mpc stop && pkill -RTMIN+11 i3blocks
bindcode 121 exec amixer -q -D pulse sset Master toggle && pkill -RTMIN+10 i3blocks && pkill -RTMIN+11 i3blocks
bindcode 122 exec amixer -q -D pulse sset Master 5%- && pkill -RTMIN+10 i3blocks && pkill -RTMIN+11 i3blocks
bindcode 123 exec amixer -q -D pulse sset Master 5%+ && pkill -RTMIN+10 i3blocks && pkill -RTMIN+11 i3blocks
bindcode 107 exec scrot ~/Pictures/screenshots/%Y-%m-%d-%T-screenshot.png

workspace_auto_back_and_forth yes
bindsym $mod+z workspace back_and_forth
bindsym $mod+Shift+z move container to workspace back_and_forth

set $Locker i3lock && sleep 1
set $mode_system System (l) lock, (e) logout, (s) suspend, (h) hibernate, (r) reboot, (Shift+s) shutdown
mode "$mode_system" {
    bindsym l exec --no-startup-id $Locker, mode "default"
    bindsym e exec --no-startup-id i3-msg exit, mode "default"
    bindsym s exec --no-startup-id $Locker && systemctl suspend, mode "default"
    bindsym h exec --no-startup-id $Locker && systemctl hibernate, mode "default"
    bindsym r exec --no-startup-id systemctl reboot, mode "default"
    bindsym Shift+s exec --no-startup-id systemctl poweroff -i, mode "default"

    bindsym Return mode "default"
    bindsym Escape mode "default"
    bindcode Control+34 mode "default"
}

for_window [class="(?i)mpv"] floating enable
for_window [class="(?i)feh"] floating enable
for_window [instance="qb-nvim"] floating enable

for_window [class="."] border pixel 2
for_window [class="Firefox"] border pixel 0
for_window [class="cantata"] border pixel 0
for_window [class="transmission"] border pixel 0
for_window [class="qutebrowser"] border pixel 0
for_window [title="Google Chrome"] border pixel 0
for_window [class="google-chrome"] border pixel 0
for_window [class="Eclipse"] border pixel 0
for_window [class="Steam"] border pixel 0
for_window [instance="Steam.exe"] border pixel 0