summaryrefslogblamecommitdiff
path: root/i3wm.conf
blob: a772fd6f54130487ccca6d2ceb6cb2d7e01a5ee8 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15


                      











                                                                                
 
          
              
            
             
 
                  
         
 


                                                       
 


                                                     

                      





                                                                                
 
                         
                           
                            


                                                                                             
 






                                                                                

                                


                                                                                
 



                                  
                      
                      

                                        
 
                                                                                
 



                          

                           



                                                
                                                                                
 










                           
                                                                                
 



                               
 










                                                   
                                                                                
 
                            
 




                                                  
 


                                 

 
                                                                                
 
                                    
                                                                                                 

                    










                                                                        

 
                                                                                










                      



























                                                  
                                                                                
 
                           
                                                                                                     






                                                                                                   
 






                                                                             
 
                           

                                                                                
 
     






                                                                
                                   










                                                              










                                                         
     

 
                                                                                
 

                                                        
 
                                                                                
 
                                             
 



                                                                                                                                      
 



                                                        
 









                                                                                
 





















                                                                                
# dotfiles -- i3config
# author: johannst

# Helpful cmdline tools.
#  * xev          -> shows key / mouse events
#  * xmodmap      -> shows which Mod(ifier) maps to which key
#  * xmodmap -pke -> list current keycode - keysym
#  * xprop        -> get class names for applications
#
# For xft fonts.
#  * fc-list                -> list xft fonts
#  * fc-match "<pattern>"   -> test which font <pattern> matches, eg
#                              fc-match 'MesloLGS NF:style=Italic'

# -- GLOBAL CONFIG -------------------------------------------------------------

# ALT key.
#set $mod Mod1
# SUPER key.
set $mod Mod4

# Use xcore fonts.
font 7x13

# Use xft fonts, format (family list separated by ','):
#   font pango:<family list> [<style options>] <size>
#font pango:MesloLGS NF Regular 8

# Use
#   * $mod+mouse_L to move window in floating mode.
#   * $mod+mouse_R to resize window in floating mode.
floating_modifier $mod

# Default border settings.
default_border pixel 1
default_floating_border normal
hide_edge_borders smart

# -- BASIC KEY BINDINGS --------------------------------------------------------

bindsym $mod+Shift+c kill
bindsym $mod+Shift+s reload
bindsym $mod+Shift+r restart
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'Kill X-Sessions' -b 'Kill!' 'i3-msg exit'
# Toggle between dock mode and hide mode.
bindsym $mod+m bar mode toggle

# -- SCRATCHPAD KEY BINDINGS ---------------------------------------------------

bindsym $mod+Shift+minus move scratchpad
bindsym $mod+minus scratchpad show

# -- BORDER KEY BINDINGS -------------------------------------------------------

bindsym $mod+Shift+n border none
bindsym $mod+n border pixel 1
bindsym $mod+b border normal

# -- LAYOUT KEY BINDINGS -------------------------------------------------------

bindsym $mod+q layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split

bindsym $mod+v split h
bindsym $mod+s split v
bindsym $mod+f fullscreen
bindsym $mod+Shift+space floating toggle

# -- FOCUS KEY BINDINGS --------------------------------------------------------

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

bindsym $mod+a focus parent

# change focus between tiling / floating windows
bindsym $mod+space focus mode_toggle

# -- NAVIGATION KEY BINDINGS ---------------------------------------------------

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

# -- MOVE CONTAINER KEY BINDINGS -----------------------------------------------

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+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

# -- RESIZE MODE ---------------------------------------------------------------

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

    # Back to normal mode.
    bindsym Return mode "default"
    bindsym Escape mode "default"
}

# -- POWER MODE ----------------------------------------------------------------

bindsym $mod+Home mode "$power_mode"
set $power_mode (l)ock, (e)xit, switch_(u)ser, (s)uspend, (h)ibernate, (r)eboot (Shift+s)shutdown

mode "$power_mode" {
    bindsym l exec --no-startup-id i3exit lock, mode "default"
    bindsym s exec --no-startup-id i3exit suspend, mode "default"
    bindsym u exec --no-startup-id i3exit switch_user, mode "default"
    bindsym e exec --no-startup-id i3exit logout, mode "default"
    bindsym h exec --no-startup-id i3exit hibernate, mode "default"
    bindsym r exec --no-startup-id i3exit reboot, mode "default"
    bindsym Shift+s exec --no-startup-id i3exit shutdown, mode "default"

    # Back to normal mode.
    bindsym Return mode "default"
    bindsym Escape mode "default"
}

# -- COLORS --------------------------------------------------------------------

set $col_x_bla #000000
set $col_x_whi #FFFFFF
set $col_b_gra #5F676A
set $col_m_gra #888888
set $col_d_gra #333333
set $col_d_red #900000
set $col_b_blu #2E9EF4
set $col_d_ora #ff8700
set $col_d_tur #458588

# X colors        variable    resource    fallback
set_from_resource $bg         background  #151515
set_from_resource $fg         foreground  #d0d0d0

set_from_resource $black_d    color0      #151515
set_from_resource $black_l    color8      #505050

set_from_resource $red_d      color1      #4188ac
set_from_resource $red_l      color9      #ac4142

set_from_resource $green_d    color2      #90a959
set_from_resource $green_l    color10     #90a959

set_from_resource $yellow_d   color3      #f4bf75
set_from_resource $yellow_l   color11     #f4bf75

set_from_resource $blue_d     color4      #6a9fb5
set_from_resource $blue_l     color12     #6a9fb5

set_from_resource $magenta_d  color5      #aa759f
set_from_resource $magenta_l  color13     #aa759f

set_from_resource $cyan_d     color6      #75b5aa
set_from_resource $cyan_l     color14     #75b5aa

set_from_resource $white_d    color7      #d0d0d0
set_from_resource $white_l    color15     #f5f5f5

# -- WM COLORSCHEME ------------------------------------------------------------

# Black/orange colorscheme.
# class                 title-border    title-body      title-text      split-indicator window-border
#client.focused          $col_b_gra      $col_b_gra      $col_x_whi      $col_b_blu      $col_b_gra
#client.focused_inactive $col_d_gra      $col_d_gra      $col_x_whi      $col_b_blu      $col_d_gra
#client.unfocused        $col_d_gra      $col_d_gra      $col_m_gra      $col_b_blu      $col_d_gra
#client.urgent           $col_d_gra      $col_d_red      $col_x_whi      $col_d_red      $col_d_red
#client.placeholder      $col_x_bla      $col_x_bla      $col_x_whi      $col_x_bla      $col_x_bla
#
#client.background       $col_x_whi

# X-colors colorscheme.
# class                 title-border  title-body  title-text  split-indicator
client.focused          $black_l      $black_l    $cyan_l     $white_l
client.focused_inactive $black_d      $black_d    $cyan_l     $black_l
client.unfocused        $black_d      $black_d    $cyan_l     $black_l
client.urgent           $red_l        $red_l      $fg         $black_l
client.placeholder      $bg           $bg         $fg         $black_l

client.background       $bg

# -- STATUS BAR ----------------------------------------------------------------

bar {
    # Dock position: top, bottom.
    position bottom
    #status_command i3blocks -c ~/.config/i3/i3blocks.conf
    #status_command i3status --config ~/.config/i3/i3status.conf
    status_command i3status

    colors {
        # Black/orange colorscheme.
        #background $col_x_bla
        #statusline $col_x_whi
        #separator  $col_m_gra

        # class            border      background  text
        #focused_workspace  $col_x_bla  $col_d_ora  $col_x_whi
        #active_workspace   $col_x_bla  $col_x_bla  $col_x_whi
        #inactive_workspace $col_x_bla  $col_x_bla  $col_m_gra
        #urgent_workspace   $col_d_red  $col_d_red  $col_x_whi
        #binding_mode       $col_d_tur  $col_d_tur  $col_x_whi

        # X-colors colorscheme.
        background $bg
        statusline $fg
        separator  $black_l

        # class            border    background  text
        focused_workspace  $white_l  $cyan_l     $black_l
        active_workspace   $black_l  $bg         $white_l
        inactive_workspace $black_l  $bg         $fg
        urgent_workspace   $black_l  $red_l      $fg
        binding_mode       $black_l  $red_l      $fg
    }
}

# -- FN KEYS -------------------------------------------------------------------

#bindsym XF86MonBrightnessUp exec "xbacklight -inc 10"
#bindsym XF86MonBrightnessDown exec "xbacklight -dec 10"

# -- TOOLS KEY BINDINGS --------------------------------------------------------

bindsym $mod+Return exec i3-sensible-terminal

# demnu / passmenu launcher.
bindsym $mod+d exec --no-startup-id dmenu_recency -b -l 15 -fn 'MesloLGS NF-9' -p '>_'
#bindsym $mod+d exec --no-startup-id dmenu_run -b -l 15 -nf '#bbbbbb' -nb '#222222' -sb '#ff8700' -sf '#ffffff' -fn '$my_font' -p '>_'
#bindsym $mod+p exec --no-startup-id passmenu -b -l 15 -nf '#bbbbbb' -nb '#222222' -sb '#ff8700' -sf '#ffffff' -fn '$my_font' -p '>_'

# rofi launcher.
#bindsym $mod+d exec --no-startup-id rofi -show drun
#bindsym $mod+p exec --no-startup-id rofi -show pass
#bindsym $mod+Tab exec --no-startup-id rofi -show window

bindsym Print exec --no-startup-id flameshot gui

# -- AUDIO ---------------------------------------------------------------------

# Alsamixer.
exec --no-startup-id volumeicon
bindsym $mod+Shift+m exec terminal -e 'alsamixer'
# bindsym XF86AudioRaiseVolume exec "amixer set Master 5%+"
# bindsym XF86AudioLowerVolume exec "amixer set Master 5%-"
# bindsym XF86AudioMute exec "amixer set Master toggle"

# Pulseaudio.
#exec --no-startup-id pulseaudio
#exec --no-startup-id pa-applet
#bindsym $mod+Shift+m exec pavucontrol
#bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume 0 +5%
#bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume 0 -5%
#bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute 0 toggle

# -- AUTOSTART -----------------------------------------------------------------

#exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
exec --no-startup-id nitrogen --restore; sleep 1; picom -b
exec --no-startup-id nm-applet
exec --no-startup-id xfce4-power-manager
exec --no-startup-id clipit
# exec --no-startup-id blueman-applet
# exec_always --no-startup-id sbxkb
exec --no-startup-id xautolock -time 10 -locker blurlock
#exec_always --no-startup-id ff-theme-util
exec_always --no-startup-id fix_xcursor

#% vim:fen:fdm=marker:fmr={{{,}}}:fdl=0:fdc=1:cc=80