2019-10-07 10:53:41 +00:00
|
|
|
# -*- mode: conf -*-
|
2019-09-20 08:22:19 +00:00
|
|
|
# Declaration of the mod key
|
|
|
|
set $mod Mod4
|
|
|
|
set $alt Mod1
|
|
|
|
|
|
|
|
# Font for window titles
|
2019-11-03 11:41:35 +00:00
|
|
|
font DejaVuSans:monospace 8
|
2019-09-20 08:22:19 +00:00
|
|
|
|
|
|
|
# Variables
|
|
|
|
set $up Up
|
|
|
|
set $down Down
|
|
|
|
set $left Left
|
|
|
|
set $right Right
|
2019-10-07 11:48:47 +00:00
|
|
|
set $exiti3 "i3-nagbar -t warning -m 'Leave i3?' -b 'Yes' 'i3-msg exit'"
|
2019-09-20 08:22:19 +00:00
|
|
|
set $lockscreen "Lucien Cartier-Tilet\n(Phuntsok Drak-pa)\n+33 (0)6 83 90 56 89"
|
2019-10-07 11:48:47 +00:00
|
|
|
set $rofiexec "rofi -combi-modi window,drun -show combi -mohh combi -m -1 -show-icons"
|
|
|
|
set $gnus "emacsclient --create-frame --eval '(gnus)' -a nvim -n"
|
2019-09-20 08:22:19 +00:00
|
|
|
set $ec "emacsclient --create-frame -a nvim -n"
|
|
|
|
set $term st
|
|
|
|
|
|
|
|
# use Mouse+$mod to drag floating windows to their wanted position
|
|
|
|
floating_modifier $mod
|
|
|
|
|
|
|
|
################################################################################
|
|
|
|
### Clients position ###
|
|
|
|
################################################################################
|
|
|
|
|
|
|
|
assign [class="Emacs"] 2
|
|
|
|
assign [class="Chromium"] 3
|
2019-11-03 11:41:35 +00:00
|
|
|
assign [class="firefox"] 3
|
2019-09-20 08:22:19 +00:00
|
|
|
assign [class="Nemo"] 4
|
|
|
|
assign [class="Godot"] 5
|
|
|
|
assign [class="Gimp*"] 6
|
2019-10-16 09:59:41 +00:00
|
|
|
assign [class="gnome-boxes"] 8
|
2019-11-03 11:41:35 +00:00
|
|
|
assign [class="discord"] 10
|
|
|
|
assign [class="Steam"] 9
|
2019-09-20 08:22:19 +00:00
|
|
|
|
|
|
|
################################################################################
|
|
|
|
### Shortcuts ###
|
|
|
|
################################################################################
|
|
|
|
|
|
|
|
# start a terminal
|
|
|
|
bindsym $mod+Return exec $term
|
|
|
|
bindsym $mod+$alt+Return split h;; exec $term
|
|
|
|
bindsym $mod+Shift+Return split v;; exec $term
|
|
|
|
|
|
|
|
# kill focused window
|
|
|
|
bindsym $mod+q kill
|
|
|
|
bindsym $alt+F4 kill
|
|
|
|
|
|
|
|
# program launcher
|
|
|
|
bindsym $mod+Shift+d exec --no-startup-id j4-dmenu-desktop
|
|
|
|
bindsym $mod+d exec --no-startup-id $rofiexec
|
|
|
|
|
|
|
|
# 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+$left move left
|
|
|
|
bindsym $mod+Shift+$down move down
|
|
|
|
bindsym $mod+Shift+$up move up
|
|
|
|
bindsym $mod+Shift+$right move right
|
2019-10-07 10:53:41 +00:00
|
|
|
# move focused container
|
|
|
|
bindsym $mod+Ctrl+$left move container to output left
|
|
|
|
bindsym $mod+Ctrl+$down move container to output down
|
|
|
|
bindsym $mod+Ctrl+$up move container to output up
|
|
|
|
bindsym $mod+Ctrl+$right move container to output right
|
|
|
|
# move focused workspace
|
2019-10-07 10:55:27 +00:00
|
|
|
bindsym $mod+Ctrl+Shift+$left move workspace to output left
|
|
|
|
bindsym $mod+Ctrl+Shift+$down move workspace to output down
|
|
|
|
bindsym $mod+Ctrl+Shift+$up move workspace to output up
|
|
|
|
bindsym $mod+Ctrl+Shift+$right move workspace to output right
|
2019-09-20 08:22:19 +00:00
|
|
|
|
|
|
|
# Change split
|
|
|
|
bindsym $mod+h split h
|
|
|
|
bindsym $mod+v split v
|
|
|
|
bindsym $mod+t split toggle
|
|
|
|
|
|
|
|
# enter fullscreen mode for the focused container
|
|
|
|
bindsym $mod+f fullscreen toggle
|
|
|
|
|
|
|
|
# toggle tiling / floating
|
|
|
|
bindsym $mod+Shift+space floating toggle
|
|
|
|
# change focus between tiling / floating windows
|
|
|
|
bindsym $mod+space focus mode_toggle
|
|
|
|
# center floating window
|
|
|
|
bindsym Ctrl+$mod+c move position center
|
|
|
|
|
|
|
|
# Scratchpad
|
|
|
|
bindsym $mod+Shift+s move scratchpad
|
|
|
|
bindsym $mod+s scratchpad show
|
|
|
|
|
|
|
|
# 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
|
|
|
|
bindsym $mod+0 workspace 10
|
|
|
|
|
|
|
|
# move focused container to 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
|
|
|
|
|
|
|
|
# move to previous or next workspace
|
|
|
|
bindsym $mod+Tab workspace next
|
|
|
|
bindsym $mod+Shift+Tab workspace previous
|
|
|
|
|
2019-10-07 11:48:47 +00:00
|
|
|
{% if YADM_HOSTNAME == 'Marpa' -%}
|
|
|
|
# Assign workspace to designated screen
|
|
|
|
workspace 10 output eDP-1
|
|
|
|
{% endif -%}
|
|
|
|
|
2019-09-20 08:22:19 +00:00
|
|
|
# reload the configuration file
|
2019-10-23 12:51:34 +00:00
|
|
|
bindsym $mod+Shift+c exec yadm alt && i3-msg reload
|
2019-09-20 08:22:19 +00:00
|
|
|
# restart i3 inplace
|
2019-10-23 12:51:34 +00:00
|
|
|
bindsym $mod+Shift+r exec yadm alt && i3-msg restart
|
2019-09-20 08:22:19 +00:00
|
|
|
# exit i3
|
|
|
|
bindsym $mod+Shift+e exec $exiti3
|
|
|
|
|
|
|
|
# resize window (you can also use the mouse for that)
|
|
|
|
mode "resize" {
|
|
|
|
bindsym $right resize grow width 20 px or 10 ppt
|
|
|
|
bindsym $left resize shrink width 10 px or 5 ppt
|
|
|
|
bindsym $down resize grow height 10 px or 5 ppt
|
|
|
|
bindsym $up resize shrink height 10 px or 5 ppt
|
|
|
|
bindsym Return mode "default"
|
|
|
|
bindsym Escape mode "default"
|
|
|
|
}
|
|
|
|
bindsym $mod+r mode "resize"
|
|
|
|
|
|
|
|
mouse_warping none
|
|
|
|
|
|
|
|
# Keyboard layout
|
|
|
|
bindsym $mod+$alt+k exec setxkbmap fr bepo
|
|
|
|
bindsym $mod+$alt+Shift+k exec setxkbmap fr
|
|
|
|
bindsym $mod+$alt+Ctrl+k exec setxkbmap us
|
|
|
|
|
|
|
|
# bindings for MS Natural Ergonomic Keyboard 4000 ##############################
|
|
|
|
bindsym XF86Launch5 exec $ec
|
|
|
|
bindsym $mod+e exec $ec
|
|
|
|
bindsym XF86Launch6 exec chromium
|
|
|
|
bindsym $mod+c exec chromium
|
2019-10-07 11:48:47 +00:00
|
|
|
bindsym XF86HomePage exec "chromium https://labs.phundrak.fr"
|
|
|
|
bindsym XF86Search exec "chromium https://duckduckgo.com/"
|
2019-09-20 08:22:19 +00:00
|
|
|
bindsym XF86Launch9 exec nemo
|
|
|
|
bindsym $mod+n exec nemo
|
2019-10-07 11:48:47 +00:00
|
|
|
bindsym XF86Launch8 exec $gnus
|
|
|
|
bindsym XF86Mail exec $gnus
|
|
|
|
bindsym $mod+m exec $gnus
|
2019-09-20 08:22:19 +00:00
|
|
|
bindsym XF86Launch7 exec discord-canary
|
|
|
|
bindsym Ctrl+Shift+d exec discord-canary
|
2019-10-07 11:48:47 +00:00
|
|
|
bindsym XF86AudioMute exec "amixer set Master 1+ toggle"
|
|
|
|
bindsym Ctrl+$mod+Prior exec "amixer -q set Master 2%+ unmute"
|
|
|
|
bindsym XF86AudioRaiseVolume exec "amixer -q set Master 2%+ unmute"
|
|
|
|
bindsym Ctrl+$mod+Next exec "amixer -q set Master 2%- unmute"
|
|
|
|
bindsym XF86AudioLowerVolume exec "amixer -q set Master 2%- unmute"
|
|
|
|
bindsym XF86Calculator exec speedcrunch
|
|
|
|
bindsym $mod+$alt+c exec speedcrunch
|
2019-09-20 08:22:19 +00:00
|
|
|
#bindsym XF86Favourites
|
|
|
|
#bindsym Help
|
|
|
|
#bindsym Undo
|
|
|
|
#bindsym Redo
|
|
|
|
#bindsym XF86New
|
|
|
|
#bindsym SunOpen
|
|
|
|
#bindsym XF86Close
|
|
|
|
#bindsym XF86Reply
|
|
|
|
#bindsym XF86MailForward
|
|
|
|
#bindsym XF86Send
|
|
|
|
#bindsym XF86Save
|
|
|
|
|
|
|
|
bindsym $mod+F3 exec arandr
|
|
|
|
bindsym $mod+Shift+l exec dmenu-lpass
|
2019-11-03 11:41:35 +00:00
|
|
|
bindsym $mod+Shift+p exec rofi-pass
|
2019-09-20 08:22:19 +00:00
|
|
|
|
|
|
|
# Brightness keyboard shortcuts
|
2019-10-24 11:33:42 +00:00
|
|
|
bindsym XF86MonBrightnessUp exec xbacklight -inc 5
|
|
|
|
bindsym $mod+$alt+Next exec xbacklight -inc 5
|
|
|
|
bindsym XF86MonBrightnessDown exec xbacklight -dec 5
|
|
|
|
bindsym $mod+$alt+Prev exec xbacklight -dec 5
|
2019-09-20 08:22:19 +00:00
|
|
|
|
|
|
|
# Wal
|
2019-10-07 11:48:47 +00:00
|
|
|
bindsym $mod+Ctrl+w exec "wal -i ~/Pictures/Wallpapers -o wal-set"
|
2019-09-20 08:22:19 +00:00
|
|
|
|
|
|
|
# Take a screenshot
|
|
|
|
bindsym --release Print exec --no-startup-id scrot
|
2019-10-07 11:48:47 +00:00
|
|
|
bindsym --release Ctrl+Print exec --no-startup-id "scrot -s"
|
|
|
|
bindsym Shift+Print exec --no-startup-id "scrot -d 3"
|
2019-09-20 08:22:19 +00:00
|
|
|
|
|
|
|
# Lock screen
|
2019-10-07 11:48:47 +00:00
|
|
|
bindsym $mod+l exec "i3lock -fol"
|
|
|
|
bindsym $mod+$alt+h exec "systemctl suspend"
|
|
|
|
bindsym $mod+Ctrl+h exec "systemctl hibernate"
|
2019-09-20 08:22:19 +00:00
|
|
|
|
|
|
|
# SSH terminals
|
|
|
|
bindsym $mod+$alt+m exec $term ssh Mila
|
|
|
|
bindsym $mod+$alt+n exec $term ssh Naro
|
|
|
|
|
|
|
|
# Utilities
|
|
|
|
bindsym $mod+Shift+h exec $term htop
|
2019-10-23 11:03:57 +00:00
|
|
|
bindsym $mod+Ctrl+m exec rofi-mount
|
2019-10-24 21:08:51 +00:00
|
|
|
bindsym $mod+Ctrl+u exec rofi-umount
|
2019-10-23 11:03:57 +00:00
|
|
|
bindsym $mod+$alt+e exec rofi-emoji
|
2019-10-23 12:51:34 +00:00
|
|
|
bindsym $mod+w exec wacom-setup
|
2019-09-20 08:22:19 +00:00
|
|
|
|
|
|
|
# Music shortcuts
|
|
|
|
bindsym $alt+XF86AudioRaiseVolume exec mpc next
|
|
|
|
bindsym $mod+Next exec mpc next
|
|
|
|
bindsym $alt+XF86AudioLowerVolume exec mpc prev
|
|
|
|
bindsym $mod+Prior exec mpc prev
|
|
|
|
bindsym XF86AudioPlay exec mpc toggle
|
|
|
|
bindsym $mod+p exec mpc toggle
|
|
|
|
bindsym $mod+$alt+p exec mpc stop
|
|
|
|
bindsym $alt+XF86AudioPlay exec mpc stop
|
|
|
|
# below, 7 and 8 are the emplacement for `+` and `-` on the bépo layout
|
|
|
|
# respectively, hence the order
|
|
|
|
bindsym $mod+$alt+7 exec mpc volume +5
|
|
|
|
bindsym $mod+$alt+8 exec mpc volume -5
|
|
|
|
bindsym $mod+Shift+n exec $term ncmpcpp -q
|
|
|
|
bindsym $mod+Shift+v exec $term ncmpcpp -qs visualizer
|
|
|
|
|
|
|
|
################################################################################
|
|
|
|
# i3-gaps settings #
|
|
|
|
################################################################################
|
|
|
|
|
|
|
|
smart_gaps on
|
|
|
|
gaps inner 20
|
|
|
|
gaps outer -10
|
|
|
|
border_radius 10
|
|
|
|
popup_during_fullscreen leave_fullscreen
|
|
|
|
workspace_auto_back_and_forth yes
|
|
|
|
focus_follows_mouse off
|
|
|
|
|
|
|
|
# Change gaps size
|
|
|
|
bindsym $mod+g gaps inner current plus 5
|
|
|
|
bindsym $mod+Shift+g gaps inner current minus 5
|
|
|
|
bindsym $mod+Ctrl+g gaps outer current plus 5
|
|
|
|
bindsym $mod+Ctrl+Shift+g gaps outer current minus 5
|
|
|
|
bindsym $mod+$alt+g gaps inner all set 20; gaps outer all set -10
|
|
|
|
|
|
|
|
default_border pixel 0
|
|
|
|
smart_borders on
|
|
|
|
|
|
|
|
################################################################################
|
|
|
|
# Modules startup #
|
|
|
|
################################################################################
|
2019-10-20 23:23:53 +00:00
|
|
|
{% if YADM_HOSTNAME=="Marpa" -%}
|
|
|
|
exec --no-startup-id numlockx
|
|
|
|
{% endif -%}
|
2019-09-20 08:22:19 +00:00
|
|
|
exec_always --no-startup-id wal -i "$(< "${HOME}/.cache/wal/wal")"
|
2019-10-07 11:48:47 +00:00
|
|
|
exec --no-startup-id xrdb $HOME/.Xresources
|
|
|
|
exec --no-startup-id compton -F --opengl --config ~/.config/compton.conf -e 1
|
2019-09-20 08:50:35 +00:00
|
|
|
{% if YADM_HOSTNAME == 'Gampo' -%}
|
2019-09-20 08:22:19 +00:00
|
|
|
exec --no-startup-id /usr/lib/mate-polkit/polkit-mate-authentication-agent-1
|
2019-09-20 08:50:35 +00:00
|
|
|
{% endif -%}
|
2019-10-07 12:02:13 +00:00
|
|
|
exec_always --no-startup-id enable_touch
|
2019-10-23 12:51:34 +00:00
|
|
|
exec_always --no-startup-id polybar-launch
|
2019-09-20 08:22:19 +00:00
|
|
|
exec --no-startup-id xss-lock -- i3lock -fol
|
|
|
|
exec --no-startup-id mpd
|
|
|
|
exec --no-startup-id mpc stop
|
|
|
|
exec --no-startup-id mpd_discord_richpresence --no-idle --fork
|
2019-10-07 11:48:47 +00:00
|
|
|
exec --no-startup-id syndaemon -i 1.0 -t -k
|
2019-09-20 08:22:19 +00:00
|
|
|
exec --no-startup-id i3-battery-popup -N -t 2m
|
2019-10-14 11:01:21 +00:00
|
|
|
exec --no-startup-id dunst -config ~/.config/dunst/dunstrc
|
2019-10-07 11:48:47 +00:00
|
|
|
|
|
|
|
################################################################################
|
|
|
|
# Set up second output for presentation #
|
|
|
|
################################################################################
|
|
|
|
{% if YADM_HOSTNAME == 'Marpa' -%}
|
|
|
|
bindsym $mod+Ctrl+p xrandr --output HDMI-1 --mode 1024x768 --right-of eDP-1
|
|
|
|
{% else %}
|
|
|
|
bindsym $mod+Ctrl+p xrandr --output VGA1 --mode 1024x768 --right-of LVDS1
|
|
|
|
{% endif -%}
|
2019-09-20 08:22:19 +00:00
|
|
|
|
|
|
|
|
|
|
|
################################################################################
|
|
|
|
# Set colors from Xresources #
|
|
|
|
################################################################################
|
|
|
|
|
|
|
|
set_from_resource $fg i3wm.color7 #f0f0f0
|
|
|
|
set_from_resource $bg i3wm.color2 #f0f0f0
|
|
|
|
|
|
|
|
# class border backgr. text indicator child_border
|
|
|
|
client.focused $bg $bg $fg $bg $bg
|
|
|
|
client.focused_inactive $bg $bg $fg $bg $bg
|
|
|
|
client.unfocused $bg $bg $fg $bg $bg
|
|
|
|
client.urgent $bg $bg $fg $bg $bg
|
|
|
|
client.placeholder $bg $bg $fg $bg $bg
|
|
|
|
|
|
|
|
# client.background $bg
|