ADD i3 config file

This commit is contained in:
Alexandre LUCAZEAU 2022-01-21 11:10:40 +01:00
parent faea66d1e1
commit 76e4fa8a78
2 changed files with 147 additions and 0 deletions

144
nixpkgs/configs/i3config Normal file
View File

@ -0,0 +1,144 @@
# version : 20220121
set $mod Mod4
set $ALT Mod1
# Couleurs barre de titre et contour des fenetres
set $blue #005588
set $gray1 #484848
set $gray2 #333333
set $ws1 "1: console"
set $ws2 "2: office"
set $ws3 "3: web"
# Couleur des fenetres avec et sans focus
client.focused $gray1 $gray1 #FFFFFF #333333
client.focused_inactive $gray2 $gray2 #FFFFFF #000000
client.unfocused $gray2 $gray2 #FFFFFF #000000
# Police de caracteres pour les titres des fenetres. ISO 10646 = Unicode
font pango:Hack 10
# wallpaper
exec --no-startup-id feh --bg-scale /home/alexandre/images/SF.jpg
# Redimensionnement de fenetres
mode "resize" {
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
# Retour au mode normal: Enter ou Escape ou q ou ^[
bindsym Return mode "default"
bindsym q mode "default"
bindsym Escape mode "default"
bindcode Control+34 mode "default"
}
bindsym $mod+s mode "resize"
# Tue la fenetre avec le focus
bindsym $mod+Shift+A kill
# split in horizontal orientation
bindsym $mod+h split h
# split in vertical orientation
bindsym $mod+v split v
# change container layout (stacked, tabbed, toggle split)
bindsym $mod+p 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
#
# Change la fenetre ayant le focus
bindsym $mod+Shift+Left move left
bindsym $mod+Shift+Down move down
bindsym $mod+Shift+Up move up
bindsym $mod+Shift+Right move right
# Met la fenetre avec le focus en mode plein écran
bindsym $mod+f fullscreen
# Deplacement entre les bureaux
bindsym $mod+ampersand workspace $ws1
bindsym $mod+eacute workspace $ws2
bindsym $mod+quotedbl workspace $ws3
bindsym $mod+apostrophe workspace 4
bindsym $mod+parenleft workspace 5
bindsym $mod+minus workspace 6
bindsym $mod+egrave workspace 7
bindsym $mod+underscore workspace 8
bindsym $mod+ccedilla workspace 9
bindsym $mod+agrave workspace 10
# Déplacement de la fenetre ayant le focus d'un bureau à l'autre
bindsym $mod+Shift+1 move container to workspace $ws1
bindsym $mod+Shift+2 move container to workspace $ws2
bindsym $mod+Shift+3 move container to workspace $ws3
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
# Recharge le fichier de configuration
bindsym $mod+Shift+C reload
# Redemarre i3 mais concerve ce qui est lancé. Utilisable pour les MAJ
bindsym $mod+Shift+R restart
# sort d'i3
bindsym $mod+Shift+E exit
# lance dmenu (le lanceur de pgm. la barre de dmenu est noir)
bindsym $mod+d exec rofi -show drun -show-icons -modi drun
# status bar
bar {
font pango:DejaVu Sans Mono, FontAwesome 12
position top
status_command i3status-rs ~/.config/i3status-rust/config-bottom.toml
colors {
separator #666666
background #222222
statusline #dddddd
focused_workspace #0088CC #0088CC #ffffff
active_workspace #333333 #333333 #ffffff
inactive_workspace #333333 #333333 #888888
urgent_workspace #2f343a #900000 #ffffff
}
}
# alt+win+l : verouille la session, image de :
bindsym $mod+$ALT+l exec i3lock -ti ~/images/coffee_time.png
# blocage automatique de l'ecran en cas d'inactivité
exec xautolock -detectsleep -locker 'i3lock -ti ~/images/coffee_time.png'
# Capture d'ecran
bindsym Print exec scrot -u '%Y-%m-%d-%T_$wx$h_scrot.png' -e 'mv $f ~/Screenshots/'
# start a terminal
bindsym $mod+Return exec "LIBGL_ALWAYS_SOFTWARE=1 alacritty"
bindsym $mod+m exec "i3-sensible-terminal -e ncmpcpp"
# Assigne les applications aux workspaces
assign [class="firefox"] $ws3
assign [class="emacs"] $ws2
# programmes au démarrage
exec --no-startup-id nm-applet
exec --no-startup-id nextcloud

View File

@ -13,4 +13,7 @@
layout = "fr";
variant = "bepo";
};
xdg.configFile = {
"i3/config".source = ./configs/i3config;
};
}