dotfiles

Yes, my $HOME has a git repo now :(

git clone git://git.shimmy1996.com/dotfiles.git

config (9516B)

    1 # i3 config file (v4)
    2 
    3 ### Variables
    4 ## Window Manager
    5 # Leading modifier key. Use Mod1 for Alt.
    6 set $mod Mod4
    7 # Home row direction keys.
    8 set $left h
    9 set $down j
   10 set $up k
   11 set $right l
   12 # Default gap sizes.
   13 set $gaps_inner 10
   14 set $gaps_outer 0
   15 ## Applications
   16 set $menu rofi -i -show drun
   17 set $clipboard rofi -modi "clipboard:greenclip print" -show clipboard -run-command '{cmd}'
   18 set $screenlocker swaylock -c 85ad8580 -u
   19 set $screenshot swaygrab
   20 set $networkmenu networkmanager_dmenu
   21 set $file_manager $TERMINAL -e lf
   22 set $music_player $TERMINAL -e ncmpcpp
   23 ## System Commands
   24 set $hibernate systemctl suspend
   25 set $reboot systemctl reboot
   26 set $shutdown shutdown -h now
   27 ## Files
   28 set $background ~/.config/background.png
   29 
   30 ### Aesthetics
   31 ## Background
   32 exec --no-startup-id feh --bg-fill $background
   33 # Use compton for transparency under X.
   34 exec --no-startup-id compton
   35 ## Fonts
   36 font pango:Iosevka SS09 12
   37 ## Window Style
   38 gaps inner $gaps_inner
   39 gaps outer $gaps_outer
   40 default_border pixel 2
   41 ## Color Scheme (gruvbox-dark-pale)
   42 set $base00 #262626
   43 set $base01 #3a3a3a
   44 set $base02 #4e4e4e
   45 set $base03 #8a8a8a
   46 set $base04 #949494
   47 set $base05 #dab997
   48 set $base06 #d5c4a1
   49 set $base07 #ebdbb2
   50 set $base08 #d75f5f
   51 set $base09 #ff8700
   52 set $base0A #ffaf00
   53 set $base0B #afaf00
   54 set $base0C #85ad85
   55 set $base0D #83adad
   56 set $base0E #d485ad
   57 set $base0F #d65d0e
   58 # Basic color configuration using the Base16 variables for windows and borders.
   59 # Property Name         Border  BG      Text    Indicator Child Border
   60 client.focused          $base05 $base0D $base00 $base0C   $base0D
   61 client.focused_inactive $base01 $base01 $base05 $base03   $base01
   62 client.unfocused        $base01 $base00 $base05 $base01   $base01
   63 client.urgent           $base08 $base08 $base00 $base08   $base08
   64 client.placeholder      $base00 $base00 $base05 $base00   $base00
   65 client.background       $base07
   66 ## Status Bar
   67 bar {
   68     position top
   69     status_command i3blocks
   70     colors {
   71         background $base00
   72         separator  $base01
   73         statusline $base04
   74 
   75         # State             Border  BG      Text
   76         focused_workspace   $base05 $base0D $base00
   77         active_workspace    $base05 $base03 $base00
   78         inactive_workspace  $base03 $base01 $base05
   79         urgent_workspace    $base08 $base08 $base00
   80         binding_mode        $base00 $base0A $base00
   81     }
   82 }
   83 ## Fibonacci splitting
   84 # Start vertical.
   85 default_orientation vertical
   86 # Toggle split at each new window.
   87 for_window [class="^"] split toggle
   88 
   89 ### Key bindings
   90 #
   91 # Basics:
   92     # lock screen
   93     bindsym $mod+Escape exec --no-startup-id $screenlocker
   94 
   95     # start a terminal
   96     bindsym $mod+Return exec --no-startup-id $TERMINAL
   97 
   98     # kill focused window, remember to toggle split back
   99     bindsym $mod+q split toggle; kill
  100 
  101     # start your launcher
  102     bindsym $mod+d exec --no-startup-id $menu
  103     bindsym XF86Search exec --no-startup-id $menu
  104 
  105     # screenshot
  106     bindsym Print exec --no-startup-id $screenshot
  107 
  108     # view clipbord
  109     bindsym $mod+v exec --no-startup-id $clipboard
  110 
  111     # network
  112     bindsym $mod+Shift+w exec --no-startup-id $networkmenu
  113 
  114     # volume
  115     bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume 0 +5% && pkill -RTMIN+10 i3blocks
  116     bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume 0 -5% && pkill -RTMIN+10 i3blocks
  117     bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute 0 toggle && pkill -RTMIN+10 i3blocks
  118 
  119     # backlight
  120     bindsym XF86MonBrightnessUp exec --no-startup-id xbacklight -ctrl intel_backlight -inc 10 && pkill -RTMIN+11 i3blocks
  121     bindsym XF86MonBrightnessDown exec --no-startup-id xbacklight -ctrl intel_backlight -dec 10 && pkill -RTMIN+11 i3blocks
  122 
  123     # music control
  124     bindsym $mod+p exec --no-startup-id $music_player
  125     bindsym XF86AudioPlay exec --no-startup-id mpc toggle && pkill -RTMIN+12 i3blocks
  126     bindsym XF86AudioPrev exec --no-startup-id mpc prev && pkill -RTMIN+12 i3blocks
  127     bindsym XF86AudioNext exec --no-startup-id mpc next && pkill -RTMIN+12 i3blocks
  128 
  129     # file manager
  130     bindsym $mod+m exec --no-startup-id $file_manager
  131 
  132     # Emacs
  133     bindsym $mod+c exec --no-startup-id emacsclient -c -a emacs
  134 
  135     # web browser
  136     bindsym $mod+b exec --no-startup-id $BROWSER
  137 
  138     # emoji and unicode character picker
  139     bindsym $mod+u exec --no-startup-id unipicker --command "rofi -dmenu" --copy-command "xargs xdotool type"
  140     bindsym $mod+Shift+u exec --no-startup-id rofimoji
  141 
  142     # window switcher
  143     bindsym $mod+Tab exec --no-startup-id rofi -show window
  144 
  145     # Drag floating windows by holding down $mod and left mouse button.
  146     # Resize them with right mouse button + $mod.
  147     # Despite the name, also works for non-floating windows.
  148     # Change normal to inverse to use left mouse button for resizing and right
  149     # mouse button for dragging.
  150     floating_modifier $mod
  151 
  152     # reload the configuration file
  153     bindsym $mod+Shift+c reload
  154 
  155 #
  156 # Moving around:
  157 #
  158     # Move your focus around
  159     bindsym $mod+$left focus left
  160     bindsym $mod+$down focus down
  161     bindsym $mod+$up focus up
  162     bindsym $mod+$right focus right
  163     # or use $mod+[up|down|left|right]
  164     bindsym $mod+Left focus left
  165     bindsym $mod+Down focus down
  166     bindsym $mod+Up focus up
  167     bindsym $mod+Right focus right
  168 
  169     # _move_ the focused window with the same, but add Shift
  170     bindsym $mod+Shift+$left move left
  171     bindsym $mod+Shift+$down move down
  172     bindsym $mod+Shift+$up move up
  173     bindsym $mod+Shift+$right move right
  174     # ditto, with arrow keys
  175     bindsym $mod+Shift+Left move left
  176     bindsym $mod+Shift+Down move down
  177     bindsym $mod+Shift+Up move up
  178     bindsym $mod+Shift+Right move right
  179 #
  180 # Workspaces:
  181 #
  182     # switch to workspace
  183     bindsym $mod+1 workspace 1
  184     bindsym $mod+2 workspace 2
  185     bindsym $mod+3 workspace 3
  186     bindsym $mod+4 workspace 4
  187     bindsym $mod+5 workspace 5
  188     bindsym $mod+6 workspace 6
  189     bindsym $mod+7 workspace 7
  190     bindsym $mod+8 workspace 8
  191     bindsym $mod+9 workspace 9
  192     bindsym $mod+0 workspace 10
  193 
  194     # move focused container to workspace
  195     bindsym $mod+Shift+1 move container to workspace 1
  196     bindsym $mod+Shift+2 move container to workspace 2
  197     bindsym $mod+Shift+3 move container to workspace 3
  198     bindsym $mod+Shift+4 move container to workspace 4
  199     bindsym $mod+Shift+5 move container to workspace 5
  200     bindsym $mod+Shift+6 move container to workspace 6
  201     bindsym $mod+Shift+7 move container to workspace 7
  202     bindsym $mod+Shift+8 move container to workspace 8
  203     bindsym $mod+Shift+9 move container to workspace 9
  204     bindsym $mod+Shift+0 move container to workspace 10
  205 
  206     # move between workspace
  207     bindsym $mod+comma workspace prev
  208     bindsym $mod+period workspace next
  209 
  210 #
  211 # Layout stuff:
  212 #
  213     # Toggles horizontal and vertical splits.
  214     bindsym $mod+slash split toggle
  215 
  216     # Switch the current container between different layout styles
  217     bindsym $mod+s layout stacking
  218     bindsym $mod+w layout tabbed
  219     bindsym $mod+e layout toggle split
  220 
  221     # Make the current focus fullscreen
  222     bindsym $mod+f fullscreen
  223 
  224     # Toggle the current focus between tiling and floating mode
  225     bindsym $mod+Shift+space floating toggle
  226 
  227     # Swap focus between the tiling area and the floating area
  228     bindsym $mod+space focus mode_toggle
  229 
  230     # move focus to the parent container
  231     bindsym $mod+a focus parent
  232 
  233     bindsym $mod+g gaps inner current plus 5
  234     bindsym $mod+Shift+g gaps inner current minus 5
  235     bindsym $mod+t gaps inner current set $gaps_inner; gaps outer current set $gaps_outer
  236     bindsym $mod+Shift+t gaps inner current set 0; gaps outer current set 0
  237 #
  238 # Scratchpad:
  239 #
  240     # Sway has a "scratchpad", which is a bag of holding for windows.
  241     # You can send windows there and get them back later.
  242 
  243     # Move the currently focused window to the scratchpad
  244     bindsym $mod+Shift+minus move scratchpad
  245 
  246     # Show the next scratchpad window or hide the focused scratchpad window.
  247     # If there are multiple scratchpad windows, this command cycles through them.
  248     bindsym $mod+minus scratchpad show
  249 #
  250 # Resizing containers:
  251 #
  252 mode "resize" {
  253     # left will shrink the containers width
  254     # right will grow the containers width
  255     # up will shrink the containers height
  256     # down will grow the containers height
  257     bindsym $left resize shrink width 10 px or 10 ppt
  258     bindsym $down resize grow height 10 px or 10 ppt
  259     bindsym $up resize shrink height 10 px or 10 ppt
  260     bindsym $right resize grow width 10 px or 10 ppt
  261 
  262     # ditto, with arrow keys
  263     bindsym Left resize shrink width 10 px or 10 ppt
  264     bindsym Down resize grow height 10 px or 10 ppt
  265     bindsym Up resize shrink height 10 px or 10 ppt
  266     bindsym Right resize grow width 10 px or 10 ppt
  267 
  268     # return to default mode
  269     bindsym Return mode "default"
  270     bindsym Escape mode "default"
  271 }
  272 bindsym $mod+r mode "resize"
  273 
  274 #
  275 # System power:
  276 #
  277 set $mode_power system: [h]ibernate [l]ogout [r]eboot [s]hutdown
  278 mode "$mode_power" {
  279     # exit sway (logs you out of your wayland session)
  280     bindsym h mode "default"; exec $screenlocker; exec $hibernate
  281     bindsym l mode "default"; exit
  282     bindsym r mode "default"; exec $reboot
  283     bindsym s mode "default"; exec $shutdown
  284     # return to default mode
  285     bindsym Return mode "default"
  286     bindsym Escape mode "default"
  287 }
  288 bindsym $mod+Shift+p mode "$mode_power"
  289 
  290 ### Startup Applications
  291 exec --no-startup-id dunst
  292 exec --no-startup-id greenclip daemon
  293 exec --no-startup-id dropbox
  294 exec --no-startup-id fcitx -d