dotfiles/config/i3/config
2016-11-20 13:34:20 +01:00

392 lines
14 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# i3 config file (v4)
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
# Set mod key (Mod1=<Alt>, Mod4=<Super>)
set $mod Mod4
# set default desktop layout (default is tiling)
# workspace_layout tabbed <stacking|tabbed>
# Configure border style <normal|1pixel|pixel xx|none|pixel>
new_window pixel 2
new_float normal
# Hide borders
hide_edge_borders both
# change borders
#bindsym $mod+u border none
#bindsym $mod+y border pixel 2
#bindsym $mod+n border normal
# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
font pango:DejaVu Sans Mono 8
font pango:Sans 8
# Use Mouse+$mod to drag floating windows
floating_modifier $mod
# kill focused window
bindsym $mod+z kill
#bindsym Mod1+F4 kill
bindsym button2 kill
# start dmenu (a program launcher)
bindsym $mod+F2 exec --no-startup-id ~/.config/i3/dmenu_run
bindsym Mod1+F2 exec --no-startup-id ~/.config/i3/dmenu_run
# Password menu
bindsym $mod+c exec --no-startup-id ~/.config/i3/passmenu
# start program launcher
bindsym $mod+d exec --no-startup-id ~/.config/i3/dmenu_run
# Update var innformations
set $up_bar killall -USR1 i3status
# Start Applications
bindsym $mod+Return exec xterm
bindsym $mod+p exec thunar
bindsym $mod+m exec qutebrowser
# Volume control
#bindsym XF86AudioRaiseVolume exec amixer -q set Master 5+ unmute; exec $up_bar
bindsym XF86AudioRaiseVolume exec pactl set-sink-volume 0 +5%; exec $up_bar
#bindsym XF86AudioLowerVolume exec amixer -q set Master 5- unmute; exec $up_bar
bindsym XF86AudioLowerVolume exec pactl set-sink-volume 0 -5%; exec $up_bar
bindsym XF86AudioMute exec amixer -q set Master toggle; exec $up_bar
bindsym $mod+F8 exec mpc prev
bindsym $mod+F9 exec mpc toggle
bindsym $mod+F10 exec mpc next
bindsym $mod+F11 exec xterm -e 'alsamixer'
bindsym $mod+F12 exec xterm -e 'alsamixer'
#Brightness control
bindsym XF86MonBrightnessDown exec xbacklight -dec 20
bindsym XF86MonBrightnessUp exec xbacklight -inc 20
# Screenshots
bindsym Print exec scrot -ue 'mv $f ~/Screenshots/'
bindsym $mod+Print exec scrot -e 'mv $f ~/Screenshots/'
bindsym Ctrl+Print exec sleep 1 && scrot -se 'mv $f ~/Screenshots/'
focus_follows_mouse yes
mouse_warping output
# change focus
bindsym $mod+h focus left
bindsym $mod+j focus down
bindsym $mod+k focus up
bindsym $mod+l focus right
## alternatively, you can use the cursor keys:
#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+h move left
bindsym $mod+Shift+j move down
bindsym $mod+Shift+k move up
bindsym $mod+Shift+l move right
## alternatively, you can 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
# workspace back and forth (with/without active container)
workspace_auto_back_and_forth yes
bindsym $mod+b workspace back_and_forth
bindsym $mod+Shift+b move container to workspace back_and_forth; workspace back_and_forth
# split in horizontal orientation
bindsym $mod+g split h
# split in vertical orientation
bindsym $mod+v split v
# toggle fullscreen mode for the focused container
bindsym $mod+f fullscreen toggle
# change container layout (stacked, tabbed, toggle split)
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
# focus the parent container
bindsym $mod+a focus parent
# focus the child container
bindsym $mod+q focus child
# Workspace names
set $WS1 1 Édition
set $WS2 2 Éxecution
set $WS3 3 Organisation
set $WS4 4 Référence
set $WS5 5 Divers 1
set $WS6 6 Divers 2
set $WS7 7 Contact
set $WS8 8 Social
set $WS9 9 Veille
set $WS10 10 Musique
# Workspace output
workspace "$WS1" output LVDS1
workspace "$WS2" output VGA1
workspace "$WS3" output LVDS1
workspace "$WS4" output VGA1
workspace "$WS5" output LVDS1
workspace "$WS6" output VGA1
workspace "$WS7" output LVDS1
workspace "$WS8" output VGA1
workspace "$WS9" output LVDS1
workspace "$WS10" output VGA1
# 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
bindsym $mod+0 workspace $WS10
#navigate workspaces next / previous
bindsym $mod+Ctrl+h workspace prev_on_output
bindsym $mod+Ctrl+l workspace next_on_output
bindsym $mod+Ctrl+j workspace prev
bindsym $mod+Ctrl+k workspace next
##navigate workspaces next / previous (arrow keys)
#bindsym $mod+Ctrl+Left workspace prev_on_output
#bindsym $mod+Ctrl+Right workspace next_on_output
#bindsym $mod+Ctrl+Down workspace prev
#bindsym $mod+Ctrl+Up workspace next
# Move to workspace next / previous with focused container
bindsym $mod+Ctrl+Shift+h move container to workspace prev_on_output; workspace prev_on_output
bindsym $mod+Ctrl+Shift+l move container to workspace next_on_output; workspace next_on_output
bindsym $mod+Ctrl+Shift+j move container to workspace prev; workspace prev
bindsym $mod+Ctrl+Shift+k move container to workspace next; workspace next
## Move to workspace next / previous with focused container (arrow keys)
#bindsym $mod+Ctrl+Shift+Left move container to workspace prev_on_output; workspace prev_on_output
#bindsym $mod+Ctrl+Shift+Right move container to workspace next_on_output; workspace next_on_output
#bindsym $mod+Ctrl+Shift+Down move container to workspace prev; workspace prev
#bindsym $mod+Ctrl+Shift+Up move container to workspace next; workspace next
# move focused container to workspace
bindsym $mod+ctrl+1 move container to workspace $ws1
bindsym $mod+ctrl+2 move container to workspace $ws2
bindsym $mod+ctrl+3 move container to workspace $ws3
bindsym $mod+ctrl+4 move container to workspace $ws4
bindsym $mod+ctrl+5 move container to workspace $ws5
bindsym $mod+ctrl+6 move container to workspace $ws6
bindsym $mod+ctrl+7 move container to workspace $ws7
bindsym $mod+ctrl+8 move container to workspace $ws8
bindsym $mod+ctrl+9 move container to workspace $ws9
bindsym $mod+ctrl+0 move container to workspace $ws10
# move to workspace with focused container
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
bindsym $mod+shift+0 move container to workspace $ws10; workspace $ws10
## move workspaces to screen
#bindsym $mod+ctrl+shift+r move workspace to output right
#bindsym $mod+ctrl+shift+l move workspace to output left
#bindsym $mod+Ctrl+Shift+u move workspace to output above
#bindsym $mod+Ctrl+Shift+d move workspace to output below
# move workspaces to screen (arrow keys)
bindsym $mod+ctrl+shift+Right move workspace to output right
bindsym $mod+ctrl+shift+Left move workspace to output left
bindsym $mod+Ctrl+Shift+Up move workspace to output above
bindsym $mod+Ctrl+Shift+Down move workspace to output below
# Open applications on specific workspaces
assign [class="Thunderbird"] $WS7
assign [class="Skype"] $WS7
assign [class="Pidgin"] $WS7
assign [class="Clementine"] $WS10
assign [title="TweetDeck"] $WS8
# Open specific applications in floating mode
for_window [title="alsamixer"] floating enable border pixel 2
for_window [class="Firefox"] layout tabbed
for_window [class="qutebrowser"] layout tabbed
for_window [window_role="pop-up"] floating enable
for_window [window_role="task_dialog"] floating enable
# switch to workspace with urgent window automatically
for_window [urgent=latest] focus
# focus urgent window
bindsym $mod+x [urgent=latest] focus
# 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
# exit i3 (logs you out of your X session)
bindsym $mod+Shift+e exit
# Set shut down, restart and locking features
set $locker $HOME/.config/i3/lock
set $mode_system [L] Vérouillage [E] Déconnexion [S] Veille [H] Hibernation [R] Redémarrage [P] Extinction
mode "$mode_system" {
bindsym l exec --no-startup-id $locker, mode "default"
bindsym e exit, mode "default"
bindsym s exec --no-startup-id systemctl suspend, mode "default"
bindsym h exec --no-startup-id systemctl hibernate, mode "default"
bindsym r exec --no-startup-id systemctl reboot, mode "default"
bindsym p exec --no-startup-id systemctl poweroff -i, mode "default"
# back to normal: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+Escape mode "$mode_system"
# resize window (you can also use the mouse for that)
mode "Resize" {
# These bindings trigger as soon as you enter the resize mode
# Pressing left will shrink the windows width.
# Pressing right will grow the windows width.
# Pressing up will shrink the windows height.
# Pressing down will grow the windows height.
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
## 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"
}
bindsym $mod+r mode "Resize"
set $background exec --no-startup-id feh --bg-scale $HOME/.config/i3/bg.jpg
bindsym $mod+Shift+a $background
set $mode_screen_select [V] VGA1 [H] HDMI1
mode "$mode_screen_select" {
bindsym v mode "$mode_screen_VGA1"
bindsym h mode "$mode_screen_HDMI1"
# back to normal: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+t mode "$mode_screen_select"
set $mode_screen_VGA1 VGA [R] Right [L] Left [U] Up [D] Down [C] Copy [O] Off
mode "$mode_screen_VGA1" {
bindsym r exec xrandr --output VGA1 --auto --right-of LVDS1; $background
bindsym l exec xrandr --output VGA1 --auto --left-of LVDS1; $background
bindsym u exec xrandr --output VGA1 --auto --above LVDS1; $background
bindsym d exec xrandr --output VGA1 --auto --below LVDS1; $background
bindsym c exec xrandr --output VGA1 --auto --same-as LVDS1; $background
bindsym o exec xrandr --output VGA1 --auto --off; $background
# back to normal: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
}
set $mode_screen_HDMI1 HDMI [R] Right [L] Left [U] Up [D] Down [C] Copy [O] Off
mode "$mode_screen_HDMI1" {
bindsym r exec xrandr --output HDMI1 --auto --right-of LVDS1; $background
bindsym l exec xrandr --output HDMI1 --auto --left-of LVDS1; $background
bindsym u exec xrandr --output HDMI1 --auto --above LVDS1; $background
bindsym d exec xrandr --output HDMI1 --auto --below LVDS1; $background
bindsym c exec xrandr --output HDMI1 --auto --same-as LVDS1; $background
bindsym o exec xrandr --output HDMI1 --auto --off; $background
# back to normal: Enter or Escape
bindsym Return mode "default"
bindsym Escape mode "default"
}
# Start i3bar to display a workspace bar (plus the system information i3status if available)
bar {
#i3bar_command ~/.config/lemonbar/i3_lemonbar.sh
mode hide
status_command ~/.config/i3status/status.sh
# wheel_up_cmd nop
# wheel_down_cmd nop
font pango:DejaVu Sans Mono 9
font pango:Sans 8
colors {
separator #4E9C00
background #333333
statusline #FFFFFF
focused_workspace #4E9C00 #4E9C00 #FFFFFF
active_workspace #333333 #333333 #FFFFFF
inactive_workspace #333333 #222222 #888888
urgent_workspace #C20000 #C20000 #FFFFFF
}
}
# Inactivity settings
exec --no-startup-id xautolock -time 10 -locker 'xset dpms force standby' -killtime 1 -killer '$locker'
bindsym $mod+F4 exec --no-startup-id xautolock -disable
bindsym $mod+F5 exec --no-startup-id xautolock -enable
# Autostart applications
$background
exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 # Password remembering
exec --no-startup-id gnome-keyring-daemon # Password remembering
exec --no-startup-id numlockx on # Activate Num lock
#exec --no-startup-id nm-applet # Network manager tray icon
#exec --no-startup-id compton -b # Compositing manager
#exec --no-startup-id conky -c $HOME/.conky/status # Desktop widget
exec --no-startup-id unclutter # Hide mouse cursor after some time
exec --no-startup-id dunst # Notifications
# Autostart programs
#exec --no-startup-id i3-msg 'workspace $WS8; exec firefox --new-window tweetdeck.twitter.com'
#exec --no-startup-id i3-msg 'workspace $WS9; exec firefox --new-window rss.frogeye.fr'
#exec --no-startup-id clementine
#exec --no-startup-id evolution
#exec --no-startup-id pidgin
# Theme colors
client.focused #4E9C00 #4E9C00 #FFFFFF #FFFFFF
client.focused_inactive #1B3600 #1B3600 #888888 #FFFFFF
client.unfocused #333333 #333333 #888888 #FFFFFF
client.urgent #C20000 #C20000 #FFFFFF #FFFFFF