2018-05-03 20:23:53 +02:00
|
|
|
# i3 config file (v4)
|
|
|
|
|
2019-11-14 15:35:59 +01:00
|
|
|
##################################
|
|
|
|
# STARTING CONFIGURATION
|
|
|
|
##################################
|
|
|
|
# Mod1 = alt
|
2018-05-03 20:23:53 +02:00
|
|
|
set $mod Mod1
|
|
|
|
|
2019-11-17 22:34:18 +01:00
|
|
|
set $resize_mode Resize — [←] [→] [↑] [↓]
|
|
|
|
set $film_mode Film Mode — [u]p [d]own
|
2019-11-15 15:42:50 +01:00
|
|
|
|
2019-11-14 15:35:59 +01:00
|
|
|
# font for window titles.
|
2021-11-24 14:39:05 +01:00
|
|
|
font pango:Roboto, Bold 10
|
2018-05-03 20:23:53 +02:00
|
|
|
|
2019-11-14 15:35:59 +01:00
|
|
|
# use Mouse+$mod to drag floating windows to their wanted position
|
2018-05-03 20:23:53 +02:00
|
|
|
floating_modifier $mod
|
|
|
|
|
2019-11-14 15:35:59 +01:00
|
|
|
# no border nor title
|
|
|
|
new_window none
|
|
|
|
|
|
|
|
# hide borders when touching edges
|
|
|
|
hide_edge_borders both
|
|
|
|
|
|
|
|
# do not sync mouse position and focus
|
|
|
|
focus_follows_mouse no
|
|
|
|
|
2019-11-19 16:32:30 +01:00
|
|
|
# if a popup is coming when an app is fullscreen, leave the fullscreen
|
|
|
|
popup_during_fullscreen leave_fullscreen
|
|
|
|
|
|
|
|
# let urgency hint when switching to workspace
|
|
|
|
force_display_urgency_hint 500 ms
|
|
|
|
|
2019-11-14 15:35:59 +01:00
|
|
|
# script to lock the screen
|
|
|
|
set $Locker ~/.config/i3/lock/lock.sh
|
|
|
|
|
|
|
|
# settings for i3 gaps
|
|
|
|
gaps inner 10
|
|
|
|
gaps outer 0
|
|
|
|
smart_gaps on
|
|
|
|
|
|
|
|
##################################
|
|
|
|
# PROGRAMS STARTED AUTOMATICALLY
|
|
|
|
##################################
|
|
|
|
|
|
|
|
#start compositor
|
2020-09-22 19:06:32 +02:00
|
|
|
exec --no-startup-id picom --config ~/.config/picom.conf
|
2019-11-14 15:35:59 +01:00
|
|
|
|
2022-01-26 11:36:28 +01:00
|
|
|
#start NetworkManager applet
|
|
|
|
exec --no-startup-id nm-applet
|
|
|
|
|
2019-11-14 15:35:59 +01:00
|
|
|
#start polybar
|
2019-11-14 16:09:40 +01:00
|
|
|
exec_always --no-startup-id $HOME/.config/polybar/scripts/launch_polybar.sh
|
2019-11-14 15:35:59 +01:00
|
|
|
|
|
|
|
# configure keyboard layout
|
|
|
|
exec setxkbmap fr
|
|
|
|
|
|
|
|
# set numlock on
|
|
|
|
exec numlockx on
|
|
|
|
|
|
|
|
# turn to black screen after 9 minutes of doing nothing
|
|
|
|
exec --no-startup-id xset dpms 600
|
|
|
|
|
|
|
|
# autolock after 9 minutes of doing nothing
|
2021-11-24 14:39:05 +01:00
|
|
|
exec --no-startup-id xautolock -time 9 -locker $Locker -corners ----
|
2019-11-14 15:35:59 +01:00
|
|
|
|
|
|
|
# notifications
|
|
|
|
exec dunst
|
|
|
|
|
|
|
|
# set ALSA initial volume
|
|
|
|
exec --no-startup-id amixer -D hw:PCH -M sset Master 50%
|
|
|
|
|
|
|
|
# standard apps for working
|
|
|
|
exec standardnotes-desktop
|
2020-06-03 10:21:25 +02:00
|
|
|
exec --no-startup-id i3-msg 'workspace 3; exec firefox'
|
2019-11-14 15:35:59 +01:00
|
|
|
exec thunderbird
|
|
|
|
exec signal-desktop
|
2020-05-08 19:13:46 +02:00
|
|
|
exec telegram-desktop
|
2022-03-13 16:45:18 +01:00
|
|
|
exec obsidian
|
2019-11-14 15:35:59 +01:00
|
|
|
|
2020-12-14 09:56:00 +01:00
|
|
|
exec --no-startup-id i3-msg 'workspace number 1; exec i3-sensible-terminal'
|
2019-11-15 15:47:40 +01:00
|
|
|
|
2020-12-14 09:56:00 +01:00
|
|
|
# fetch keys from HSM
|
|
|
|
exec --no-startup-id gpg --card-status
|
2022-03-17 16:20:49 +01:00
|
|
|
|
|
|
|
# nextcloud sync client
|
|
|
|
exec nextcloud
|
2019-11-14 15:35:59 +01:00
|
|
|
##################################
|
|
|
|
# BINDINGS FOR STARTING PROGRAMS
|
|
|
|
##################################
|
2018-05-03 20:23:53 +02:00
|
|
|
# start a terminal
|
|
|
|
bindsym $mod+Return exec i3-sensible-terminal
|
2021-01-30 20:46:47 +01:00
|
|
|
# start SSH connexion to all VMs
|
|
|
|
bindsym $mod+Shift+Return exec terminator -l picasoft
|
2018-05-03 20:23:53 +02:00
|
|
|
|
2019-11-14 15:35:59 +01:00
|
|
|
# start rofi (a program launcher)
|
2018-07-27 20:34:21 +02:00
|
|
|
bindsym $mod+d exec rofi -show run -theme sidebar
|
|
|
|
bindsym $mod+Shift+d exec ~/.config/rofi/emoji-picker.py
|
2018-05-03 20:23:53 +02:00
|
|
|
|
2019-11-14 15:35:59 +01:00
|
|
|
# just lock the screen
|
|
|
|
bindsym $mod+l exec --no-startup-id $Locker && sleep 1
|
|
|
|
|
|
|
|
# lock and suspend to RAM
|
|
|
|
bindsym $mod+Shift+l exec --no-startup-id $Locker && systemctl suspend
|
|
|
|
|
2020-01-08 17:57:51 +01:00
|
|
|
# open Explorer
|
|
|
|
bindsym Mod4+e exec nemo
|
2019-11-14 15:35:59 +01:00
|
|
|
|
|
|
|
# screenshot and save to file
|
2020-05-14 13:07:55 +02:00
|
|
|
bindsym Shift+Print exec ~/.config/i3/scripts/screenshot.py -s
|
2019-11-14 15:35:59 +01:00
|
|
|
# screenshot and upload to Lychee
|
|
|
|
bindsym Print exec ~/.config/i3/scripts/screenshot.py -u
|
2021-01-05 12:43:30 +01:00
|
|
|
# screenshot with flameshot
|
2021-01-05 12:45:56 +01:00
|
|
|
bindsym $mod+Shift+i exec flameshot gui
|
2019-11-14 15:35:59 +01:00
|
|
|
|
2019-11-17 22:34:18 +01:00
|
|
|
mode "$film_mode" {
|
2019-11-15 15:42:50 +01:00
|
|
|
bindsym u exec ~/.config/i3/scripts/film_mode.sh on
|
|
|
|
bindsym d exec ~/.config/i3/scripts/film_mode.sh off
|
2019-11-17 22:18:57 +01:00
|
|
|
bindsym Escape mode "default"
|
2019-11-15 15:42:50 +01:00
|
|
|
}
|
2019-11-14 15:53:55 +01:00
|
|
|
# toggle film mode
|
2019-11-17 22:34:18 +01:00
|
|
|
bindsym $mod+Shift+f mode "$film_mode"
|
2019-11-14 15:53:55 +01:00
|
|
|
|
2020-05-14 15:29:26 +02:00
|
|
|
# pass
|
2020-09-24 15:01:19 +02:00
|
|
|
bindsym $mod+p exec passmenu
|
|
|
|
bindsym $mod+Shift+p exec picamenu
|
2019-11-20 23:09:30 +01:00
|
|
|
|
2020-05-14 15:29:26 +02:00
|
|
|
|
2020-09-24 15:04:06 +02:00
|
|
|
# umount all SSHFS
|
|
|
|
bindsym $mod+Shift+u exec ~/.config/i3/scripts/umount_sshfs.sh
|
2019-11-14 15:35:59 +01:00
|
|
|
##################################
|
|
|
|
# BINDINGS FOR STANDARD OPERATIONS
|
|
|
|
##################################
|
|
|
|
# kill focused window
|
|
|
|
bindsym $mod+q kill
|
|
|
|
|
|
|
|
# change focus
|
2018-05-03 20:23:53 +02:00
|
|
|
bindsym $mod+Left focus left
|
|
|
|
bindsym $mod+Down focus down
|
|
|
|
bindsym $mod+Up focus up
|
|
|
|
bindsym $mod+Right focus right
|
|
|
|
|
2019-11-14 15:35:59 +01:00
|
|
|
# move containers
|
2018-05-03 20:23:53 +02:00
|
|
|
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)
|
2019-11-19 17:18:24 +01:00
|
|
|
bindsym $mod+e layout toggle splith splitv tabbed
|
2018-05-03 20:23:53 +02:00
|
|
|
|
|
|
|
# toggle tiling / floating
|
2019-11-14 15:35:59 +01:00
|
|
|
bindsym $mod+space floating toggle
|
2018-05-03 20:23:53 +02:00
|
|
|
|
|
|
|
# change focus between tiling / floating windows
|
2019-11-14 15:35:59 +01:00
|
|
|
bindsym $mod+Shift+space focus mode_toggle
|
2018-05-03 20:23:53 +02:00
|
|
|
|
|
|
|
# focus the parent container
|
2019-11-14 15:35:59 +01:00
|
|
|
bindsym $mod+a focus parent
|
2018-05-03 20:23:53 +02:00
|
|
|
|
|
|
|
# switch to workspace
|
2018-05-16 00:29:14 +02:00
|
|
|
bindsym $mod+ampersand workspace number 1
|
|
|
|
bindsym $mod+eacute workspace number 2
|
|
|
|
bindsym $mod+quotedbl workspace number 3
|
|
|
|
bindsym $mod+apostrophe workspace number 4
|
|
|
|
bindsym $mod+parenleft workspace number 5
|
|
|
|
bindsym $mod+minus workspace number 6
|
|
|
|
bindsym $mod+egrave workspace number 7
|
|
|
|
bindsym $mod+underscore workspace number 8
|
|
|
|
bindsym $mod+ccedilla workspace number 9
|
|
|
|
bindsym $mod+agrave workspace number 10
|
2018-05-03 20:23:53 +02:00
|
|
|
|
|
|
|
# move focused container to workspace
|
|
|
|
bindsym $mod+Shift+ampersand move container to workspace 1
|
|
|
|
bindsym $mod+Shift+eacute move container to workspace 2
|
|
|
|
bindsym $mod+Shift+quotedbl move container to workspace 3
|
|
|
|
bindsym $mod+Shift+apostrophe move container to workspace 4
|
|
|
|
bindsym $mod+Shift+5 move container to workspace 5
|
|
|
|
bindsym $mod+Shift+minus move container to workspace 6
|
|
|
|
bindsym $mod+Shift+egrave move container to workspace 7
|
|
|
|
bindsym $mod+Shift+underscore move container to workspace 8
|
|
|
|
bindsym $mod+Shift+ccedilla move container to workspace 9
|
|
|
|
bindsym $mod+Shift+agrave move container to workspace 10
|
|
|
|
|
|
|
|
# reload the configuration file
|
|
|
|
bindsym $mod+Shift+c reload
|
2019-11-14 15:35:59 +01:00
|
|
|
|
2018-05-03 20:23:53 +02:00
|
|
|
# restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
|
|
|
|
bindsym $mod+Shift+r restart
|
|
|
|
|
|
|
|
# resize window (you can also use the mouse for that)
|
2019-11-17 22:34:18 +01:00
|
|
|
mode "$resize_mode" {
|
2020-01-24 11:57:08 +01:00
|
|
|
bindsym Left resize shrink width 40 px or 20 ppt; move position center
|
|
|
|
bindsym Down resize grow height 40 px or 20 ppt; move position center
|
|
|
|
bindsym Up resize shrink height 40 px or 20 ppt; move position center
|
|
|
|
bindsym Right resize grow width 40 px or 20 ppt; move position center
|
2018-05-03 20:23:53 +02:00
|
|
|
bindsym Escape mode "default"
|
|
|
|
}
|
|
|
|
|
2019-11-17 22:34:18 +01:00
|
|
|
bindsym $mod+r mode "$resize_mode"
|
2018-05-03 20:23:53 +02:00
|
|
|
|
2021-11-24 15:23:33 +01:00
|
|
|
##################################
|
|
|
|
# BINDINGS FOR NOTIFICATIONS
|
|
|
|
##################################
|
|
|
|
|
|
|
|
bindsym Control+space exec dunstctl close
|
|
|
|
bindsym Control+$mod+space exec dunstctl history-pop
|
|
|
|
bindsym Control+$mod+g exec dunstctl context
|
|
|
|
|
2019-11-14 15:35:59 +01:00
|
|
|
##################################
|
|
|
|
# OPERATIONS FOR SPECIFIC WINDOWS
|
|
|
|
##################################
|
2018-05-03 20:23:53 +02:00
|
|
|
|
2019-11-14 15:35:59 +01:00
|
|
|
# some windows will float automatically
|
2019-11-19 17:12:10 +01:00
|
|
|
for_window [class="Thunderbird"] floating enable
|
2018-07-27 19:56:28 +02:00
|
|
|
for_window [window_role="Steam"] floating enable
|
2018-05-03 20:23:53 +02:00
|
|
|
for_window [window_role="About"] floating enable
|
|
|
|
for_window [window_role="Organizer"] floating enable
|
2018-05-16 00:29:14 +02:00
|
|
|
for_window [title="^Terminator *"] floating enable
|
|
|
|
for_window [window_role="pop-up"] floating enable
|
|
|
|
for_window [window_role="task_dialog"] floating enable
|
|
|
|
for_window [title="Preferences$"] floating enable
|
2020-05-08 19:25:10 +02:00
|
|
|
for_window [class="Telegram"] floating enable
|
2018-05-16 00:29:14 +02:00
|
|
|
|
2019-11-19 17:12:10 +01:00
|
|
|
for_window [class="Thunderbird"] move position center
|
|
|
|
|
2019-11-14 15:35:59 +01:00
|
|
|
# scratchpad
|
2022-03-13 16:50:32 +01:00
|
|
|
# Make the currently focused window a scratchpad
|
|
|
|
bindsym $mod+Shift+BackSpace move scratchpad
|
2019-11-19 17:12:10 +01:00
|
|
|
for_window [class="Signal"] move scratchpad
|
2020-05-08 19:25:10 +02:00
|
|
|
for_window [class="Telegram"] move scratchpad
|
2019-11-19 17:12:10 +01:00
|
|
|
# we don't use class="Thunderbird" to not move windows like "MsgCompose" to scratchpad : only the main window will be in scratchpad
|
|
|
|
for_window [instance="Mail"] move scratchpad
|
2020-05-08 19:13:46 +02:00
|
|
|
bindsym $mod+Shift+m [instance="Mail"] scratchpad show, move position center
|
2019-11-19 17:12:10 +01:00
|
|
|
bindsym $mod+Shift+s [class="Signal"] scratchpad show, move position center
|
2020-05-08 19:25:10 +02:00
|
|
|
bindsym $mod+Shift+t [class="Telegram"] scratchpad show, move position center
|
2022-03-16 11:20:35 +01:00
|
|
|
bindsym Mod4+ampersand [title="(?i)perso.*obsidian"] scratchpad show, move container to workspace 4, workspace 4, floating disable
|
|
|
|
bindsym Mod4+eacute [title="(?i)tech.*obsidian"] scratchpad show, move container to workspace 4, workspace 4, floating disable
|
|
|
|
bindsym Mod4+quotedbl [title="(?i)identibat.*obsidian"] scratchpad show, move container to workspace 4, workspace 4, floating disable
|
|
|
|
bindsym Mod4+apostrophe [title="(?i).*isorédu.*obsidian"] scratchpad show, move container to workspace 4, workspace 4, floating disable
|
2019-10-02 22:12:55 +02:00
|
|
|
|
2019-11-14 15:35:59 +01:00
|
|
|
# automatic workspace
|
2022-03-16 11:20:35 +01:00
|
|
|
assign [class="(?i)Obsidian"] → number 4
|
2019-11-19 17:12:10 +01:00
|
|
|
assign [class="(?i)Tor Browser"] → number 5
|