dotfiles

Personal dotfiles
git clone https://git.bracken.jp/dotfiles.git
Log | Files | Refs | LICENSE

config (8071B)


      1 # This file has been auto-generated by i3-config-wizard(1).
      2 # It will not be overwritten, so edit it as you like.
      3 #
      4 # Should you change your keyboard layout somewhen, delete
      5 # this file and re-run i3-config-wizard(1).
      6 #
      7 # i3 config file (v4)
      8 #
      9 # Please see http://i3wm.org/docs/userguide.html for a complete reference!
     10 
     11 
     12 ############################################################
     13 # Startup
     14 
     15 # Configure Xresources settings.
     16 exec --no-startup-id xrdb ~/.config/Xresources
     17 
     18 # Use Japanese keyboard layout with caps-lock as control.
     19 exec --no-startup-id setxkbmap -layout jp -option ctrl:nocaps
     20 
     21 # Use 'natural' mouse-wheel scrolling.
     22 exec --no-startup-id xmodmap -e "pointer = 1 2 3 5 4 6 7 8 9 10 11 12"
     23 
     24 # Set desktop background.
     25 exec --no-startup-id xsetroot -solid "#111111"
     26 
     27 # Start compton compositor.
     28 exec --no-startup-id compton --config ~/.config/compton.conf -b
     29 
     30 # Start up Dunst notification system.
     31 exec --no-startup-id dunst
     32 
     33 # Set the window title font.
     34 font pango:IPAGothic 9, DejaVu Sans Mono 9
     35 
     36 
     37 ############################################################
     38 # Variables
     39 
     40 # Logo key. Use Mod1 for Alt.
     41 set $mod Mod4
     42 
     43 # Home row direction keys, like vim.
     44 set $left h
     45 set $down j
     46 set $up k
     47 set $right l
     48 
     49 # Your preferred terminal emulator.
     50 set $term alacritty
     51 
     52 # Your preferred application launcher.
     53 # Note: it's recommended that you pass the final command to i3.
     54 set $menu dmenu_path | dmenu -fn "DejaVu Sans Mono-12" | xargs i3-msg exec --
     55 
     56 # Set lock screen handler.
     57 set $lock_screen i3lock -c 000000
     58 
     59 
     60 ############################################################
     61 # Idle configuration
     62 
     63 # Lock screen after 300 seconds of inactivity, then turn off displays after
     64 # another 300 seconds, and turn screens back on when resumed. Also lock screen
     65 # before the computer goes to sleep.
     66 exec --no-startup-id xautolock -time 10 -locker "$lock_screen"
     67 
     68 
     69 ############################################################
     70 # Key bindings: Basics
     71 
     72 # Start a terminal.
     73 bindsym $mod+Return exec $term
     74 
     75 # Kill focused window.
     76 bindsym $mod+Shift+q kill
     77 
     78 # Start the launcher.
     79 bindsym $mod+d exec $menu
     80 
     81 # Drag floating windows by holding down $mod and left mouse button.
     82 # Resize them with right mouse button + $mod.
     83 # Despite the name, also works for non-floating windows.
     84 floating_modifier $mod
     85 
     86 # Capture a screenshot.
     87 bindsym $mod+Shift+s exec --no-startup-id flameshot gui
     88 
     89 # Reload the configuration file.
     90 bindsym $mod+Shift+c reload
     91 
     92 # Restart i3 in-place (preserves layout/session, can be used to upgrade i3).
     93 bindsym $mod+Shift+r restart
     94 
     95 # Lock the screen.
     96 bindsym Control+$mod+l exec $lock_screen
     97 
     98 # Exit i3 (logs you out of your X session).
     99 bindsym $mod+Shift+e exec ~/.config/i3/exit_check.sh
    100 
    101 
    102 ############################################################
    103 # Key bindings: Volume/Brightness
    104 
    105 # OS-specific behaviour in ~/.local/bin/volumectl script.
    106 set $volume_up volumectl up 5
    107 set $volume_down volumectl down 5
    108 set $volume_toggle_mute volumectl mute
    109 set $volume_toggle_mic_mute volumectl muteinput
    110 
    111 # Increase and decrease volume.
    112 bindsym Control+$mod+F12 exec --no-startup-id $volume_up
    113 bindsym Control+$mod+F11 exec --no-startup-id $volume_down
    114 bindsym XF86AudioRaiseVolume exec --no-startup-id $volume_up
    115 bindsym XF86AudioLowerVolume exec --no-startup-id $volume_down
    116 
    117 # Handle media keys.
    118 bindsym XF86AudioMute exec --no-startup-id $volume_toggle_mute
    119 bindsym XF86AudioMicMute exec --no-startup-id $volume_toggle_mic_mute
    120 bindsym XF86MonBrightnessDown exec --no-startup-id brightnessctl set 5%-
    121 bindsym XF86MonBrightnessUp exec --no-startup-id brightnessctl set +5%
    122 bindsym XF86AudioPlay exec --no-startup-id playerctl play-pause
    123 bindsym XF86AudioNext exec --no-startup-id playerctl next
    124 bindsym XF86AudioPrev exec --no-startup-id playerctl previous
    125 
    126 
    127 ############################################################
    128 # Key bindings: Moving around
    129 
    130 # Move your focus around.
    131 bindsym $mod+$left focus left
    132 bindsym $mod+$down focus down
    133 bindsym $mod+$up focus up
    134 bindsym $mod+$right focus right
    135 # Or use $mod+[up|down|left|right].
    136 bindsym $mod+Left focus left
    137 bindsym $mod+Down focus down
    138 bindsym $mod+Up focus up
    139 bindsym $mod+Right focus right
    140 
    141 # Move the focused window with the same, but add Shift
    142 bindsym $mod+Shift+$left move left
    143 bindsym $mod+Shift+$down move down
    144 bindsym $mod+Shift+$up move up
    145 bindsym $mod+Shift+$right move right
    146 # Ditto, with arrow keys
    147 bindsym $mod+Shift+Left move left
    148 bindsym $mod+Shift+Down move down
    149 bindsym $mod+Shift+Up move up
    150 bindsym $mod+Shift+Right move right
    151 
    152 
    153 ############################################################
    154 # Key bindings: Workspaces
    155 
    156 # Switch to workspace.
    157 bindsym $mod+1 workspace 1
    158 bindsym $mod+2 workspace 2
    159 bindsym $mod+3 workspace 3
    160 bindsym $mod+4 workspace 4
    161 bindsym $mod+5 workspace 5
    162 bindsym $mod+6 workspace 6
    163 bindsym $mod+7 workspace 7
    164 bindsym $mod+8 workspace 8
    165 bindsym $mod+9 workspace 9
    166 bindsym $mod+0 workspace 10
    167 
    168 # Move focused container to workspace.
    169 bindsym $mod+Shift+1 move container to workspace 1
    170 bindsym $mod+Shift+2 move container to workspace 2
    171 bindsym $mod+Shift+3 move container to workspace 3
    172 bindsym $mod+Shift+4 move container to workspace 4
    173 bindsym $mod+Shift+5 move container to workspace 5
    174 bindsym $mod+Shift+6 move container to workspace 6
    175 bindsym $mod+Shift+7 move container to workspace 7
    176 bindsym $mod+Shift+8 move container to workspace 8
    177 bindsym $mod+Shift+9 move container to workspace 9
    178 bindsym $mod+Shift+0 move container to workspace 10
    179 
    180 
    181 ############################################################
    182 # Key bindings: Layout
    183 
    184 # You can "split" the current object of your focus with $mod+b or $mod+v, for
    185 # horizontal and vertical splits respectively.
    186 bindsym $mod+b splith
    187 bindsym $mod+v splitv
    188 # Ditto, but with $mod-; and $mod-Shift-;.
    189 bindsym $mod+Shift+semicolon splith
    190 bindsym $mod+semicolon splitv
    191 
    192 # Switch the current container between different layout styles.
    193 bindsym $mod+s layout stacking
    194 bindsym $mod+w layout tabbed
    195 bindsym $mod+e layout toggle split
    196 
    197 # Make the current focus fullscreen.
    198 bindsym $mod+f fullscreen
    199 
    200 # Toggle the current focus between tiling and floating mode.
    201 bindsym $mod+Shift+space floating toggle
    202 
    203 # Swap focus between the tiling area and the floating area.
    204 bindsym $mod+space focus mode_toggle
    205 
    206 # Move focus to the parent container.
    207 bindsym $mod+a focus parent
    208 
    209 
    210 ############################################################
    211 # Key bindings: Scratchpad
    212 #
    213 # i3 has a "scratchpad", which is a bag of holding for windows.
    214 # You can send windows there and get them back later.
    215 # Scratchpad windows are floating, so you can restore them to normal by
    216 # toggling the floating mode.
    217 
    218 # Move the currently focused window to the scratchpad.
    219 bindsym $mod+Shift+minus move scratchpad
    220 
    221 # Show the next scratchpad window or hide the focused scratchpad window.
    222 # If there are multiple scratchpad windows, this command cycles through them.
    223 bindsym $mod+minus scratchpad show
    224 
    225 
    226 ############################################################
    227 # Key bindings: Resizing containers
    228 
    229 mode "resize" {
    230     # Shrink or grow the container's width, height.
    231     bindsym $left resize shrink width 10px
    232     bindsym $down resize shrink height 10px
    233     bindsym $up resize grow height 10px
    234     bindsym $right resize grow width 10px
    235 
    236     # Ditto, with arrow keys.
    237     bindsym Left resize shrink width 10px
    238     bindsym Down resize shrink height 10px
    239     bindsym Up resize grow height 10px
    240     bindsym Right resize grow width 10px
    241 
    242     # Return to default mode on Return or Esc.
    243     bindsym Return mode "default"
    244     bindsym Escape mode "default"
    245 }
    246 bindsym $mod+r mode "resize"
    247 
    248 
    249 ############################################################
    250 # Status Bar
    251 #
    252 
    253 # Start i3bar to display a workspace bar (plus the system information i3status
    254 # finds out, if available)
    255 bar {
    256     position top
    257 
    258     # When the status_command prints a new line to stdout, swaybar updates.
    259     # The default just shows the current date and time.
    260     status_command i3status
    261 
    262     colors {
    263         statusline #ffffff
    264         background #323232
    265         inactive_workspace #32323200 #32323200 #5c5c5c
    266     }
    267 }