Skip to content

Instantly share code, notes, and snippets.

@aixnr
Last active July 11, 2019 11:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aixnr/4927f1bb750c3d2e463cac0ed8849abd to your computer and use it in GitHub Desktop.
Save aixnr/4927f1bb750c3d2e463cac0ed8849abd to your computer and use it in GitHub Desktop.
i3config latest changes
## Set Mod Key
set $mod Mod4
## Set Font for Windows Title
font pango:DejaVu Sans Mono 9
## Use Mouse+$mod to Drag Floating Windows to Their Wanted Position
floating_modifier $mod
## Application Shortcut Keys
bindsym $mod+Return exec xfce4-terminal # terminal
bindsym $mod+F2 exec pcmanfm # file manager
bindsym $mod+F3 exec firefox # firefox
bindsym $mod+l exec lock # i3 blur lock
bindsym $mod+q exec xfce4-terminal --drop-down
## Kill Focused Window
bindsym $mod+Shift+q kill
## Run Quick Launcher
# bindsym $mod+d exec dmenu_run
bindsym $mod+d exec "rofi -modi drun -show drun"
## Float Specific Applications
for_window [title="Volume Control"] floating enable
for_window [title="Image Viewer"] floating enable
for_window [title="Save File"] floating enable
for_window [title="Clock"] floating enable
for_window [title="Archive Manager"] floating enable
for_window [title="Bluetooth Devices"] floating enable
for_window [class="Xfce4-panel"] floating enable
for_window [class="Shutter"] floating enable
for_window [class="Evince"] floating enable
for_window [class="Software-properties-gtk"] floating enable
for_window [class="keepassxc"] floating enable
for_window [window_role="pop-up"] floating enable
for_window [window_role="task_dialog"] floating enable
for_window [window_role="About"] floating enable
for_window [window_role="Organizer"] floating enable
## Change Focus
bindsym $mod+Left focus left
bindsym $mod+Down focus down
bindsym $mod+Up focus up
bindsym $mod+Right focus right
## Move Focused Window
bindsym $mod+Shift+j move left
bindsym $mod+Shift+k move down
bindsym $mod+Shift+l move up
bindsym $mod+Shift+semicolon move right
## Alternatively, Use the Cursor Keys:
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
## Split (H)orizontal and (V)ertical
bindsym $mod+h split h
bindsym $mod+v split v
## Enter Fullscreen for Focused Container
bindsym $mod+f fullscreen toggle
## Change Container Layout
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split
## Toggle Tiling/Floating
bindsym $mod+Shift+space floating toggle
## Change Focus Between Tiling/Floating Windows
bindsym $mod+space focus mode_toggle
## Switch to Workspace
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
## Move Focused Container to a Different Workspace
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
## Reload i3 Configuration File
bindsym $mod+Shift+c reload
## Restart i3
bindsym $mod+Shift+r restart
## Resizing Windows (you can also use the mouse for that)
bindsym $mod+r mode "resize"
mode "resize" {
bindsym j resize shrink width 10 px or 10 ppt
bindsym k resize grow height 10 px or 10 ppt
bindsym l resize shrink height 10 px or 10 ppt
bindsym semicolon resize grow width 10 px or 10 ppt
# same bindings, but for the arrow keys
bindsym Left resize shrink width 10 px or 10 ppt
bindsym Down resize grow height 10 px or 10 ppt
bindsym Up resize shrink height 10 px or 10 ppt
bindsym Right resize grow width 10 px or 10 ppt
# back to normal: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
}
## Autostart Application at Login
exec --no-startup-id /usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1
exec --no-startup-id nm-applet
exec --no-startup-id compton --backend glx --paint-on-overlay --vsync opengl-swc
exec --no-startup-id dunst
exec --no-startup-id xfce4-power-manager
exec --no-startup-id conky
exec --no-startup-id /home/aixnr/.fehbg &
exec --no-startup-id pactl load-module module-bluetooth-discover
exec --no-startup-id dropbox start
exec --no-startup-id sh -c '/usr/bin/nvidia-settings --load-config-only'
exec --no-startup-id pnmixer
## Alter Trackpad Sensitivity (Synaptic)
exec --no-startup-id synclient AreaRightEdge=3040
exec --no-startup-id synclient FingerHigh=50
exec --no-startup-id synclient FingerLow=45
## Disable Title Bar for i3-Gaps
for_window [class="^.*"] border pixel 1
## The i3-gaps (a.k.a "halal gap")
gaps inner 8
gaps outer -2
smart_gaps on
smart_borders on
## Windows Decoration Colors
# class border backgr. text indicator child_border
client.focused #4c7899 #285577 #ffffff #2e9ef4 #FF0000
client.focused_inactive #333333 #5f676a #ffffff #484e50 #5f676a
client.unfocused #333333 #222222 #888888 #292d2e #222222
client.urgent #2f343a #900000 #ffffff #900000 #900000
client.placeholder #000000 #0c0c0c #ffffff #000000 #0c0c0c
client.background #ffffff
## Exit i3
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'"
## i3bar with i3status
bar {
status_command i3status
position top
colors {
background #2f343f
statusline #2f343f
separator #4b5262
# colour of border, background, and text
focused_workspace #2f343f #bf616a #d8dee8
active_workspace #2f343f #2f343f #d8dee8
inactive_workspace #2f343f #2f343f #d8dee8
urgent_workspace #2f343f #ebcb8b #2f343f
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment