Skip to content

Instantly share code, notes, and snippets.

@TituxMetal
Last active June 2, 2019 13:41
Show Gist options
  • Select an option

  • Save TituxMetal/81be68e7b371cfa68c20d42e1a7d4cb4 to your computer and use it in GitHub Desktop.

Select an option

Save TituxMetal/81be68e7b371cfa68c20d42e1a7d4cb4 to your computer and use it in GitHub Desktop.
i3 configuration
################ Disable screensaver on startup#############################
exec --no-startup-id xset s off
exec --no-startup-id xset -dpms
##################### Mod key CMD ##########################################
set $mod Mod4
#################### Triple Screen settings ##################################
set $screen1 DVI-I-1
set $screen2 DVI-D-1
set $screen3 HDMI-1
exec --no-startup-id ~/bin/login
bindsym $mod+Control+j exec --no-startup-id ~/bin/triplescreen
#################### Dual Screen Center + Right settings ##################################
bindsym $mod+Control+h exec --no-startup-id "xrandr --output $screen3 --off"
#################### Dual Screen Center + left settings ##################################
bindsym $mod+Control+g exec --no-startup-id "xrandr --output $screen2 --off"
#################### Font settings ###########################
font pango: Droid Sans Mono, Icons 10
################### Wallpaper ###############################
exec --no-startup-id ~/bin/background
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
bindsym $mod+Tab layout toggle all
# Enable workspace back and forth
workspace_auto_back_and_forth yes
workspace_layout stacking
# Disable the focus when Firefox is refreshing
focus_on_window_activation none
# start a terminal
bindsym $mod+Return exec xfce4-terminal
# kill focused window
bindsym $mod+q kill
# Volume keys setting
bindsym XF86AudioLowerVolume exec --no-startup-id "amixer -q set Master 2%- unmute"
bindsym XF86AudioRaiseVolume exec --no-startup-id "amixer -q set Master 2%+ unmute"
bindsym XF86AudioMute exec --no-startup-id "amixer -q -D pulse set Master toggle"
# Make a screenshot (F15)
bindcode 193 exec scrot -ucd 0 -e 'mv $f ~/Images/shots/'
# start rofi (a program launcher)
bindsym $mod+d exec rofi -show run
# change focus
bindsym $mod+j focus left
bindsym $mod+k focus down
bindsym $mod+l focus up
bindsym $mod+m 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+j move left
bindsym $mod+Shift+k move down
bindsym $mod+Shift+l move up
bindsym $mod+Shift+m 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
# split in horizontal orientation
bindsym $mod+h split h
# split in vertical orientation
bindsym $mod+v split v
# enter fullscreen mode for the focused container
bindsym $mod+f fullscreen toggle
# change container layout (stacked, tabbed, toggle split)
bindsym $mod+w layout stacking
bindsym $mod+x layout tabbed
bindsym $mod+c 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+Shift+q focus parent
bindsym $mod+Shift+minus move scratchpad
bindsym $mod+Control+minus scratchpad show
# Correct handling of windows
for_window [window_role="pop-up"] floating enable
for_window [window_role="bubble"] floating enable
for_window [window_role="task_dialog"] floating enable
for_window [window_role="dialog"] floating enable
for_window [window_role="menu"] floating enable
for_window [window_role="Preferences"] floating enable
for_window [window_role="About"] floating enable
for_window [window_type="splash"] floating enable
################# Target window on specific workspace ##################
for_window [class="^Default - Wine desktop"] floating enable
assign [class="Visual Studio Code"] $one
assign [class="Quodlibet"] $six
assign [class="Thunderbird"] $five
assign [class="^Mate-system-monitor$"] $seven
############ Workspaces ###################
# Naming each workspaces
set $one "1:/"
set $two "2:!"
set $three "3:)"
set $four "4:/"
set $five "5: Mail"
set $six "6: Music"
set $seven "7: Monit"
set $height "8:Tchat"
set $nine "9:+"
set $ten "10:+"
set $eleven "11:+"
set $twelve "12:+"
# switch to workspace
bindsym $mod+ampersand workspace $one
bindsym $mod+eacute workspace $two
bindsym $mod+quotedbl workspace $three
bindsym $mod+apostrophe workspace $four
bindsym $mod+parenleft workspace $five
bindsym $mod+section workspace $six
bindsym $mod+egrave workspace $seven
bindsym $mod+exclam workspace $height
bindsym $mod+ccedilla workspace $nine
bindsym $mod+agrave workspace $ten
bindsym $mod+XF86KbdBrightnessDown workspace $eleven
bindsym $mod+XF86KbdBrightnessUp workspace $twelve
# Switch to next/previous workspace
bindsym $mod+parenright workspace prev
bindsym $mod+minus workspace next
bindsym $mod+Control+Left workspace prev
bindsym $mod+Control+Right workspace next
# move focused container to workspace
bindsym $mod+Shift+ampersand move container to workspace $one
bindsym $mod+Shift+eacute move container to workspace $two
bindsym $mod+Shift+quotedbl move container to workspace $three
bindsym $mod+Shift+apostrophe move container to workspace $four
bindsym $mod+Shift+5 move container to workspace $five
bindsym $mod+Shift+section move container to workspace $six
bindsym $mod+Shift+egrave move container to workspace $seven
bindsym $mod+Shift+exclam move container to workspace $height
bindsym $mod+Shift+ccedilla move container to workspace $nine
bindsym $mod+Shift+agrave move container to workspace $ten
bindsym $mod+Shift+XF86KbdBrightnessDown move container to workspace $eleven
bindsym $mod+Shift+XF86KbdBrightnessUp move container to workspace $twelve
workspace $one output $screen1
workspace $two output $screen3
workspace $three output $screen2
workspace $four output $screen1
workspace $five output $screen3
workspace $six output $screen1
workspace $seven output $screen2
workspace $height output $screen1
# 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 mode #############################
set $exit Exit mode press: (l) logout, (o) poweroff, (r) reboot
mode "$exit"{
bindsym l exec --no-startup-id i3-msg exit, mode "default"
bindsym o exec --no-startup-id systemctl poweroff -i, mode "default"
bindsym r exec --no-startup-id systemctl reboot, mode "default"
# back to default mode
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $mod+Escape mode "$exit"
##################### Resize mode #########################
mode "resize" {
# These bindings trigger as soon as you enter the resize mode
# Pressing left will shrink the window’s width.
# Pressing right will grow the window’s width.
# Pressing up will shrink the window’s height.
# Pressing down will grow the window’s height.
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 m 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"
client.background #000000
client.placeholder #000000 #0c0c0c #ffffff #000000
client.focused #007fff #317eac #eeeeee
client.focused_inactive #333333 #333333 #00ccff #484e50
client.unfocused #333333 #444444 #e88e00 #292d2e
# Start i3bar to display a workspace bar (plus the system information i3status
# finds out, if available)
bar {
id bar-1
output $screen1
tray_output $screen1
status_command i3status --config ~/.i3/i3status.conf
position top
id bar-2
output $screen2
id bar-3
output $screen3
colors {
background #222222
statusline #00ccff
separator #666666
focused_workspace #008fff #007fff #ffffff
active_workspace #333333 #5f676a #ffffff
inactive_workspace #333333 #222222 #888888
urgent_workspace #aa0000 #990000 #ffffff
}
}
general {
colors = true
interval = 1
}
order += "tztime local"
order += "cpu_usage"
order += "cpu_temperature 0"
order += "disk /"
order += "disk /media/AllDataZ"
order += "volume master"
order += "ethernet enp4s0"
volume master {
format = "♪: %volume"
format_muted = "♪: muted (%volume)"
device = "default"
mixer = "Master"
mixer_idx = 0
}
cpu_temperature 0 {
format = " T: %degrees °C "
max_threshold = "30"
}
ethernet enp4s0 {
format_up = " Eth: %ip "
format_down = " Eth: down "
}
tztime local {
format = "%tIl est %H:%M le %a %d %b semaine %V %t"
timezone = "Europe/Paris"
}
disk "/" {
format = " sda: %avail "
}
disk "/media/AllDataZ" {
format = " dataz: %avail "
}
cpu_usage {
format = " CPU %usage "
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment