/uses
cat ~/.workspace_config
🏫 At School: Custom Dotfiles
Instead of using the standard automated configurations, I maintain my own set of dotfiles for EPITA's
machines.
This allows me to have total control over my workflow, window management, and editor shortcuts.
Bash Environment
My .bashrc includes path definitions for EPITA's AFS, PostgreSQL environments for my
projects, and a custom push function to automate git commits securely.
~/.bashrc
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
if [ -d ~/afs/bin ] ; then
export PATH=~/afs/bin:$PATH
fi
if [ -d ~/.local/bin ] ; then
export PATH=~/.local/bin:$PATH
fi
export LANG=en_US.utf8
export NNTPSERVER="news.epita.fr"
export EDITOR=vim
alias ls='ls --color=auto'
alias grep='grep --color -n'
PS1='[\u@\h \W]\$ '
function push() {
# Trouver la racine du dépôt Git
repo_root=$(git rev-parse --show-toplevel 2>/dev/null)
if [ $? -ne 0 ]; then
echo "Erreur : ce répertoire ou ses parents ne sont pas un dépôt Git."
return 1
fi
# Vérifie si un message de commit a été fourni
if [ -z "$1" ]; then
echo "Erreur : veuillez fournir un message de commit."
return 1
fi
# Aller à la racine du dépôt pour garantir un bon fonctionnement
cd "$repo_root" || return
# Exécute les commandes Git
git add .
git commit -m "$*"
git push
}
export PGDATA="$HOME/postgres_data"
export PGHOST="/tmp"
export PGPORT="5432"
The Editor: Vim
Strict EPITA norm compliancy (80 columns, 4-space indent) managed via Vundle. I also use a script to
automatically load project-specific git settings for Vim syntax.
~/.vimrc
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
Plugin 'tpope/vim-sensible'
call vundle#end() " required
filetype plugin indent on " required
runtime! plugin/sensible.vim
set encoding=utf-8 fileencodings=
syntax on
set number
set cc=80
autocmd Filetype make setlocal noexpandtab
set list listchars=tab:»·,trail:·
" per .git vim configs
let git_settings = system("git config --get vim.settings")
if strlen(git_settings)
exe "set" git_settings
endif
set tabstop=4
set expandtab
set shiftwidth=4
set smartindent
set textwidth=80
Window Manager: i3wm
I split my i3 configuration into modular files (Main, Start, and Colors) for better maintainability. It
pre-assigns my favorite apps (Firefox, Alacritty, Discord) to specific workspaces.
~/.config/i3/startConfig
# Workspaces names and numbers
set $ws1 "1:Firefox"
set $ws2 "2:Terminal"
set $ws3 "3:Discord"
set $ws4 "4:Dev"
set $ws5 "5:V"
set $ws6 "6:VI"
set $ws7 "7:VII"
set $ws8 "8:VIII"
set $ws9 "9:IX"
set $ws10 "10:X"
# Run apps when starting i3
exec --no-startup-id i3-msg 'exec firefox; exec i3-sensible-terminal; exec discord'
# Allocate apps to workspace
for_window [class="firefox"] move to workspace $ws1
for_window [class="Alacritty"] move to workspace $ws2
for_window [class="URxvt"] move to worspace $ws2
for_window [class="discord"] move to workspace $ws3
# Setup background
exec feh --bg-scale ~/afs/wallpaper.png
~/.config/i3/coloursConfig
bar {
status_command i3status
mode hide
hidden_state hide
modifier $mod
strip_workspace_numbers yes
colors {
background #00003080
statusline #ffffff80
separator #66666680
focused_workspace #00003080 #8080ff80 #000030
inactive_workspace #00003080 #00003080 #8080ff
}
}
hide_edge_borders both
# class border backgr. text indicator child_border
client.focused #8080ff80 #8080ff80 #000030 #2e9ef480 #8080ff80
client.focused_inactive #00003080 #00003080 #8080ff #484e5080 #00003080
client.unfocused #00003080 #00003080 #8080ff #292d2e80 #00003080
~/.config/i3/config
# File usings
include ~/.config/i3/coloursConfig
include ~/.config/i3/startConfig
set $mod Mod4
font pango:DejaVu Sans Bold Mono 8
exec --no-startup-id dex --autostart --environment i3
exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork
exec --no-startup-id nm-applet
set $refresh_i3status killall -SIGUSR1 i3status
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +10% &&
$refresh_i3status
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -10% &&
$refresh_i3status
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle &&
$refresh_i3status
bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle &&
$refresh_i3status
floating_modifier $mod
tiling_drag modifier titlebar
bindsym $mod+Return exec i3-sensible-terminal
bindsym $mod+Shift+Q kill
bindsym $mod+d exec --no-startup-id dmenu_run
# change focus
bindsym $mod+j focus left
bindsym $mod+k focus down
bindsym $mod+l focus up
bindsym $mod+semicolon focus right
bindsym $mod+Shift+j move left
bindsym $mod+Shift+k move down
bindsym $mod+Shift+l move up
bindsym $mod+Shift+colon move right
bindsym $mod+h split h
bindsym $mod+v split v
bindsym $mod+f fullscreen toggle
bindsym $mod+s layout stacking
bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split
bindsym $mod+Shift+space floating toggle
bindsym $mod+space focus mode_toggle
bindsym $mod+a focus parent
bindsym $mod+1 workspace number $ws1
bindsym $mod+2 workspace number $ws2
bindsym $mod+3 workspace number $ws3
bindsym $mod+4 workspace number $ws4
bindsym $mod+5 workspace number $ws5
bindsym $mod+Shift+1 move container to workspace number $ws1
bindsym $mod+Shift+2 move container to workspace number $ws2
bindsym $mod+Shift+3 move container to workspace number $ws3
bindsym $mod+Shift+c reload
bindsym $mod+Shift+r restart
bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'Do you really want to exit i3?' -B 'Yes, exit i3'
'i3-msg exit'"
bindsym $mod+Shift+i exec i3lock -i ~/afs/wallpaper.png -e -f
bindsym $mod+Shift+f exec firefox
bindsym $mod+Shift+d exec discord
mode "resize" {
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 semicolon resize grow width 10 px or 10 ppt
bindsym Return mode "default"
bindsym Escape mode "default"
bindsym $mod+r mode "default"
}
🏠 At Home: WSL & Windows Terminal
To code in C and manage my system projects from home, I replicate the Linux environment on Windows using
WSL (Windows Subsystem for Linux).
Network Tip:
If you try to download WSL or Ubuntu from the school's Wi-Fi, it might be blocked. Use a 4G hotspot
or do it from home!
1. WSL Installation
First, open PowerShell as an Administrator. Then, execute the following command to
download and install WSL:
wsl --install
Once the installation is complete, reboot your computer. After restarting, a terminal
will open automatically prompting you to create your UNIX username and password.
2. Windows Terminal Configuration
I use the Windows Terminal app, forcing it to open directly in Ubuntu by default. Here
are my key settings:
| Default profile |
Ubuntu |
| Default terminal application |
Windows Terminal |
| On startup |
Open a new tab with the default profile |
| Launch size |
120 × 30 |
| Command line |
C:\WINDOWS\system32\wsl.exe |
| Starting directory |
/ |
| Path translation |
WSL (C:\ -> /mnt/c) |
Once in the Ubuntu terminal, I manually install my basic dev environment and add packages as needed for
my projects:
sudo apt update
sudo apt install gcc g++ python3 make build-essential
🔑 SSH Connection with the CRI
To push my projects to the school's forge or connect remotely, I need an SSH key. Here is how I
configure it on my WSL:
1. Generate the ed25519 key (Recommended)
ssh-keygen -a 100 -t ed25519
2. Retrieve the public key
The school's documentation recommends using xsel, but this often bugs out on WSL without a
graphical server (X11). The simplest method is to print it and copy it with the mouse:
cat ~/.ssh/id_ed25519.pub
3. Add it to the intranet
I then log into cri.epita.fr > My Profile > Add an SSH key, and paste the result!
💻 The Editor: VSCode Remote
To connect all this, I use Visual Studio Code on Windows, with the official
WSL extension.
This allows me to enjoy the smooth Windows interface while typing commands, managing my files, and
compiling my C code directly in the Ubuntu subsystem.
🚀 Alternative: Epidots on NixOS
If you prefer an "out-of-the-box" solution for EPITA's machines instead of maintaining custom dotfiles,
you can use Epidots. It's an automated and aesthetic NixOS configuration created by the
student community.
It provides a pre-configured i3wm environment, custom Vim shortcuts, and a highly optimized terminal.
Quick Installation:
curl -L epidots.dserv.fr | sh -s
My favorite included aliases:
afs (go to the network folder), makec (make && make check &&
make clean), and cfe (Clang Format on the entire repo).