|
| 1 | +# set modifier |
| 2 | +set $super Mod4 |
| 3 | +set $alt Mod1 |
| 4 | + |
| 5 | +set $ws1 "1: " |
| 6 | +set $ws2 "2: " |
| 7 | +set $ws3 "3: " |
| 8 | +set $ws4 "4: " |
| 9 | +set $ws5 "5: " |
| 10 | +set $ws6 "6: " |
| 11 | + |
| 12 | +workspace $ws1 output HDMI1 |
| 13 | +workspace $ws2 output HDMI1 |
| 14 | +workspace $ws3 output HDMI1 |
| 15 | +workspace $ws4 output HDMI2 |
| 16 | +workspace $ws5 output HDMI2 |
| 17 | + |
| 18 | +# set font |
| 19 | +font pango: Noto Sans Regular 11 |
| 20 | + |
| 21 | +# Use Mouse+$super to drag floating windows to their wanted position |
| 22 | +floating_modifier $super |
| 23 | + |
| 24 | +#autostart |
| 25 | +exec --no-startup-id hsetroot -fill ~/.config/i3/wallpaper.png |
| 26 | +exec --no-startup-id xsettingsd & |
| 27 | +exec --no-startup-id compton -b |
| 28 | +exec --no-startup-id dunst |
| 29 | +exec --no-startup-id setxkbmap -option caps:super |
| 30 | +exec --no-startup-id fcitx -d |
| 31 | +exec --no-startup-id goldendict |
| 32 | +exec --no-startup-id dropbox |
| 33 | + |
| 34 | +# start a terminal |
| 35 | +bindsym $super+Return exec i3-sensible-terminal |
| 36 | + |
| 37 | +# start dmenu (a program launcher) |
| 38 | +bindsym $super+Shift+d exec i3-dmenu-desktop --dmenu="dmenu -i -fn 'Hack Regular 9' |
| 39 | +bindsym $super+d exec rofi -lines 12 -padding 18 -width 60 -location 0 -show drun -sidebar-mode -columns 3 -font 'Noto Sans Regular 9' |
| 40 | + |
| 41 | +# common apps keybinds |
| 42 | +bindsym Print exec scrot 'Cheese_%a-%d%b%y_%H.%M.png' -e 'viewnior ~/$f' |
| 43 | +bindsym $alt+l exec i3lock -t -i ~/.config/i3/i3lock.png |
| 44 | +bindsym $super+Shift+w exec firefox |
| 45 | +bindsym $super+Shift+f exec thunar;workspace 3;focus |
| 46 | +bindsym $super+Shift+g exec geany |
| 47 | + |
| 48 | +#change volume |
| 49 | +# bindsym XF86AudioRaiseVolume exec amixer -q set Master 5%+ |
| 50 | +# bindsym XF86AudioLowerVolume exec amixer -q set Master 5%- |
| 51 | +# bindsym XF86AudioMute exec amixer set Master toggle |
| 52 | +bindsym XF86AudioRaiseVolume exec amixer -q -D pulse sset Master 5%+ && pkill -RTMIN+10 i3blocks |
| 53 | +bindsym XF86AudioLowerVolume exec amixer -q -D pulse sset Master 5%- && pkill -RTMIN+10 i3blocks |
| 54 | +bindsym XF86AudioMute exec amixer -q -D pulse sset Master toggle && pkill -RTMIN+10 i3blocks |
| 55 | + |
| 56 | +# brightness control with xbacklight |
| 57 | +bindsym XF86MonBrightnessDown exec xbacklight -dec 5 |
| 58 | +bindsym XF86MonBrightnessUp exec xbacklight -inc 5 |
| 59 | + |
| 60 | +# music control |
| 61 | +bindsym XF86AudioNext exec mpc next |
| 62 | +bindsym XF86AudioPrev exec mpc prev |
| 63 | +bindsym XF86AudioPlay exec mpc toggle |
| 64 | +bindsym XF86AudioStop exec mpc stop |
| 65 | + |
| 66 | +# kill focused window |
| 67 | +bindsym $super+x kill |
| 68 | +bindsym $alt+F4 kill |
| 69 | + |
| 70 | +# change focus |
| 71 | +bindsym $super+h focus left |
| 72 | +bindsym $super+j focus down |
| 73 | +bindsym $super+k focus up |
| 74 | +bindsym $super+l focus right |
| 75 | + |
| 76 | +# move focused window |
| 77 | +bindsym $super+Shift+h move left |
| 78 | +bindsym $super+Shift+j move down |
| 79 | +bindsym $super+Shift+k move up |
| 80 | +bindsym $super+Shift+l move right |
| 81 | + |
| 82 | +# split in horizontal orientation |
| 83 | +bindsym $super+s split v |
| 84 | + |
| 85 | +# split in vertical orientation |
| 86 | +bindsym $super+v split h |
| 87 | + |
| 88 | +# enter fullscreen mode for the focused container |
| 89 | +bindsym $super+f fullscreen toggle |
| 90 | + |
| 91 | +# change container layout split |
| 92 | +bindsym $super+t layout toggle split |
| 93 | + |
| 94 | +# toggle tiling / floating |
| 95 | +bindsym $super+space floating toggle |
| 96 | + |
| 97 | +# change focus between tiling / floating windows |
| 98 | +bindsym $super+Shift+space focus mode_toggle |
| 99 | + |
| 100 | +# switch to workspace |
| 101 | +bindsym $alt+Control+Right workspace next |
| 102 | +bindsym $alt+Control+Left workspace prev |
| 103 | +bindsym $super+1 workspace $ws1 |
| 104 | +bindsym $super+2 workspace $ws2 |
| 105 | +bindsym $super+3 workspace $ws3 |
| 106 | +bindsym $super+4 workspace $ws4 |
| 107 | +bindsym $super+5 workspace $ws5 |
| 108 | +bindsym $super+6 workspace $ws6 |
| 109 | + |
| 110 | +# move focused container to workspace |
| 111 | +bindsym $super+Shift+1 move container to workspace $ws1 |
| 112 | +bindsym $super+Shift+2 move container to workspace $ws2 |
| 113 | +bindsym $super+Shift+3 move container to workspace $ws3 |
| 114 | +bindsym $super+Shift+4 move container to workspace $ws4 |
| 115 | +bindsym $super+Shift+5 move container to workspace $ws5 |
| 116 | +bindsym $super+Shift+6 move container to workspace $ws6 |
| 117 | + |
| 118 | +# restart i3 inplace (preserves your layout/session, can be used to upgrade i3) |
| 119 | +bindsym $super+Shift+r restart |
| 120 | + |
| 121 | +# exit i3 |
| 122 | +bindsym $super+q exec "i3-nagbar -t warning -m 'Really, exit?' -b 'Yes' 'i3-msg exit'" |
| 123 | +bindsym $super+Escape exec "i3-nagbar -t warning -m 'Really, suspend?' -b 'Yes' 'systemctl suspend'" |
| 124 | + |
| 125 | +# resize window (you can also use the mouse for that) |
| 126 | +mode "resize" { |
| 127 | + bindsym Left resize shrink width 5 px or 5 ppt |
| 128 | + bindsym Down resize grow height 5 px or 5 ppt |
| 129 | + bindsym Up resize shrink height 5 px or 5 ppt |
| 130 | + bindsym Right resize grow width 5 px or 5 ppt |
| 131 | + bindsym Return mode "default" |
| 132 | +} |
| 133 | +bindsym $super+r mode "resize" |
| 134 | + |
| 135 | +# panel |
| 136 | +bar { |
| 137 | + height 23 |
| 138 | + strip_workspace_numbers no |
| 139 | + font pango: Noto Sans 10, FontAwesome 10 |
| 140 | + colors { |
| 141 | + background #1C1C1C |
| 142 | + statusline #000000 |
| 143 | + # separator #4b5262 |
| 144 | + |
| 145 | +# colour of border, background, and text |
| 146 | + focused_workspace #2f343f #bf616a #d8dee8 |
| 147 | + active_workspace #2f343f #2f343f #d8dee8 |
| 148 | + inactive_workspace #2f343f #2f343f #d8dee8 |
| 149 | + urgent_workspace #2f343f #ebcb8b #2f343f |
| 150 | + } |
| 151 | + status_command i3blocks |
| 152 | +} |
| 153 | + |
| 154 | +# window rules, you can find the window class using xprop |
| 155 | +for_window [class=".*"] border pixel 4 |
| 156 | +assign [class=URxvt] 1 |
| 157 | +assign [class=Firefox|Transmission-gtk] 2 |
| 158 | +assign [class=Thunar|File-roller] 3 |
| 159 | +assign [class=Geany|Evince|Gucharmap|Soffice|libreoffice*] 4 |
| 160 | +assign [class=Audacity|Vlc|mpv|Ghb|Xfburn|Gimp*|Inkscape] 5 |
| 161 | +assign [class=Lxappearance|System-config-printer.py|Lxtask|GParted|Pavucontrol|Exo-helper*|Lxrandr|Arandr] 6 |
| 162 | +for_window [class=Viewnior|feh|Audacious|File-roller|Lxappearance|Lxtask|Pavucontrol] floating enable |
| 163 | +for_window [class=URxvt|Firefox|Geany|Evince|Soffice|libreoffice*|mpv|Ghb|Xfburn|Gimp*|Inkscape|Vlc|Lxappearance|Audacity] focus |
| 164 | +for_window [class=Xfburn|GParted|System-config-printer.py|Lxtask|Pavucontrol|Exo-helper*|Lxrandr|Arandr] focus |
| 165 | + |
| 166 | +# colour of border, background, text, indicator, and child_border |
| 167 | +client.focused #bf616a #2f343f #d8dee8 #bf616a #d8dee8 |
| 168 | +client.focused_inactive #2f343f #2f343f #d8dee8 #2f343f #2f343f |
| 169 | +client.unfocused #2f343f #2f343f #d8dee8 #2f343f #2f343f |
| 170 | +client.urgent #2f343f #2f343f #d8dee8 #2f343f #2f343f |
| 171 | +client.placeholder #2f343f #2f343f #d8dee8 #2f343f #2f343f |
| 172 | +client.background #2f343f |
| 173 | + |
| 174 | +# I3gaps |
| 175 | +for_window [class="^.*"] border pixel 2 |
| 176 | +gaps inner 9 |
| 177 | +gaps outer 7 |
| 178 | +# Only enable gaps on a workspace when there is at least one container |
| 179 | +# smart_gaps on |
| 180 | +# Only enable outer gaps when there is exactly one container |
0 commit comments