logo Debian Debian Debian-France Debian-Facile Debian-fr.org Forum-Debian.fr Debian ? Communautés logo inclusivité

Debian-facile

Bienvenue sur Debian-Facile, site d'aide pour les nouveaux utilisateurs de Debian.

Vous n'êtes pas identifié(e).


L'icône rouge permet de télécharger chaque page du wiki visitée au format PDF et la grise au format ODT → ODT PDF Export

Ceci est une ancienne révision du document !


Fichier de configuration pour i3wm

  • objet : ma config i3wm
  • logiciels utilisés : i3wm, rofi, urxvt
  • fonts utilisées : hack et forkawesome
  • contenu :
    • ~/.config/i3/config
    • ~/.config/i3/conkybar
    • ~/.config/i3/conkyrc
    • ~/.Xresources pour la configuration de rofi et de urxvt

~/.config/i3/config

config
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout some time, delete
# this file and re-run i3-config-wizard(1).
#
 
# i3 config file (v4)
#
# Please see https://i3wm.org/docs/userguide.html for a complete reference!
 
set $mod Mod1
 
# Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below.
font pango:Hack 9
font pango:forkawesome 9
 
# This font is widely installed, provides lots of unicode glyphs, right-to-left
# text rendering and scalability on retina/hidpi displays (thanks to pango).
#font pango:DejaVu Sans Mono 8
 
# Before i3 v4.8, we used to recommend this one as the default:
# font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
# The font above is very space-efficient, that is, it looks good, sharp and
# clear in small sizes. However, its unicode glyph coverage is limited, the old
# X core fonts rendering does not support right-to-left and this being a bitmap
# font, it doesn’t scale on retina/hidpi displays.
 
# client look - nord color scheme
default_border pixel 1
default_floating_border pixel 3
hide_edge_borders smart
 
# class                 border  bground text    indicator child_border
client.focused          #4C7899 #5E81AC #D8DEE9 #5E81AC   #285577
client.focused_inactive #4C566A #5F676A #D8DEE9 #484E50   #4C566A
client.unfocused        #4C566A #2E3440 #888888 #292D2E   #4C566A
client.urgent           #4C566A #BF616A #D8DEE9 #BF616A   #BF616A
client.placeholder      #4C566A #2E3440 #D8DEE9 #2E3440   #4C566A
 
client.background       #D8DEE9
 
# keyboard control
focus_follows_mouse no
 
# bar nord look & command
bar {
  colors {
    background #2E3440
    statusline #D8DEE9
    separator  #2E3440
 
    focused_workspace  #4C566A #5E81AC #D8DEE9
    active_workspace   #4C566A #2E3440 #D8DEE9
    inactive_workspace #2E3440 #2E3440 #888888
    urgent_workspace   #4C566A #BF616A #D8DEE9
    binding_mode       #2E3440 #BF616A #D8DEE9
  }
  # infos given by conky
  status_command $HOME/.config/i3/i3conkybar
  # only display name of workspace
  strip_workspace_numbers yes
}
 
# Toggle between dock mode and hide mode
bindsym $mod+b bar mode toggle
 
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
 
# start a regular terminal
bindsym $mod+Return exec urxvtcd
 
# scratchpad terminal
# lancer un terminal en début de session
exec --no-startup-id urxvtcd -tr -name scratch -geometry 130x25
# rendre le terminal flottant et centré
for_window [class="^URxvt$" instance="^scratch$"] floating enable, move absolute position center
# définir les propriétés du terminal
for_window [instance="^scratch$"] move scratchpad; [instance="^scratch$"] scratchpad show; move scratchpad
# assigner un raccourcis pour montrer/cacher le terminal
bindsym Mod4+Return [instance="^scratch$"] scratchpad show
 
# lock
bindsym Mod4+l exec i3lock -e -i ~/.lock.png
 
# apps
bindsym Mod4+r exec urxvtcd -e ranger
bindsym Mod4+Shift+r exec pcmanfm --no-desktop
bindsym Mod4+e exec geany
bindsym Mod4+x exec urxvtcd -name irc -e weechat-curses
bindsym Mod4+w exec firefox
bindsym Mod4+m exec urxvtcd -tr -name htop -e htop
bindsym $mod+Ctrl+w exec --no-startup-id randomwall
 
# redshift
bindsym Mod4+d exec killall redshift
bindsym Mod4+n exec redshift
 
# audio bindings 
bindsym Mod4+v exec xterm -name sound -e alsamixer
bindsym XF86AudioRaiseVolume exec --no-startup-id amixer -q sset Master 1%+ unmute
bindsym XF86AudioLowerVolume exec --no-startup-id amixer -q sset Master 1%- unmute
bindsym XF86AudioMute exec --no-startup-id amixer set Master toggle
 
# mocp bindings
bindsym Mod4+z exec urxvtcd -tr -name player -e mocp
bindsym XF86AudioPrev exec --no-startup-id mocp --previous
bindsym XF86AudioPlay exec --no-startup-id mocp --toggle-pause
bindsym XF86AudioNext exec --no-startup-id mocp --next
 
# kill focused window
bindsym $mod+q kill
 
# start rofi (a program launcher)
bindsym $mod+d exec rofi -show run
bindsym $mod+p 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
 
# default container layout
workspace_layout tabbed
 
# change container layout (stacked, tabbed, toggle split)
bindsym $mod+s layout stacking
bindsym $mod+t 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+q focus parent
 
# focus the child container
#bindsym $mod+d focus child
 
# Define names for default workspaces for which we configure key bindings later on.
# We use variables to avoid repeating the names in multiple places.
set $ws1 "1:"
set $ws2 "2:"
set $ws3 "3:"
set $ws4 "4:"
set $ws5 "5:"
set $ws6 "6:"
set $ws7 "7:"
set $ws8 "8:"
set $ws9 "9:"
set $ws10 "10:"
set $ws11 "11:"
set $ws12 "12:"
 
#change workspaces 
bindsym $mod+Ctrl+Right workspace next
bindsym Mod4+Right workspace next
bindsym $mod+Ctrl+Left workspace prev
bindsym Mod4+Left workspace prev
 
# switch to workspace
bindsym $mod+ampersand workspace $ws1
bindsym $mod+eacute workspace $ws2
bindsym $mod+quotedbl workspace $ws3
bindsym $mod+apostrophe workspace $ws4
bindsym $mod+parenleft workspace $ws5
bindsym $mod+section workspace $ws6
bindsym $mod+egrave workspace $ws7
bindsym $mod+exclam workspace $ws8
bindsym $mod+ccedilla workspace $ws9
bindsym $mod+agrave workspace $ws10
bindsym $mod+parenright workspace $ws11
bindsym $mod+minus workspace $ws12
 
 
# move focused container to workspace
bindsym $mod+Shift+ampersand move container to workspace $ws1
bindsym $mod+Shift+eacute move container to workspace $ws2
bindsym $mod+Shift+quotedbl move container to workspace $ws3
bindsym $mod+Shift+apostrophe move container to workspace $ws4
bindsym $mod+Shift+5 move container to workspace $ws5
bindsym $mod+Shift+section move container to workspace $ws6
bindsym $mod+Shift+egrave move container to workspace $ws7
bindsym $mod+Shift+exclam move container to workspace $ws8
bindsym $mod+Shift+ccedilla move container to workspace $ws9
bindsym $mod+Shift+agrave move container to workspace $ws10
bindsym $mod+Shift+parenright workspace $ws11
bindsym $mod+Shift+minus workspace $ws12
 
# 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 exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -B 'Yes, exit i3' 'i3-msg exit'"
bindsym $mod+Shift+e exec ~/bin/i3quit
 
# 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 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 or $mod+r
        bindsym Return mode "default"
        bindsym Escape mode "default"
        bindsym $mod+r mode "default"
}
bindsym $mod+r mode "resize"
 
# autostart apps only at launch
exec --no-startup-id xfce4-power-manager # enable power manager
exec --no-startup-id /usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1 # enable authentication
exec --no-startup-id pcmanfm -d --no-desktop # enable auto-mounting
exec --no-startup-id $HOME/bin/thelauncher/tray-icon/thelauncher-trayicon # menu in tray
 
exec thunderbird
exec firefox
 
# autostart apps always
exec_always sleep 5s && /usr/local/bin/touchpadtap # enable touchpad
exec_always --no-startup-id eyecandy -l # composite manager
exec_always xrdb ~/.Xresources # read cli config
 
# auto floating
for_window [class="XTerm"] floating enable, move absolute position center
for_window [class="Cyclope"] floating enable, move absolute position center
for_window [class="File-roller"] floating enable, move absolute position center
for_window [class="XCalc"] floating enable, move absolute position center
for_window [class="Xmessage"] floating enable, move absolute position center
for_window [class="Thelauncher"] floating enable, move absolute position center
for_window [class="Lxappearance"] floating enable, move absolute position center
for_window [class="mpv"] floating enable, move absolute position center
for_window [instance="Msgcompose"] floating enable, move absolute position center
#for_window [class="VirtualBox Machine"] floating enable, move absolute position center
 
# assign clients to specific workspace
# ws1 mail
assign [class="thunderbird"] $ws1
# ws2 web
assign [class="Firefox-esr"] $ws2
assign [class="Nightly"] $ws2
# ws3 irc
assign [class="^URxvt$" instance="^irc$"] $ws3
# ws4 edit
assign [class="Geany"] $ws4
assign [instance="libreoffice"] $ws4
# ws5 media
assign [class="Handbrake-gtk"] $ws5
assign [class="Avidemux"] $ws5
# ws6 gfx
assign [class="Gimp"] $ws6
assign [class="Inkscape"] $ws6
assign [class="Gthumb"] $ws6
# ws7 vbox
assign [class="VirtualBox Manager"] $ws7
assign [class="VirtualBox Machine"] $ws7
# ws8 bkp
assign [class="Filezilla"] $ws8
assign [class="Unison"] $ws8
# ws9 p2p
assign [class="Transmission-gtk"] $ws9
# ws10 top
assign [class="^URxvt$" instance="^htop$"] $ws10
# ws11 deb
# ws12 zik
assign [class="^URxvt$" instance="^player$"] $ws12
utilisateurs/arpinux/tutos/i3config.1600103613.txt.gz · Dernière modification: 14/09/2020 19:13 par arpinux

Pied de page des forums

Propulsé par FluxBB