dotfiles/config/i3/config

238 lines
8.4 KiB
Plaintext
Raw Normal View History

2020-04-27 06:47:36 +00:00
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout some time, delete
# this file and re-run i3-config-wizard(1).
#
# note: you can use `xev` to observe the keyname
# i3 config file (v4)
#
# Please see https://i3wm.org/docs/userguide.html for a complete reference!
set $mod Mod4
# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
font pango:monospace 7
# Configure border style <normal|1pixel|pixel xx|none|pixel>
new_window pixel 2
#new_window normal 0
# Hide borders
hide_edge_borders none
# set gaps
gaps inner 5
gaps outer 0
# Smart gaps (gaps used if only more than one container on the workspace)
#smart_gaps on
# Smart borders (draw borders around container only if it is not the only container on this workspace)
# on|no_gaps (on=always activate and no_gaps=only activate if the gap size to the edge of the screen is 0)
smart_borders no_gaps
# This font is widely installed, provides lots of unicode glyphs, right-to-left
# text rendering and scalability on retina/hidpi displays (thanks to pango).
#font pango:DejaVu Sans Mono 8
# Before i3 v4.8, we used to recommend this one as the default:
# font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
# The font above is very space-efficient, that is, it looks good, sharp and
# clear in small sizes. However, its unicode glyph coverage is limited, the old
# X core fonts rendering does not support right-to-left and this being a bitmap
# font, it doesnt scale on retina/hidpi displays.
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
# define locker
set $lock "$HOME/.config/i3/lock.fish"
# Define names for default workspaces for which we configure key bindings later on.
# We use variables to avoid repeating the names in multiple places.
set $ws1 "1"
set $ws2 "2"
set $ws3 "3"
set $ws4 "4"
set $ws5 "5"
set $ws6 "6"
set $ws7 "7"
set $ws8 "8"
set $ws9 "9"
# Theme colors
# class border backgr. text indic. child_border
client.focused #5b97f7 #5b97f7 #ffffff #ff0000
client.focused_inactive #002b36 #002b36 #ffffff #073642
client.unfocused #002b36 #073642 #ffffff #073642
client.urgent #002b36 #dc322f #fdf6e3 #002b36
client.placeholder #000000 #0c0c0c #ffffff #000000
client.background #2B2C2B
# switch to workspace
bindsym $mod+1 workspace $ws1
bindsym $mod+2 workspace $ws2
bindsym $mod+3 workspace $ws3
bindsym $mod+4 workspace $ws4
bindsym $mod+5 workspace $ws5
bindsym $mod+6 workspace $ws6
bindsym $mod+7 workspace $ws7
bindsym $mod+8 workspace $ws8
bindsym $mod+9 workspace $ws9
# move focused container to workspace
bindsym $mod+Shift+1 move container to workspace $ws1; workspace $ws1
bindsym $mod+Shift+2 move container to workspace $ws2; workspace $ws2
bindsym $mod+Shift+3 move container to workspace $ws3; workspace $ws3
bindsym $mod+Shift+4 move container to workspace $ws4; workspace $ws4
bindsym $mod+Shift+5 move container to workspace $ws5; workspace $ws5
bindsym $mod+Shift+6 move container to workspace $ws6; workspace $ws6
bindsym $mod+Shift+7 move container to workspace $ws7; workspace $ws7
bindsym $mod+Shift+8 move container to workspace $ws8; workspace $ws8
bindsym $mod+Shift+9 move container to workspace $ws9; workspace $ws9
# move focused workspace
bindsym $mod+Ctrl+h move workspace to output left
bindsym $mod+Ctrl+j move workspace to output down
bindsym $mod+Ctrl+k move workspace to output up
bindsym $mod+Ctrl+l move workspace to output right
# reload the configuration file
bindsym $mod+Shift+c reload
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
bindsym $mod+Shift+r restart
# toggle compositor
bindsym $mod+Shift+o exec --no-startup-id ~/.config/picom/toggle.fish
# restart polybar
bindsym $mod+Shift+p exec --no-startup-id ~/.config/polybar/launch.sh
# restart dunst
bindsym $mod+Shift+d exec --no-startup-id "killall dunst || dunst"
# redetect monitors profile
bindsym $mod+Shift+m exec --no-startup-id autorandr --change --force
# restart input method
bindsym $mod+Shift+i exec --no-startup-id fcitx -r
# Set shut down, restart and locking features
bindsym $mod+0 mode "$mode_system"
set $mode_system (l)ock, (e)xit, (r)eboot, (s)hutdown
mode "$mode_system" {
bindsym l exec --no-startup-id $lock, mode "default"
bindsym e exec --no-startup-id i3-msg exit
bindsym r exec --no-startup-id reboot
bindsym s exec --no-startup-id shutdown now
# exit system mode: "Enter" or "Escape"
bindsym Return mode "default"
bindsym Escape mode "default"
}
# volume
bindsym XF86AudioRaiseVolume exec amixer -q sset Master 5%+ unmute
bindsym $mod+equal exec amixer -q sset Master 5%+ unmute
bindsym XF86AudioLowerVolume exec amixer -q sset Master 5%- unmute
bindsym $mod+minus exec amixer -q sset Master 5%- unmute
bindsym XF86AudioMute exec amixer -q sset Master toggle
bindsym $mod+BackSpace exec amixer -q sset Master toggle
# mpc
bindsym XF86AudioPlay exec --no-startup-id mpc toggle
bindsym $mod+backslash exec --no-startup-id mpc toggle
bindsym XF86AudioPrev exec --no-startup-id mpc prev
bindsym $mod+bracketleft exec --no-startup-id mpc prev
bindsym XF86AudioNext exec --no-startup-id mpc next
bindsym $mod+bracketright exec --no-startup-id mpc next
bindsym XF86MonBrightnessDown exec --no-startup-id xbacklight -dec 15
bindsym XF86MonBrightnessUp exec --no-startup-id xbacklight -inc 15
# change focus
bindsym $mod+h focus left
bindsym $mod+j focus down
bindsym $mod+k focus up
bindsym $mod+l focus right
# changing workspace
bindsym $mod+n workspace next
bindsym $mod+p workspace prev
bindsym mod1+Tab workspace back_and_forth
# container control
bindsym $mod+q [instance="^(?!floating-).*" con_id="__focused__"] kill
bindsym $mod+f fullscreen toggle
bindsym $mod+v split v
bindsym $mod+b split h
bindsym $mod+t layout tabbed
bindsym $mod+s layout toggle split
bindsym $mod+w focus parent
bindsym $mod+Shift+w focus child
set $step 64
bindsym $mod+m resize grow width $step px
bindsym $mod+comma resize shrink width $step px
bindsym $mod+period resize grow height $step px
bindsym $mod+slash resize shrink height $step px
# move focused window
bindsym $mod+Shift+h move left $step px
bindsym $mod+Shift+j move down $step px
bindsym $mod+Shift+k move up $step px
bindsym $mod+Shift+l move right $step px
bindsym $mod+Shift+plus gaps inner current plus 5
bindsym $mod+Shift+minus gaps inner current minus 5
bindsym $mod+Ctrl+plus gaps outer current plus 5
bindsym $mod+Ctrl+minus gaps outer current minus 5
# floating
bindsym $mod+Shift+space floating toggle
# hotkey for frequently used apps
bindsym F1 --release exec --no-startup-id flameshot gui
#bindsym $mod+Return exec urxvt
bindsym $mod+Return exec alacritty
bindsym $mod+space exec --no-startup-id "rofi -show combi"
bindsym Ctrl+Mod1+l exec --no-startup-id $lock
bindsym Ctrl+Mod1+n exec --no-startup-id chromium
bindsym Ctrl+Mod1+f exec --no-startup-id thunar
bindsym $mod+y [instance="^floating-music$"] scratchpad show move position center
bindsym $mod+g [instance="^floating-ranger$"] scratchpad show move position center
bindsym $mod+i [instance="^floating-ipython$"] scratchpad show move position center
bindsym $mod+o [instance="^floating-terminal$"] scratchpad show move position center
# toggle capslock
bindsym $mod+c exec --no-startup-id xmodmap ~/Xmodmap
# autostart apps
#exec --no-startup-id urxvt -name floating-music -e ncmpcpp
#for_window [instance="^floating-music$"] move scratchpad resize set 1600 800
#exec --no-startup-id urxvt -name floating-ranger -e ranger --cmd="unmap q"
#for_window [instance="^floating-ranger$"] move scratchpad resize set 1600 800
#exec --no-startup-id urxvt -name floating-ipython -e ipython
#for_window [instance="^floating-ipython$"] move scratchpad resize set 1600 800
#exec --no-startup-id urxvt -name floating-terminal
#for_window [instance="^floating-terminal$"] move scratchpad resize set 1600 800
#for_window [class="^ffplay$"] floating enable resize set 320 256, move position mouse
exec --no-startup-id ~/.config/picom/start.fish
exec --no-startup-id dunst
exec --no-startup-id nm-applet
exec --no8startup-id flameshot
exec --no-startup-id numlockx
exec --no-startup-id fcitx
exec --no-startup-id xss-lock $lock
exec --no-startup-id blueman-applet
exec --no-startup-id "sleep 5; nextcloud"
exec --no-startup-id ~/.config/polybar/launch.sh
exec --no-startup-id autorandr --change --force