Compare commits

...

143 Commits

Author SHA1 Message Date
Quentin Duchemin ba435ec22f Add p7zip 2024-11-12 10:23:19 +01:00
Quentin Duchemin 37b65269e1 Add p7zip to base packages 2024-07-22 23:31:00 +02:00
Quentin Duchemin e7b4cf3ca3 Add scaleway-cli 2024-07-07 17:49:30 +02:00
Quentin Duchemin 6c50581b2a Add zoxide 2024-07-03 21:58:17 +02:00
Quentin Duchemin 6abae7cb8f DPI ; DNS 2024-07-03 10:45:35 +02:00
Quentin Duchemin c38e3a10b9 Don't expand symlinks when copying external files 2024-05-14 17:20:58 +02:00
Quentin Duchemin 2213088b43 [Git] Defaut branch master→main 2024-05-04 21:01:50 +02:00
Quentin Duchemin 68331b2414 [PKG] Add LaTeX engine 2024-05-04 13:24:46 +02:00
Quentin Duchemin bb1ad9c04c Pipewire config/bindings 2024-05-04 13:24:29 +02:00
Quentin Duchemin 321dce81b8 Unify sound tools 2024-05-03 20:19:20 +02:00
Quentin Duchemin 2bf7769933 Try 100 DPI on all environments 2024-05-03 20:10:18 +02:00
Quentin Duchemin 0c15cbcdaf Use Pipewire for both computers 2024-05-03 20:00:17 +02:00
Quentin Duchemin 9e8af1ef59 Unify .Xresources 2024-05-03 19:37:52 +02:00
Quentin Duchemin 223d8c3729 [PKG] Add eza 2024-05-03 19:27:54 +02:00
Quentin Duchemin 6e7c9b0d70 Rebase everytime 2024-05-03 19:18:24 +02:00
Quentin Duchemin 77c077c9ae Fix path 2024-05-03 19:18:23 +02:00
Quentin Duchemin b1424f7850 Forgot to commit laptop specific packages 2024-05-03 19:15:38 +02:00
Quentin Duchemin 37d50f5984 Wait connection to fetch updates 2024-05-02 11:01:36 +02:00
Quentin Duchemin 345606b800 Automatic network modules in polybar
When initializing the system (or later launching `~/.config/bootstrap/init_netctl <env>` and `~/.init_config.sh <env>`, each interface is converted in a module and then referenced in the bottom_center variable of the bottom bar.
2024-05-01 12:14:49 +02:00
Quentin Duchemin b1e3ea44f8 Switch from NM to netctl
I did that in the good old days, and I switched to NM because I didn't know then the wifi-menu interface. But, for a sneaky bug I don't understand, all my wireless interfaces became "Unavailable" on all my computers. No matter if I uninstall, reset anything related to NM. So, back to netctl with a nice script to automate connections
2024-05-01 10:29:37 +02:00
Quentin Duchemin 730948ff31 Add base packages 2024-05-01 08:26:43 +02:00
Quentin Duchemin 645b1d973a A few improvements from a new laptop 2024-04-28 16:45:19 +02:00
Quentin Duchemin c2a131e9ec Change GPG key 2024-04-21 18:04:55 +02:00
Quentin Duchemin c5d6db9980 Add ansible-lint to base packages 2024-02-08 10:29:39 +01:00
Quentin Duchemin 3e020fe73f Add theme for Rofi 2024-02-07 17:56:52 +01:00
Quentin Duchemin 942256006a Fix ZSH theme 2024-02-07 17:54:38 +01:00
Quentin Duchemin 6cda4992bc Add neovim to base packages 2024-02-07 17:49:32 +01:00
Quentin Duchemin f488005eed Add file for Oh-my-posh theme 2024-02-07 17:28:39 +01:00
Quentin Duchemin 391df582a5
Wired interface 2024-02-05 11:21:03 +01:00
Quentin Duchemin 81d0d523b7
Remove alsa module due to external sound card 2024-02-01 18:12:10 +01:00
Quentin Duchemin f126572738
Add realtime priorities in desktop 2024-02-01 16:29:13 +01:00
Quentin Duchemin 9194648e9a
Add Catppuccin for Pygments and force ccat to use Pygments 2024-01-31 21:10:56 +01:00
Quentin Duchemin 46318211ed
Add dunst config 2024-01-31 21:01:34 +01:00
Quentin Duchemin bb1a0f23e0
Add Dunst Catppuccin theme 2024-01-31 20:59:08 +01:00
Quentin Duchemin 760431104b
Add Catppuccin for dunst 2024-01-31 20:44:51 +01:00
Quentin Duchemin 6710d33bcf
Add transparent color for nvim 2024-01-31 20:40:18 +01:00
Quentin Duchemin ae7d4091c3
Add nvim with Catppuccin style 2024-01-31 20:38:23 +01:00
Quentin Duchemin 96ba27c99c
Switch to ethernet on desktop 2024-01-30 22:13:30 +01:00
Quentin Duchemin d88eeb06cf
Add ffmpeg and ffmpegthumbnailer to base packages 2024-01-29 20:32:49 +01:00
Quentin Duchemin 17a6abeec4
Add MTP client 2024-01-28 21:41:56 +01:00
Quentin Duchemin 1074886cf3
Add Macchiato theme for GTK and Oh-my-posh 2024-01-28 21:07:25 +01:00
Quentin Duchemin d510a03329
Add GTK Mocha theme 2024-01-28 20:28:27 +01:00
Quentin Duchemin 1f5a29a525
Try to speed up ZSH... 2024-01-21 22:22:56 +01:00
Quentin Duchemin 0846273757
Hide title bar in Terminator 2024-01-21 21:56:33 +01:00
Quentin Duchemin a613d5b1ae Add locale conf 2024-01-20 21:12:25 +01:00
Quentin Duchemin 25e010bf6c Add rrm → /usr/bin/rm 2024-01-18 17:47:18 +01:00
Quentin Duchemin d8d0374875 Add shortcut for qBittorent 2024-01-18 17:28:49 +01:00
Quentin Duchemin 2eb8c99f43 Add pavucontrol to laptop 2024-01-17 20:02:11 +01:00
Quentin Duchemin 907e0df063 Unify .xinitrc 2024-01-10 13:36:24 +01:00
Quentin Duchemin f8b2b8883f Add dosfstools to base packages 2023-12-27 21:01:37 +01:00
Quentin Duchemin 12647d73bd Move to scratchpad base qBittorrent, not popups 2023-12-27 20:48:49 +01:00
Quentin Duchemin db5fb7011f Add zip to base packages 2023-12-25 00:45:54 +01:00
Quentin Duchemin 5debbf8f40
Re-add transparency to Terminator 2023-12-20 19:46:20 +01:00
Quentin Duchemin a2634742df
Add Mocha colors to polybar
TODO : change icons to use Nerd fonts
2023-12-20 19:28:13 +01:00
Quentin Duchemin 9b222892fd Catppuccin fixes for laptop and init script 2023-12-19 21:36:07 +01:00
Quentin Duchemin a3577d8e98 Add VLC to base packages 2023-12-19 20:57:58 +01:00
Quentin Duchemin b942d9e55e Add ansible and multilib repo 2023-12-19 20:57:49 +01:00
Quentin Duchemin 287d4a452d
Add Mocha colors to polybar
TODO : change icons to use Nerd fonts
2023-12-18 21:58:40 +01:00
Quentin Duchemin 646ef5affc
Catppuccin Mocha theme for Terminator, ZSH and VSCodium, new ZSH prompt/font 2023-12-18 20:00:52 +01:00
Quentin Duchemin 989a6215c8
Various fixes 2023-12-18 19:13:52 +01:00
Quentin Duchemin 1374da92d7
[Codium] Sync settings for automatic sync of VSCode settings 2023-12-18 15:34:02 +01:00
Quentin Duchemin 4427295a1d
Use GTK3 pinentry program 2023-12-18 15:17:18 +01:00
Quentin Duchemin 3cfd6b8818
Add SSH keys requirement in README 2023-12-18 15:03:11 +01:00
Quentin Duchemin 7191312010
Add minimalistic vimrc for later 2023-12-18 15:01:44 +01:00
Quentin Duchemin 2b65e1cf3d
Let polybar be more transparent to fit the light theme 2023-12-18 14:37:09 +01:00
Quentin Duchemin 6fd0445936
Solve circular rm aliases 2023-12-18 14:32:45 +01:00
Quentin Duchemin e011531520
Switch to light theme 2023-12-18 14:31:48 +01:00
Quentin Duchemin ba6ecc5070
rrm → rm 2023-12-06 21:15:48 +01:00
Quentin Duchemin 13a99eb43a
--amend 2023-12-03 19:02:29 +01:00
Quentin Duchemin dcdbcc1723
--amend 2023-12-03 18:45:21 +01:00
Quentin Duchemin 734558ad9c
Bluetooth auto-connect 2023-12-03 18:42:21 +01:00
Quentin Duchemin c9e03cfecd
Ensure keyboard is always AZERTY 2023-12-03 17:52:26 +01:00
Quentin Duchemin 7761e9f517
Add rofimoji 2023-12-03 17:45:09 +01:00
Quentin Duchemin 390ba67252
Add npm bin path 2023-11-27 15:18:41 +01:00
Quentin Duchemin c9837c53bd
rm moves to trash 2023-11-27 15:11:52 +01:00
Quentin Duchemin 54f15c191c
Add alias to upgrade without prompt 2023-11-24 12:39:49 +01:00
Quentin Duchemin d0d0fe0144
Remove hamster from base packages 2023-11-17 16:26:48 +01:00
Quentin Duchemin 9770422599
Adjust bar for desktop 2023-11-13 17:13:07 +01:00
Quentin Duchemin 244dedd0bc Set Firefox as default browser 2023-11-08 01:18:29 +01:00
Quentin Duchemin 1db779feb9 Add hplip to base packages 2023-11-07 12:17:22 +01:00
Quentin Duchemin 3527935ff4 Enable cups at initialization 2023-11-07 12:09:47 +01:00
Quentin Duchemin 7b09e0311d Add cups to base packages 2023-11-07 11:52:26 +01:00
Quentin Duchemin bb81d1d220 Instead put the song playing at center 2023-11-06 00:16:29 +01:00
Quentin Duchemin ea76177370 Remove window title so we don't overfill horizontally 2023-11-06 00:15:30 +01:00
Quentin Duchemin 6eef37f11d Adjust touchpad speed 2023-11-05 00:12:21 +01:00
Quentin Duchemin bee0b60afe Add chromium to base packages 2023-11-05 00:07:53 +01:00
Quentin Duchemin 204b5ff718 Smaller step for brightness control 2023-11-05 00:07:28 +01:00
Quentin Duchemin d5856be935 Reduce step for brightness change 2023-11-01 19:15:46 +01:00
Quentin Duchemin 390bb76203 Add bind for dig/nslookup 2023-11-01 18:41:58 +01:00
Quentin Duchemin 23a14b66ba Ensure GPG keygrips used as SSH keys are correctly read 2023-11-01 18:41:46 +01:00
Quentin Duchemin 2e7a7dc891 Add imagemagick to base packages 2023-10-30 01:08:22 +01:00
Quentin Duchemin 366e63043a Add gthumb to base packages 2023-10-30 00:59:46 +01:00
Quentin Duchemin c501977386 Add tor-browser to base packages 2023-10-29 23:47:16 +01:00
Quentin Duchemin d6675bf822 Add evince to base packages 2023-10-29 23:28:44 +01:00
Quentin Duchemin 2abafa743c Add libreoffice to base packages 2023-10-29 23:19:22 +01:00
Quentin Duchemin 3672669bec Add PassFF host app 2023-10-29 22:47:38 +01:00
Quentin Duchemin 5558b5c963 GPG graphical pinentry 2023-10-29 22:43:25 +01:00
Quentin Duchemin 25c08c9a30 SSH login via GPG authentication subkey 2023-10-29 21:33:06 +01:00
Quentin Duchemin f302bd746a Fix sending qBittorent to scratchpad 2023-10-29 21:03:05 +01:00
Quentin Duchemin 0d52fcdf20 Better RAM display on laptop 2023-10-29 16:20:16 +01:00
Quentin Duchemin 5a3d510ad1 Set warn percentage for RAM at 50 (polybar) 2023-10-29 16:13:48 +01:00
Quentin Duchemin 8c47567f9b Forgot to remove absolute px i3 resize 2023-10-29 16:12:40 +01:00
Quentin Duchemin 5a3a34be55 Yey, resize floating i3 windows in % 2023-10-29 16:10:09 +01:00
Quentin Duchemin 89b177ffba In i3, we can get DPI from Xresources 2023-10-29 16:09:32 +01:00
Quentin Duchemin 980243881c Fixed-size and textual memory module for laptop 2023-10-29 16:04:21 +01:00
Quentin Duchemin f699973555 Fix up/down brightness 2023-10-29 14:55:36 +01:00
Quentin Duchemin 50a47a6b76 Everything now seems to work in harmony with all environments 2023-10-29 00:26:31 +02:00
Quentin Duchemin aa86cda075 Finally got DPI working right everywhere ! 2023-10-28 23:52:40 +02:00
Quentin Duchemin 5f304686f7 Handle prepending for custom env conf, fix bugs in external conf 2023-10-28 23:13:37 +02:00
Quentin Duchemin ea22f2a027 Adjust DPI, fix incorrect default variables usage in Polybar 2023-10-28 23:12:12 +02:00
Quentin Duchemin fcb5f5aa9d Improve subfolder management for external config 2023-10-28 20:35:46 +02:00
Quentin Duchemin 92bff24fab New refurb laptop, fix lot of stuff
#todo manage small differences between multiple laptops...
2023-10-28 18:21:46 +02:00
Quentin Duchemin d072f133ad
Local bin PATH 2023-09-14 20:27:23 +02:00
Quentin Duchemin 747506f8af
Better trash 2023-06-27 17:03:27 +02:00
Quentin Duchemin a844f73f75
New screen, maintenance 2023-06-23 15:16:48 +02:00
Quentin Duchemin 71309318e8
Forgot to track .xinitrc for wallpaper and i3 startup 2023-04-11 19:06:20 +02:00
Quentin Duchemin d033b81446
Untrack simlink 2023-04-11 11:58:40 +02:00
Quentin Duchemin 33a57ad978
Fix configuration copy outside homedir 2023-04-11 11:50:02 +02:00
Quentin Duchemin 9ecf704015
Correctly use ExecStart for backups 2023-04-11 11:48:58 +02:00
Quentin Duchemin 62f7d8b1e6
Fix backup source path 2023-03-30 18:03:42 +02:00
Quentin Duchemin 4c88528ee8
Add backup with Restic 2023-03-29 22:38:48 +02:00
Quentin Duchemin 191bccfb5a
Add separate env file 2023-03-07 15:26:08 +01:00
Quentin Duchemin b3d43ef629
Add separate alias file 2023-03-06 16:36:20 +01:00
Quentin Duchemin 323ff52593
Add qBitTorrent autostart 2023-02-28 15:01:01 +01:00
Quentin Duchemin 1a442bbe90
Suspend rather than hibernate 2023-02-23 18:19:03 +01:00
Quentin Duchemin 5221c65449
Added new Obsidian vault 2023-02-22 12:44:42 +01:00
Quentin Duchemin 318205ad39
Added +-3s control with media keys 2023-02-20 19:38:38 +01:00
Quentin Duchemin 383f2998fd
Added alsa-plugins for JACK/ALSA bridge 2023-02-20 19:30:08 +01:00
Quentin Duchemin d2f2fe6980
Adapt screenshot script to new Lychee API 2023-02-20 16:09:56 +01:00
Quentin Duchemin 72b0bb96a4
Fish-like feature and fuzzy finding for ZSH 2023-02-20 14:03:38 +01:00
Quentin Duchemin f875ca12cc
Committed merge config file by error 2023-02-19 22:09:17 +01:00
Quentin Duchemin 213410a15e
Add Polybar support for music print and control 2023-02-19 19:42:07 +01:00
Quentin Duchemin 413c12c378
Add support for HW brightness control on desktop 2023-02-19 19:20:05 +01:00
Quentin Duchemin fb134bbf39
Tweak for Firefox workspaces, screenshots working 2023-02-19 11:01:41 +01:00
Quentin Duchemin 03ca82c4c4
Add python requests for screenshot taking 2023-02-19 10:33:39 +01:00
Quentin Duchemin fd2798c62e
Too much xruns ; increase jack buffer size 2023-02-19 01:46:09 +01:00
Quentin Duchemin 8f0edb835c
MIDI-JACK and Nemo stuff 2023-02-19 00:49:30 +01:00
Quentin Duchemin cee9c24380
Add qBitTorrent and xclip for passmenu 2023-02-19 00:11:25 +01:00
Quentin Duchemin d0986fd825
Add pianoteq layout 2023-02-18 23:53:35 +01:00
Quentin Duchemin 0aa3d4ad96
Add redshift 2023-02-18 23:10:14 +01:00
Quentin Duchemin 8a7ea7a0fc
One-hand notification closing 2023-02-18 22:48:06 +01:00
Quentin Duchemin bfbe0747a6
Add forgotten bootstrap packages 2023-02-18 22:45:23 +01:00
Quentin Duchemin 3d02d9f41d
Still gpg-agent not remembering key for signing commits 2023-02-18 22:40:28 +01:00
68 changed files with 1838 additions and 8450 deletions

View File

@ -1 +0,0 @@
/home/.Xresources.desk

11
.Xresources 100644
View File

@ -0,0 +1,11 @@
!*dpi is used by i3WM
!See https://i3wm.org/docs/userguide.html#xresources
*dpi: 100
Xft.dpi: 100
Xft.autohint: 0
Xft.lcdfilter: lcddefault
Xft.hintstyle: hintfull
Xft.hinting: 1
Xft.antialias: 1
Xft.rgba: rgb

View File

@ -1,7 +0,0 @@
Xft.autohint: 0
Xft.lcdfilter: lcddefault
Xft.hintstyle: hintfull
Xft.hinting: 1
Xft.antialias: 1
Xft.rgba: rgb

View File

@ -1,8 +0,0 @@
Xft.dpi: 170
Xft.autohint: 0
Xft.lcdfilter: lcddefault
Xft.hintstyle: hintfull
Xft.hinting: 1
Xft.antialias: 1
Xft.rgba: rgb

13
.aliases 100644
View File

@ -0,0 +1,13 @@
alias ap='ansible-playbook'
# Upgrade without prompt
alias yey='yay -Syu --noconfirm'
# Avoid losing stuff
alias rm='rmtrash'
alias rrm='/usr/bin/rm'
# cp is rsync
alias cp='cpv'
alias vim='nvim'
alias ls='eza'
alias cat='bat'
# zsh function, not binary, cf zoxide
alias cd='z'

View File

@ -0,0 +1 @@
/etc/NetworkManager/conf.d

View File

@ -0,0 +1,2 @@
[device]
wifi.backend=iwd

View File

@ -0,0 +1,12 @@
# current machine's name, optional; it can be used to filter settings or in the commit message
hostname: ""
# more details at https://github.com/zokugun/vscode-sync-settings/blob/master/docs/hostname.md
# selected profile, required
profile: main
# repository to sync the settings with, required
repository:
# repository's type, required (dummy: no sync)
type: git
path: ~/.config/codium-settings
branch: main

View File

@ -1,3 +0,0 @@
hamster-time-tracker
realtime-privileges
zita-ajbridge

View File

@ -1,53 +0,0 @@
arc-gtk-theme
arc-icon-theme
autojump
cadence
docker
dunst
feh
firefox
flameshot
i3-wm
i3lock-color
jq
libusb-compat
maim
mlocate
nemo
neofetch
network-manager-applet
networkmanager
noto-fonts-emoji
obsidian
oh-my-zsh-git
pacman-contrib
pass
picom
playerctl
polybar
powerline-fonts
python-pip
python-pygments
rofi
rsync
signal-desktop
telegram-desktop
terminator
thunderbird
ttf-dejavu
ttf-font-awesome-5
ttf-material-icons-git
ttf-symbola
ttf-weather-icons
usb_modeswitch
vim
vscodium-bin
wget
xautolock
xdg-user-dirs
xdotool
xorg-server
xorg-xinit
xsel
yay-bin
zsh

View File

@ -0,0 +1 @@
gddccontrol

View File

@ -1,54 +1,134 @@
android-file-transfer
ansible
ansible-lint
arc-gtk-theme
arc-icon-theme
autojump
cadence
bat
bat-extras
blueman
bluez
bluez-utils
bluetooth-autoconnect
bind
catppuccin-cursors-macchiato
catppuccin-gtk-theme-macchiato
chafa
chromium
cups
dhcpcd
dialog
docker
dosfstools
dkms
dunst
evince
eza
feh
ffmpeg
ffmpegthumbnailer
firefox
flameshot
fzf
gcr
git-delta
gthumb
helvum
hplip
htop
i3-wm
i3lock-color
ifplugd
imagemagick
jq
kwayland5
lesspipe
libreoffice-fresh
libusb-compat
less
lshw
lxappearance-gtk3
maim
man-db
man-pages
musescore
mlocate
nmap
nemo
neofetch
network-manager-applet
networkmanager
netctl
neovim
noto-fonts-emoji
numlockx
obsidian
oh-my-posh
oh-my-zsh-git
p7zip
pacman-contrib
pavucontrol
papirus-icon-theme
papirus-folders-catppuccin-git
pass
perl-file-homedir
perl-yaml-tiny
picom
pipewire
pipewire-audio
pipewire-alsa
pipewire-pulse
pipewire-jack
playerctl
polybar
powerline-fonts
python-dbus
python-gobject
python-pip
python-pygments
python-pyperclip
python-requests
qbittorrent
realtime-privileges
restic
ripgrep
rmtrash
rofi
rofimoji
rsync
scaleway-cli
signal-desktop
stylua
telegram-desktop
texlive-binextra
tectonic
terminator
thunderbird
torbrowser-launcher
trash-cli
ttf-dejavu
ttf-font-awesome-5
ttf-font-awesome
ttf-jetbrains-mono-nerd
ttf-material-icons-git
ttf-symbola
ttf-weather-icons
ttf-meslo-nerd
unzip
usbutils
usb_modeswitch
vim
vlc
vscodium-bin
wget
wpa_supplicant
xautolock
xclip
xdg-user-dirs
xdotool
xorg-server
xorg-xev
xorg-xinit
xorg-xinput
xorg-xrandr
xsel
yay-bin
zenity
zip
zoxide
zsh

View File

@ -0,0 +1,56 @@
#!/usr/bin/env bash
# ${1} : environment (see README.md)
module_names=''
echo -e "* Auto-create wired profil, autoconnect service for netctl and polybar module..."
for i in `ip -br l | awk '$1 !~ "lo|vir|br|wl" { print $1}'`; do
echo -e "~ ${i}..."
module_name="network-${i}"
module_names+=" ${module_name}"
cat <<- EOF | sudo tee /etc/netctl/${i} >/dev/null
Interface=${i}
Connection=ethernet
IP=dhcp
EOF
cat <<- EOF | tee ~/.config/polybar/config.d/${i}.${1} >/dev/null
[module/${module_name}]
type = internal/network
interface = ${i}
ping-interval = 3
label-connected = \${env:BAR_WIRED_CONNECTED}
label-disconnected =
label-disconnected-foreground = \${colors.text}
; Consider an 'UNKNOWN' interface state as up.
; Some devices like USB network adapters have
; an unknown state, even when they're running
; Default: false
unknown-as-up = true
EOF
sudo systemctl enable --now netctl-ifplugd@${i}
# In case some old config stays....
sudo systemctl restart netctl-ifplugd@${i}
done
echo -e "* Autoconnect to wireless profiles..."
for i in `ip -br l | awk '$1 ~ "wl" { print $1}'`; do
module_name="network-${i}"
module_names+=" ${module_name}"
echo -e "~ ${i}..."
cat <<- EOF | tee ~/.config/polybar/config.d/${i}.${1} >/dev/null
[module/${module_name}]
type = internal/network
interface = ${i}
ping-interval = 3
label-connected = \${env:BAR_WIFI_CONNECTED}
label-disconnected =
label-disconnected-foreground = \${colors.text}
EOF
sudo systemctl enable --now netctl-auto@${i}
done
echo -e "* Create an override polybar file to add all discovered networks..."
cat << EOF | tee ~/.config/polybar/config.d/bottom_center.${1} >/dev/null
[variables]
bottom_center = updates-arch-combined ${module_names}
EOF
# https://man.archlinux.org/man/netctl.special.7
echo -e "* Ensure connections are back when PC is resumed..."
sudo systemctl enable netctl-sleep

View File

@ -19,7 +19,7 @@
width = (0, 400)
height = 100
offset = 15x15
offset = 30x40
# Show how many messages are currently hidden (because of geometry).
indicate_hidden = true
@ -45,7 +45,7 @@
frame_width = 3
# Defines color of the frame around the notification window.
frame_color = "#8EC07C"
frame_color = "#8AADF4"
# Define a color for the separator.
# possible values are:
@ -185,18 +185,16 @@
# Ignore the dbus closeNotification message. This is useful to enforce the timeout set by dunst configuration.
ignore_dbusclose = true
[urgency_low]
frame_color = "#3B7C87"
foreground = "#3B7C87"
background = "#191311"
timeout = 5
background = "#24273A"
foreground = "#CAD3F5"
[urgency_normal]
frame_color = "#5B8234"
foreground = "#5B8234"
background = "#191311"
timeout = 20
background = "#24273A"
foreground = "#CAD3F5"
[urgency_critical]
frame_color = "#B7472A"
foreground = "#B7472A"
background = "#191311"
timeout = 0
background = "#24273A"
foreground = "#CAD3F5"
frame_color = "#F5A97F"

View File

@ -1,6 +1,16 @@
[Settings]
gtk-icon-theme-name = Arc
gtk-theme-name = Arc-Dark
gtk-icon-theme-name=Papirus-Dark
gtk-theme-name=Catppuccin-Macchiato-Standard-Flamingo-Dark
gtk-font-name=Noto Sans 11
gtk-application-prefer-dark-theme = true
gtk-can-change-accels=1
gtk-cursor-theme-name=Catppuccin-Macchiato-Flamingo-Cursors
gtk-cursor-theme-size=0
gtk-toolbar-style=GTK_TOOLBAR_ICONS
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR
gtk-button-images=0
gtk-menu-images=0
gtk-enable-event-sounds=1
gtk-enable-input-feedback-sounds=1
gtk-xft-antialias=1
gtk-xft-hinting=1
gtk-xft-hintstyle=hintmedium

View File

@ -4,50 +4,33 @@
# alterning workspace between each screen
workspace 1 output DVI-I-1
workspace 2 output HDMI-0
workspace 2 output HDMI-1
workspace 3 output DVI-I-1
workspace 4 output HDMI-0
workspace 4 output HDMI-1
workspace 5 output DVI-I-1
workspace 6 output DVI-I-1
workspace 7 output DVI-I-1
workspace 8 output DVI-I-1
workspace 9 output DVI-I-1
# ALSA key binding (media keys do not even have keycode...)
bindsym XF86AudioRaiseVolume exec --no-startup-id amixer -D hw:PCH -M sset Master 2%+
bindsym XF86AudioLowerVolume exec --no-startup-id amixer -D hw:PCH -M sset Master 2%-
bindsym XF86AudioMute exec --no-startup-id amixer -D hw:PCH -M sset Master toggle
# ALSA key binding
bindsym XF86AudioPlay exec --no-startup-id playerctl play-pause
bindsym XF86AudioPrev exec --no-startup-id playerctl previous
bindsym XF86AudioNext exec --no-startup-id playerctl next
bindsym Shift+XF86AudioPrev exec --no-startup-id playerctl position 3-
bindsym Shift+XF86AudioNext exec --no-startup-id playerctl position 3+
##################################
# PROGRAMS STARTED AUTOMATICALLY
##################################
# Time tracking
exec hamster
# cadence will take care of all we need :
# - Config tells Cadence to start LADISH, export MIDI hw and start A2J ;
# - LADISH implies JACK starts, then it will starts needed apps (e.g. Non-Mixer)
exec --no-startup-id cadence-session-start --start
exec --no-startup-id catia
# automate port mapping for applications
exec --no-startup-id jack-matchmaker -p ~/.config/jack-matchmaker/patterns
# Start ALSA/Jack bridge for RODE mic
exec_always --no-startup-id zita-a2j -d hw:Mini -j Rode -c 1
# Set front and headphones to 100%, let master alone change with bindsyms
exec --no-startup-id amixer -D hw:PCH -M sset Front 100%
exec --no-startup-id amixer -D hw:PCH -M sset Headphone 100%
##################################
# BINDINGS FOR STARTING PROGRAMS
##################################
bindsym $mod+b exec --no-startup-id ~/.config/i3/scripts/brightness.sh
# auto-connect to available and trusted bluetooth devices
# bound to a special button of my mouse that's the trick
bindsym Pause exec --no-startup-id bluetooth-autoconnect
##################################
# BINDINGS FOR STANDARD OPERATIONS
##################################
@ -57,15 +40,5 @@ exec --no-startup-id amixer -D hw:PCH -M sset Headphone 100%
##################################
# Scratchpad
## For Hamster, moving to SP automatically is problematic. Do it only by hand.
for_window [class="Hamster" window_type="normal"] floating enable, move scratchpad
for_window [class="Non-Mixer"] mark "mixer", move scratchpad
for_window [class="Catia*"] mark "jack", move scratchpad
bindsym $mod+Shift+j [con_mark="jack"] scratchpad show, move position center
bindsym $mod+Shift+v [con_mark="mixer"] scratchpad show, move position center
bindsym $mod+Shift+p [class="Hamster" window_type="normal"] scratchpad show, move position center
for_window [class="thunderbird" window_type="normal"] resize set 1600 850
for_window [class="Signal"] resize set 1600 850
for_window [class="Hamster" window_type="normal"] resize set 1600 850
for_window [class="Telegram"] resize set 1600 850
for_window [class="Pianoteq STAGE"] floating enable, move position center
assign [class="Pianoteq STAGE"] → number 6

View File

@ -2,28 +2,30 @@
# STARTING CONFIGURATION
##################################
# ALSA keybinding
bindsym XF86AudioRaiseVolume exec --no-startup-id amixer -D hw:PCH -M sset Master 5%+
bindsym XF86AudioLowerVolume exec --no-startup-id aimxer -D hw:PCH -M sset Master 5%-
bindsym XF86AudioMute exec --no-startup-id amixer -D hw:PCH -M sset 'Master' toggle
# Luminosity on laptop
bindsym XF86MonBrightnessDown exec --no-startup-id brightnessctl set 5%-
bindsym XF86MonBrightnessUp exec --no-startup-id brightnessctl set +5%
bindsym XF86KbdBrightnessDown exec --no-startup-id brightnessctl -d asus::kbd_backlight set +5%
bindsym XF86KbdBrightnessUp exec --no-startup-id brightnessctl -d asus::kbd_backlight set 5%-
# Luminosity on laptop (not xorg-xbacklight but the compatible and working acpilight)
bindsym XF86MonBrightnessDown exec --no-startup-id xbacklight -dec 10 -steps 200
bindsym XF86MonBrightnessUp exec --no-startup-id xbacklight -inc 10 -steps 200
bindsym XF86KbdBrightnessDown exec --no-startup-id xbacklight -ctrl asus::kbd_backlight -dec 30
bindsym XF86KbdBrightnessUp exec --no-startup-id xbacklight -ctrl asus::kbd_backlight -inc 30
# set DPI along with .Xresources
exec xrandr --dpi 160
# Get chosen DPI from Xresources, default 120
set_from_resource $dpi i3wm.dpi 120
# Only dunst seems to care about this setting
exec xrandr --dpi $dpi
##################################
# PROGRAMS STARTED AUTOMATICALLY
##################################
# set mouse acceleration
# set mouse acceleration for various types of devices so it works on multiple laptops
exec --no-startup-id xinput set-prop 'FocalTechPS/2 FocalTech Touchpad' 'libinput Accel Speed' 0.8
exec --no-startup-id xinput set-prop 'Microsoft Microsoft 3-Button Mouse with IntelliEye(TM)' 'libinput Accel Speed' 0.8
exec --no-startup-id xinput set-prop "Asus TouchPad" "libinput Accel Speed" 0.65
# That one supports tapping but is disabled by default!
exec --no-startup-id xinput set-prop "Asus TouchPad" "libinput Tapping Enabled" 1
# GUI for PulseAudio
exec pavucontrol
##################################
# BINDINGS FOR STARTING PROGRAMS
@ -37,7 +39,4 @@ exec --no-startup-id xinput set-prop 'Microsoft Microsoft 3-Button Mouse with In
# OPERATIONS FOR SPECIFIC WINDOWS
##################################
# Larger Thunderbird floating window
for_window [class="thunderbird" window_type="normal"] resize set 2500 1500
for_window [class="Signal"] resize set 2500 1500
for_window [class="Telegram"] resize set 2500 1500

View File

@ -1,5 +1,41 @@
# i3 config file (v4)
# Catppuccin Macchiato : https://github.com/catppuccin/i3/blob/main/themes/catppuccin-macchiato
set $rosewater #f4dbd6
set $flamingo #f0c6c6
set $pink #f5bde6
set $mauve #c6a0f6
set $red #ed8796
set $maroon #ee99a0
set $peach #f5a97f
set $yellow #eed49f
set $green #a6da95
set $teal #8bd5ca
set $sky #91d7e3
set $sapphire #7dc4e4
set $blue #8aadf4
set $lavender #b7bdf8
set $text #cad3f5
set $subtext1 #b8c0e0
set $subtext0 #a5adcb
set $overlay2 #939ab7
set $overlay1 #8087a2
set $overlay0 #6e738d
set $surface2 #5b6078
set $surface1 #494d64
set $surface0 #363a4f
set $base #24273a
set $mantle #1e2030
set $crust #181926i
# target title bg text indicator border
client.focused $lavender $base $text $rosewater $lavender
client.focused_inactive $overlay0 $base $text $rosewater $overlay0
client.unfocused $overlay0 $base $text $rosewater $overlay0
client.urgent $peach $base $peach $overlay0 $peach
client.placeholder $overlay0 $base $text $overlay0 $overlay0
client.background $base
##################################
# STARTING CONFIGURATION
##################################
@ -17,6 +53,8 @@ floating_modifier $mod
# no border nor title
new_window none
default_border pixel 0
default_floating_border pixel 5
# hide borders when touching edges
hide_edge_borders both
@ -42,6 +80,9 @@ smart_gaps on
# PROGRAMS STARTED AUTOMATICALLY
##################################
# Load Xresources
exec --no-startup-id xrdb -merge ~/.Xresources
# Start compositor
exec --no-startup-id picom --config ~/.config/picom.conf
@ -73,6 +114,10 @@ exec thunderbird
exec signal-desktop
exec telegram-desktop
exec obsidian
exec --no-startup-id redshift-gtk
exec qbittorrent
exec pavucontrol
exec helvum
# fetch keys from HSM
exec --no-startup-id gpg --card-status
@ -86,14 +131,14 @@ exec --no-startup-id setxkbmap fr
bindsym $mod+Return exec --no-startup-id i3-sensible-terminal
# start rofi (a program launcher)
bindsym $mod+d exec rofi -show run -theme sidebar
bindsym $mod+Shift+d exec ~/.config/rofi/emoji-picker.py
bindsym $mod+d exec rofi -show run
bindsym $mod+Shift+d exec rofimoji
# just lock the screen
bindsym $mod+l exec --no-startup-id $Locker && sleep 1
# lock and suspend to SWAP
bindsym $mod+Shift+l exec --no-startup-id $Locker && systemctl hibernate
bindsym $mod+Shift+l exec --no-startup-id $Locker && systemctl suspend
# open Explorer
bindsym $mod+e exec --no-startup-id nemo
@ -192,11 +237,17 @@ mode "$resize_mode" {
bindsym $mod+r mode "$resize_mode"
# ALSA keybinding (won't work with some keyboards... scroll in polybar in that case)
bindsym XF86AudioRaiseVolume exec --no-startup-id amixer -D pulse -M sset Master 5%+
bindsym XF86AudioLowerVolume exec --no-startup-id aimxer -D pulse -M sset Master 5%-
bindsym XF86AudioMute exec --no-startup-id amixer -D pulse -M sset 'Master' toggle
##################################
# BINDINGS FOR NOTIFICATIONS
##################################
bindsym Ctrl+Shift+BackSpace exec dunstctl close-all
bindsym Ctrl+Shift+space exec dunstctl close-all
bindsym Ctrl+$mod+space exec dunstctl history-pop
bindsym Shift+BackSpace exec dunstctl close
@ -215,22 +266,40 @@ for_window [title="Preferences$"] floating enable
for_window [class="Telegram"] floating enable
for_window [class="(?i)Thunderbird"] move position center
for_window [window_role="GtkFileChooserDialog"] move position center
# scratchpad
# === Scratchpad ===
# Make the currently focused window a scratchpad
bindsym $mod+Shift+BackSpace move scratchpad
for_window [class="Signal" window_type="normal"] move scratchpad
for_window [class="Telegram"] move scratchpad
# 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
for_window [instance="helvum"] floating enable, move scratchpad
for_window [instance="pavucontrol"] floating enable, move scratchpad
# only target main window
for_window [title="qBittorrent v*"] move scratchpad
bindsym $mod+Shift+m [instance="Mail"] scratchpad show, move position center
bindsym $mod+Shift+s [class="Signal"] scratchpad show, move position center
bindsym $mod+Shift+e [title="qBittorrent v*"] scratchpad show, move position center
bindsym $mod+Shift+t [class="Telegram"] scratchpad show, move position center
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)notes.*obsidian"] scratchpad show, move container to workspace 4, workspace 4, floating disable
# Thanks to this epic discussion, with an unexpected ending, I am happily
# able to resize floating windows by percentage of the screen width/height,
# making it compatible with the shared configuration
# https://github.com/i3/i3/issues/2816
for_window [instance="Mail" window_type="normal"] resize set 90 ppt 85 ppt
for_window [class="Signal"] resize set 90 ppt 85 ppt
for_window [class="Telegram"] resize set 90 ppt 85 ppt
# automatic workspace
assign [class="(?i)Obsidian"] → number 4
assign [class="(?i)Tor Browser"] → number 5
assign [class="(?i)Firefox"] → number 3
assign [class="(?i)Firefox" window_role="browser"] → number 3
assign [class="(?i)VSCodium"] → number 2
bindsym $mod+j [instance="pavucontrol"] scratchpad show, move position center
bindsym $mod+Shift+j [instance="helvum"] scratchpad show, move position center

View File

@ -0,0 +1,9 @@
#!/bin/bash
MONITORS='0 9'
BRIGHT=`zenity --entry --width 40 --text="Brightness:"`
for m in ${MONITORS}; do
ddccontrol dev:/dev/i2c-${m} -r 0x10 -w ${BRIGHT}
done

View File

@ -90,7 +90,7 @@ def upload_image(client, album_id, binary_img, img_format):
return client.add_photo(binary_img, str(uuid.uuid4()) + '.' + img_format, album_id)
def get_image_direct_link(client, image_id):
return SCREENSHOT_CONFIG['base_url'] + '/' + client.get_photo(image_id)['url']
return 'https://pic.chosto.me' + '/' + client.get_photo(image_id)['size_variants']['original']['url']
def main(argv):
upload, save, path = read_args(argv)
@ -108,8 +108,8 @@ def main(argv):
if upload:
s = login()
album_id = get_album_id(s, SCREENSHOT_CONFIG['album_name'])
image_id = upload_image(s, album_id, img, img_format)
image_link = get_image_direct_link(s, image_id)
image_info = upload_image(s, album_id, img, img_format)
image_link = get_image_direct_link(s, image_info['id'])
pyperclip.copy(image_link)
subprocess.run(['notify-send', '-u', 'low', '-i', 'Info', '-a', 'Screenchost', 'Screenshot uploaded', 'Link copied to clipboard!'])
except subprocess.CalledProcessError as e:

View File

@ -4,7 +4,7 @@ JACK settings, as persisted by D-Bus object.
You probably don't want to edit this because
it will be overwritten next time jackdbus saves.
-->
<!-- Sat Feb 18 21:25:33 2023 -->
<!-- Fri Feb 2 18:39:25 2024 -->
<jack>
<engine>
<option name="driver">alsa</option>
@ -12,10 +12,13 @@ it will be overwritten next time jackdbus saves.
</engine>
<drivers>
<driver name="alsa">
<option name="capture">hw:PCH,0</option>
<option name="playback">hw:PCH,0</option>
<option name="inchannels">2</option>
<option name="outchannels">2</option>
<option name="capture">hw:iD14,0</option>
<option name="playback">hw:iD14,0</option>
<option name="rate">44100</option>
<option name="period">2048</option>
<option name="inchannels">12</option>
<option name="outchannels">6</option>
<option name="midi-driver">seq</option>
</driver>
<driver name="alsarawmidi">
</driver>

View File

@ -0,0 +1 @@
/etc

View File

@ -0,0 +1,2 @@
LANG=en_US.UTF-8
LC_TIME=fr_FR.UTF-8

View File

@ -0,0 +1,117 @@
vim.opt.number = true
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable", -- latest stable release
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
require("lazy").setup({ { "catppuccin/nvim", name = "catppuccin", priority = 1000 }, { "mhartington/formatter.nvim" } })
require("catppuccin").setup({
flavour = "mocha", -- latte, frappe, macchiato, mocha
background = { -- :h background
light = "latte",
dark = "mocha",
},
transparent_background = true, -- disables setting the background color.
show_end_of_buffer = false, -- shows the '~' characters after the end of buffers
term_colors = false, -- sets terminal colors (e.g. `g:terminal_color_0`)
dim_inactive = {
enabled = false, -- dims the background color of inactive window
shade = "dark",
percentage = 0.15, -- percentage of the shade to apply to the inactive window
},
no_italic = false, -- Force no italic
no_bold = false, -- Force no bold
no_underline = false, -- Force no underline
styles = { -- Handles the styles of general hi groups (see `:h highlight-args`):
comments = { "italic" }, -- Change the style of comments
conditionals = { "italic" },
loops = {},
functions = {},
keywords = {},
strings = {},
variables = {},
numbers = {},
booleans = {},
properties = {},
types = {},
operators = {},
},
color_overrides = {},
custom_highlights = {},
integrations = {
cmp = true,
gitsigns = true,
nvimtree = true,
treesitter = true,
notify = false,
mini = {
enabled = true,
indentscope_color = "",
},
-- For more plugins integrations please scroll down (https://github.com/catppuccin/nvim#integrations)
},
})
-- Utilities for creating configurations
local util = require("formatter.util")
-- Provides the Format, FormatWrite, FormatLock, and FormatWriteLock commands
require("formatter").setup({
-- Enable or disable logging
logging = true,
-- Set the log level
log_level = vim.log.levels.WARN,
-- All formatter configurations are opt-in
filetype = {
-- Formatter configurations for filetype "lua" go here
-- and will be executed in order
lua = {
-- "formatter.filetypes.lua" defines default configurations for the
-- "lua" filetype
require("formatter.filetypes.lua").stylua,
-- You can also define your own configuration
function()
-- Supports conditional formatting
if util.get_current_buffer_file_name() == "special.lua" then
return nil
end
-- Full specification of configurations is down below and in Vim help
-- files
return {
exe = "stylua",
args = {
"--search-parent-directories",
"--stdin-filepath",
util.escape_path(util.get_current_buffer_file_path()),
"--",
"-",
},
stdin = true,
}
end,
},
-- Use the special "*" filetype for defining formatter configurations on
-- any filetype
["*"] = {
-- "formatter.filetypes.any" defines default configurations for any
-- filetype
require("formatter.filetypes.any").remove_trailing_whitespace,
},
},
})
require("format-lua")
vim.cmd.colorscheme("catppuccin-macchiato")
vim.api.nvim_set_keymap("n", "<leader>f", ":Format<CR>", { noremap = true, silent = true })

View File

@ -0,0 +1,5 @@
{
"catppuccin": { "branch": "main", "commit": "c2034f7b549152e5cc757820426341ea5000bc7a" },
"formatter.nvim": { "branch": "master", "commit": "cb4778b8432f1ae86dae4634c0b611cb269a4c2f" },
"lazy.nvim": { "branch": "main", "commit": "bef521ac89c8d423f9d092e37b58e8af0c099309" }
}

View File

@ -0,0 +1,41 @@
local M = {}
local util = require "formatter.util"
function M.luaformatter()
return {
exe = "luaformatter",
}
end
function M.luafmt()
return {
exe = "luafmt",
args = { "--stdin" },
stdin = true,
}
end
function M.luaformat()
return {
exe = "lua-format",
args = {util.escape_path(util.get_current_buffer_file_path())},
stdin = true
}
end
function M.stylua()
return {
exe = "stylua",
args = {
"--search-parent-directories",
"--stdin-filepath",
util.escape_path(util.get_current_buffer_file_path()),
"--",
"-",
},
stdin = true,
}
end
return M

View File

@ -89,8 +89,8 @@ Include = /etc/pacman.d/mirrorlist
#[multilib-testing]
#Include = /etc/pacman.d/mirrorlist
#[multilib]
#Include = /etc/pacman.d/mirrorlist
[multilib]
Include = /etc/pacman.d/mirrorlist
# An example of a custom package repository. See the pacman manpage for
# tips on creating your own repositories.

View File

@ -8,7 +8,8 @@
# unless explicitly requested using the wintypes option.
#
# shadow = false
shadow = true;
# Get rid of shadow behind corners
shadow = false;
# The blur radius for shadows, in pixels. (defaults to 12)
# shadow-radius = 12
@ -156,6 +157,14 @@ focus-exclude = [ "class_g = 'Cairo-clock'" ];
#################################
blur: {
method = "dual_kawase";
strength = 1;
background = true;
background-frame = true;
background-fixed = true;
}
# Parameters for background blurring, see the *BLUR* section for more information.
# blur-method =
# blur-size = 12
@ -207,7 +216,8 @@ blur-background-exclude = [
# `xrender` is the default one.
#
# backend = 'glx'
backend = "xrender";
# With xrender there is black in place of rounded corners
backend = "glx";
# Enable/disable VSync.
# vsync = false
@ -232,6 +242,7 @@ mark-ovredir-focused = true;
# detect-rounded-corners = false
detect-rounded-corners = true;
corner-radius = 7.0
# Detect '_NET_WM_OPACITY' on client windows, useful for window managers
# not passing '_NET_WM_OPACITY' of client windows to frame windows.
#

View File

@ -0,0 +1,35 @@
# See https://github.com/polybar/polybar/wiki/Formatting#format-tags-inside-polybar-config
# Only way to use format tags with variables in polybar for now
export MOCHA_TEXT="#cdd6fa"
export MOCHA_MAROON="#eba0ac"
export MOCHA_PEACH="#fab387"
export MOCHA_LAVENDER="#b4befe"
export MOCHA_BLUE="#89b4fa"
export MOCHA_SKY="#89dceb"
export MOCHA_YELLOW="#f9e2af"
export MOCHA_GREEN="#a6e3a1"
export MOCHA_SAPPHIRE="#74c7ec"
export MOCHA_PINK="#f5c2e7"
export MOCHA_ROSEWATER="#f2cdcd"
export MOCHA_MAUVE="#ca9ee6"
export MOCHA_TEAL="#81c8be"
export BAR_WINDOW="%{F$MOCHA_TEXT}%title%"
export BAR_WIFI_CONNECTED="%{F$MOCHA_TEXT}%essid% %{F$MOCHA_YELLOW}%{F$MOCHA_TEXT} %local_ip% %{F$MOCHA_YELLOW}%{F$MOCHA_TEXT} %downspeed% %{F$MOCHA_YELLOW}%{F$MOCHA_TEXT} %upspeed%"
export BAR_WIRED_CONNECTED="%{F$MOCHA_TEXT}%ifname% %{F$MOCHA_YELLOW}%{F$MOCHA_TEXT} %local_ip% %{F$MOCHA_YELLOW}%{F$MOCHA_TEXT} %downspeed% %{F$MOCHA_YELLOW}%{F$MOCHA_TEXT} %upspeed%"
export BAR_CPU="%{F$MOCHA_MAUVE} "
export BAR_TEMP_OK="%{F$MOCHA_MAUVE} %{F-} %temperature-c%"
export BAR_TEMP_WARN="%{F$MOCHA_PEACH} %{F-} %temperature-c%"
export BAR_MENU_OPEN="%{F$MOCHA_MAUVE}%{F$MOCHA_TEXT}"
export BAR_MENU_CLOSE="%{F$MOCHA_MAUVE}%{F$MOCHA_TEXT}"
export BAR_BACKLIGHT="%{F$MOCHA_SKY}☀️%{F$MOCHA_TEXT} %percentage%%"
export BAR_BATTERY_FULL="%{F$MOCHA_SAPPHIRE} %{F$MOCHA_TEXT}%percentage%%"
export BAR_BATTERY_CHARGING="%{F$MOCHA_LAVENDER} %{F$MOCHA_TEXT}%percentage%%"
export BAR_BATTERY_DISCHARGING="%{F$MOCHA_PEACH} %{F$MOCHA_TEXT}%percentage%%"
export BAR_MEMORY_DESKTOP="%{F$MOCHA_MAUVE}"
export BAR_MEMORY_LAPTOP="%{F$MOCHA_MAUVE} %{F$MOCHA_TEXT}%percentage_used%%"
export BAR_MEMORY_LAPTOP_WARN="%{F$MOCHA_PEACH} %percentage_used%%"
export BAR_DATE="%{F$MOCHA_MAUVE}🕓%{F$MOCHA_TEXT} %date% · %time%"
export BAR_LOW_VOL="%{F$MOCHA_MAUVE}🔈%{F$MOCHA_TEXT}"
export BAR_MED_VOL="%{F$MOCHA_MAUVE}🔉%{F$MOCHA_TEXT}"
export BAR_HIGH_VOL="%{F$MOCHA_MAUVE}🔊%{F$MOCHA_TEXT}"
export BAR_HEAD_VOL="%{F$MOCHA_MAUVE}%%{F$MOCHA_TEXT}"

View File

View File

@ -1,6 +0,0 @@
[variables]
dpi = 90
height = 27
top_left = powermenu system-uptime-pretty
top_center = xwindow
top_right = system-usb-udev alsa date

View File

@ -1,6 +0,0 @@
[variables]
dpi = 150
height = 54
top_left = powermenu system-uptime-pretty battery
top_center = xwindow
top_right = system-usb-udev backlight pulseaudio date

View File

@ -0,0 +1,31 @@
[variables]
dpi = 90
height = 30
top_left = powermenu system-uptime-pretty
top_center = player-mpris
;top_center = xwindow
top_right = pulseaudio system-usb-udev date
bottom_left = i3
bottom_right = temperature cpu memory filesystem-custom
[module/memory]
type = internal/memory
interval = 0.2
format = <label> <bar-used>
label = ${env:BAR_MEMORY_DESKTOP}
bar-used-width = 50
bar-used-gradient = true
bar-used-foreground-0 = ${colors.sapphire}
bar-used-foreground-1 = ${colors.sapphire}
bar-used-foreground-2 = ${colors.peach}
bar-used-foreground-3 = ${colors.red}
bar-used-indicator =
bar-used-indicator-font = 2
bar-used-indicator-foreground = ${colors.sapphire}
bar-used-fill =▐
bar-used-fill-font = 2
bar-used-empty =▐
bar-used-empty-font = 2
bar-used-empty-foreground = ${colors.overlay2}

View File

@ -0,0 +1,18 @@
[variables]
dpi = 110
height = 40
top_left = powermenu system-uptime-pretty battery
top_center = player-mpris
;top_center = xwindow
top_right = system-usb-udev backlight pulseaudio date
bottom_left = i3
bottom_right = temperature cpu memory filesystem-custom
[module/memory]
type = internal/memory
interval = 0.2
format = <label>
format-warn = <label-warn>
warn-percentage = 60
label = ${env:BAR_MEMORY_LAPTOP}
label-warn = ${env:BAR_MEMORY_LAPTOP_WARN}

View File

@ -1,50 +1,42 @@
[colors]
; First two letter of background are for transparency
background = #cc2f343f
foreground = #eee
foreground-alt = #555
secondary = #e60053
alert = #bd2c40
accent = #fba922
[global/wm]
margin-top=50
include-file = $HOME/.config/polybar/macchiato.ini
; Common to top and bottom bars
[bar/common]
width = 100%
dpi = ${variables.dpi:90}
dpi = ${variables.dpi}
enable-ipc = true
height = ${variables.height:30}
foreground = ${colors.foreground}
background = ${colors.background}
height = ${variables.height}
foreground = ${colors.text}
background = ${colors.surface0}
line-size = 3
line-color = #f00
line-color = ${colors.base}
locale = fr_FR.UTF-8
monitor = ${env:MONITOR:HDMI-0}
[bar/chostytopbar]
inherit = bar/common
font-0 = NotoSans-Regular:size=10;2
font-0 = NotoSans-Regular:size=10;1
font-1 = MaterialIcons-Regular:size=11;4
font-2 = Symbola:size=10;2
font-3 = Weather Icons:size=10;3
overline-size = 10
underline-size = 10
overline-color = ${self.background}
underline-color = ${self.background}
overline-color = ${colors.mauve}
underline-color = ${colors.mauve}
border-bottom-size = 1
border-bottom-color = #333
border-bottom-color = ${colors.base}
padding-left = 2
padding-right = 10
module-margin-left = 4
module-margin-right = 4
modules-left = ${variables.top_left:powermenu system-uptime-pretty}
modules-center = ${variables.top_center:xwindow}
modules-right = ${variables.top_right:system-usb-udev alsa date}
modules-left = ${variables.top_left}
modules-center = ${variables.top_center}
modules-right = ${variables.top_right}
tray-position = right
@ -53,9 +45,9 @@ inherit = bar/common
bottom = true
overline-size = 3
overline-color = ${colors.accent}
overline-color = ${colors.mauve}
underline-size = 3
underline-color = ${colors.accent}
underline-color = ${colors.mauve}
spacing = 3
padding-left = 0
@ -63,38 +55,27 @@ padding-right = 5
module-margin-left = 6
module-margin-right = 6
font-0 = Roboto:size=10;2
font-1 = Symbola:size=4;1
font-2 = Symbola:size=5;1
font-0 = NotoSans-Regular:size=10;1
font-1 = Symbola:size=4;2
font-2 = Symbola:size=5;2
;MaterialIcons are the ones used for i3 icons
font-3 = MaterialIcons-Regular:size=11;4
font-4 = Font Awesome 5 Free:style=solid:size=10;2
modules-left = i3
;modules-center =
modules-right = wired-network wireless-network updates-arch-combined temperature cpu memory filesystem-custom
modules-left = ${variables.bottom_left}
modules-center = ${variables.bottom_center}
modules-right = ${variables.bottom_right}
[module/player-mpris]
type = custom/script
exec = python ~/.config/polybar/scripts/player-mpris.py -f '🎝 {artist} - {title} %{A1:python ~/.config/polybar/scripts/player-mpris.py previous:} ⏮ %{A} %{A1:python ~/.config/polybar/scripts/player-mpris.py play-pause:} {icon-reversed} %{A} %{A1:python ~/.config/polybar/scripts/player-mpris.py next:} ⏭ %{A}'
tail = true
[module/xwindow]
type = internal/xwindow
label = %{F#ddd}%title%
label = ${env:BAR_WINDOW}
label-maxlen=100
[module/wireless-network]
type = internal/network
interface-type = wireless
interval = 1
label-connected = %{F#ddd}%essid%  %local_ip% %{F#77dd77}%{F-} %downspeed% %{F#dd7777}%{F-} %upspeed%
label-disconnected = Wireless disconnected
label-disconnected-foreground = #66
[module/wired-network]
type = internal/network
interface =
interface-type = wired
interval = 1
label-connected = %{F#ddd}%ifname%  %local_ip% %{F#77dd77}%{F-} %downspeed% %{F#dd7777}%{F-} %upspeed%
label-disconnected = Ethernet disconnected
label-disconnected-foreground = #66
[module/i3]
type = internal/i3
format = <label-state> <label-mode>
@ -106,30 +87,33 @@ ws-icon-1 = 2;
ws-icon-2 = 3;
ws-icon-3 = 4;
ws-icon-4 = 5;
ws-icon-5 = 6;
label-dimmed-underline = ${root.background}
label-separator = |
label-mode-underline = ${colors.surface0}
label-focused = %icon% %name%
label-focused-foreground = #f3f3f3
;label-focused-underline = #${colors.accent}
label-focused-underline = #9f78e1
label-focused-foreground = ${colors.text}
label-focused-underline = ${colors.mauve}
label-focused-font = 0
label-focused-padding = 4
label-unfocused = %icon% %name%
label-unfocused-underline = #555555
label-unfocused-underline = ${colors.surface0}
label-unfocused-font = 0
label-unfocused-padding = 4
label-urgent = %icon% %name%
label-urgent-foreground = #000000
label-urgent-background = #bd2c40
label-urgent-underline = #9b0a20
label-urgent-foreground = ${colors.base}
label-urgent-background = ${colors.red}
label-urgent-underline = ${colors.mauve}
label-urgent-font = 0
label-urgent-padding = 4
label-visible = %icon% %name%
label-visible-foreground = #55ffffff
label-visible-foreground = ${colors.text}
label-visible-underline = ${colors.surface0}
label-visible-font = 0
label-visible-padding = 4
@ -139,64 +123,39 @@ interval = 0.5
format = <label> <ramp-coreload>
label = %{F#fba922} 
label = ${env:BAR_CPU}
ramp-coreload-0 = ▁
ramp-coreload-0-font = 3
ramp-coreload-0-foreground = #aaff77
ramp-coreload-0-foreground = ${colors.sapphire}
ramp-coreload-1 = ▂
ramp-coreload-1-font = 3
ramp-coreload-1-foreground = #aaff77
ramp-coreload-1-foreground = ${colors.sapphire}
ramp-coreload-2 = ▃
ramp-coreload-2-font = 3
ramp-coreload-2-foreground = #aaff77
ramp-coreload-2-foreground = ${colors.sapphire}
ramp-coreload-3 = ▄
ramp-coreload-3-font = 3
ramp-coreload-3-foreground = #aaff77
ramp-coreload-3-foreground = ${colors.sapphire}
ramp-coreload-4 = ▅
ramp-coreload-4-font = 3
ramp-coreload-4-foreground = #fba922
ramp-coreload-4-foreground = ${colors.peach}
ramp-coreload-5 = ▆
ramp-coreload-5-font = 3
ramp-coreload-5-foreground = #fba922
ramp-coreload-5-foreground = ${colors.peach}
ramp-coreload-6 = ▇
ramp-coreload-6-font = 3
ramp-coreload-6-foreground = #ff5555
ramp-coreload-6-foreground = ${colors.maroon}
ramp-coreload-7 = █
ramp-coreload-7-font = 3
ramp-coreload-7-foreground = #ff5555
[module/memory]
type = internal/memory
interval = 0.2
format = <label> <bar-used>
label = %{F#fba922}
bar-used-width = 50
bar-used-gradient = true
bar-used-foreground-0 = #55aa55
bar-used-foreground-1 = #557755
bar-used-foreground-2 = #f5a70a
bar-used-foreground-3 = #ff5555
bar-used-indicator =
bar-used-indicator-font = 2
bar-used-indicator-foreground = #fff
bar-used-fill =▐
bar-used-fill-font = 2
bar-used-empty =▐
bar-used-empty-font = 2
bar-used-empty-foreground = #444444
ramp-coreload-7-foreground = ${colors.red}
[module/date]
type = internal/date
interval = 1.0
date = " %A %d %B %Y"
time = %H:%M:%S
label = %{F#ddd} %date%  %time%
label = ${env:BAR_DATE}
[module/temperature]
type = internal/temperature
@ -204,49 +163,42 @@ thermal-zone = 0
warn-temperature = 60
interval = 0.5
format = <ramp> <label>
format-warn = <ramp> <label-warn>
format = <label>
format-warn = <label-warn>
label = %{F#77dd77} %{F-} %temperature-c%
label-warn = %{F#dd7777} %{F-} %temperature-c%
label-warn-foreground = #dd7777
ramp-0 =
ramp-1 =
ramp-2 =
ramp-foreground = ${colors.foreground-alt}
label = ${env:BAR_TEMP_OK}
label-warn = ${env:BAR_TEMP_WARN}
label-warn-foreground = ${colors.text}
[module/powermenu]
type = custom/menu
format-padding = 3
label-open = %{F#dd7777}%{F#ddd}
label-close = %{F#dd7777}%{F#ddd}
label-open = ${env:BAR_MENU_OPEN}
label-close = ${env:BAR_MENU_CLOSE}
label-separator = " · "
menu-0-0 = Exit i3
menu-0-0-foreground = ${colors.accent}
menu-0-0-foreground = ${colors.text}
menu-0-0-exec = i3-msg exit
menu-0-1 = Reboot
menu-0-1-foreground = ${colors.accent}
menu-0-1-foreground = ${colors.text}
menu-0-1-exec = menu-open-1
menu-0-2 = Power off
menu-0-2-foreground = ${colors.accent}
menu-0-2-foreground = ${colors.text}
menu-0-2-exec = menu-open-2
menu-1-0 = Cancel
menu-1-0-foreground = ${colors.accent}
menu-1-0-foreground = ${colors.mauve}
menu-1-0-exec = menu-open-0
menu-1-1 = Reboot
menu-1-1-foreground = ${colors.accent}
menu-1-1-foreground = ${colors.mauve}
menu-1-1-exec = systemctl reboot -i
menu-2-0 = Cancel
menu-2-0-foreground = ${colors.accent}
menu-2-0-foreground = ${colors.mauve}
menu-2-0-exec = menu-open-0
menu-2-1 = Power off
menu-2-1-foreground = ${colors.accent}
menu-2-1-foreground = ${colors.mauve}
menu-2-1-exec = systemctl poweroff
[module/system-usb-udev]
@ -274,11 +226,12 @@ interval = 30
[module/backlight]
type = internal/backlight
card = intel_backlight
label = %{F#77dd77}☀️%{F#ddd} %percentage%%
label = ${env:BAR_BACKLIGHT}
bar-width = 10
bar-indicator = |
bar-fill = ─
bar-empty = ─
enable-scroll = true
[module/pulseaudio]
type = internal/pulseaudio
@ -286,7 +239,7 @@ interval = 5
format-volume = <ramp-volume> <label-volume>
label-muted = 🔇 muted
label-muted-foreground = #666
label-muted-foreground = ${colors.rosewater}
ramp-volume-0 = 🔈
ramp-volume-1 = 🔉
@ -304,9 +257,9 @@ poll-interval = 5
format-charging = <label-charging>
format-discharging = <label-discharging>
format-full = <label-full>
label-charging =  %percentage%%
label-discharging =  %percentage%%
label-full = %{F#77dd77}
label-charging = ${env:BAR_BATTERY_CHARGING}
label-discharging = ${env:BAR_BATTERY_DISCHARGING}
label-full = ${env:BAR_BATTERY_FULL}
[module/alsa]
type = internal/alsa
@ -319,13 +272,13 @@ master-mixer = Master
format-volume = <ramp-volume> <label-volume>
label-muted = 🔇 muted
label-muted-foreground = #66
label-muted-foreground = ${colors.rosewater}
ramp-volume-0 = 🔈
ramp-volume-1 = 🔉
ramp-volume-2 = 🔊
ramp-volume-0 = ${env:BAR_LOW_VOL}
ramp-volume-1 = ${env:BAR_MED_VOL}
ramp-volume-2 = ${env:BAR_HIGH_VOL}
ramp-headphones-0 =
ramp-headphones-1 =
ramp-headphones-0 = ${env:BAR_HEAD_VOL}
ramp-headphones-1 = ${env:BAR_HEAD_VOL}
interval = 3

View File

@ -1,6 +1,8 @@
#/bin/sh
source $(dirname $0)/../.env
source $(dirname $0)/filesystem.data
output=""
for i in "${!parts[@]}"; do
avail=$(df -h ${parts[$i]} | tail -1 | tr -s ' ' | cut -d' ' -f4)
@ -8,13 +10,13 @@ for i in "${!parts[@]}"; do
num=$(echo ${used} | cut -d'%' -f1)
if [ "$num" -gt 80 ] ; then
color="#dd7777"
color="$MOCHA_RED"
elif [ "$num" -gt 50 ] ; then
color="#fba922"
color="$MOCHA_PEACH"
else
color="#77dd77"
color="$MOCHA_MAUVE"
fi
output=$output"%{F${color}}${icons[$i]} $used%{F#555} · $avail%{F-}"
output=$output"%{F${color}}${icons[$i]} $used%{F$MOCHA_TEXT} · $avail"
if [ $(($i + 1)) -ne "${#parts[@]}" ] ; then
output=$output" "
fi

View File

@ -1,5 +1,5 @@
#!/usr/bin/env bash
source ~/.config/polybar/.env
names=("chostybottombar" "chostytopbar")
killall -q polybar
while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done

View File

@ -0,0 +1,555 @@
#!/usr/bin/env python3
# Taken from https://github.com/polybar/polybar-scripts/tree/master/polybar-scripts/player-mpris-tail
import sys
import dbus
import os
from operator import itemgetter
import argparse
import re
from urllib.parse import unquote
import time
from dbus.mainloop.glib import DBusGMainLoop
from gi.repository import GLib
DBusGMainLoop(set_as_default=True)
FORMAT_STRING = '{icon} {artist} - {title}'
FORMAT_REGEX = re.compile(r'(\{:(?P<tag>.*?)(:(?P<format>[wt])(?P<formatlen>\d+))?:(?P<text>.*?):\})', re.I)
FORMAT_TAG_REGEX = re.compile(r'(?P<format>[wt])(?P<formatlen>\d+)')
SAFE_TAG_REGEX = re.compile(r'[{}]')
class PlayerManager:
def __init__(self, filter_list, block_mode = True, connect = True):
self.filter_list = filter_list
self.block_mode = block_mode
self._connect = connect
self._session_bus = dbus.SessionBus()
self.players = {}
self.print_queue = []
self.connected = False
self.player_states = {}
self.refreshPlayerList()
if self._connect:
self.connect()
loop = GLib.MainLoop()
try:
loop.run()
except KeyboardInterrupt:
print("interrupt received, stopping…")
def connect(self):
self._session_bus.add_signal_receiver(self.onOwnerChangedName, 'NameOwnerChanged')
self._session_bus.add_signal_receiver(self.onChangedProperties, 'PropertiesChanged',
path = '/org/mpris/MediaPlayer2',
sender_keyword='sender')
def onChangedProperties(self, interface, properties, signature, sender = None):
if sender in self.players:
player = self.players[sender]
# If we know this player, but haven't been able to set up a signal handler
if 'properties_changed' not in player._signals:
# Then trigger the signal handler manually
player.onPropertiesChanged(interface, properties, signature)
else:
# If we don't know this player, get its name and add it
bus_name = self.getBusNameFromOwner(sender)
if bus_name is None:
return
self.addPlayer(bus_name, sender)
player = self.players[sender]
player.onPropertiesChanged(interface, properties, signature)
def onOwnerChangedName(self, bus_name, old_owner, new_owner):
if self.busNameIsAPlayer(bus_name):
if new_owner and not old_owner:
self.addPlayer(bus_name, new_owner)
elif old_owner and not new_owner:
self.removePlayer(old_owner)
else:
self.changePlayerOwner(bus_name, old_owner, new_owner)
def getBusNameFromOwner(self, owner):
player_bus_names = [ bus_name for bus_name in self._session_bus.list_names() if self.busNameIsAPlayer(bus_name) ]
for player_bus_name in player_bus_names:
player_bus_owner = self._session_bus.get_name_owner(player_bus_name)
if owner == player_bus_owner:
return player_bus_name
def busNameIsAPlayer(self, bus_name):
if bus_name.startswith('org.mpris.MediaPlayer2') is False:
return False
name = bus_name.split('.')[3]
if self.block_mode is True:
return name not in self.filter_list
return name in self.filter_list
def refreshPlayerList(self):
player_bus_names = [ bus_name for bus_name in self._session_bus.list_names() if self.busNameIsAPlayer(bus_name) ]
for player_bus_name in player_bus_names:
self.addPlayer(player_bus_name)
if self.connected != True:
self.connected = True
self.printQueue()
def addPlayer(self, bus_name, owner = None):
player = Player(self._session_bus, bus_name, owner = owner, connect = self._connect, _print = self.print)
self.players[player.owner] = player
def removePlayer(self, owner):
if owner in self.players:
self.players[owner].disconnect()
del self.players[owner]
# If there are no more players, clear the output
if len(self.players) == 0:
_printFlush(ICON_NONE)
# Else, print the output of the next active player
else:
players = self.getSortedPlayerOwnerList()
if len(players) > 0:
self.players[players[0]].printStatus()
def changePlayerOwner(self, bus_name, old_owner, new_owner):
player = Player(self._session_bus, bus_name, owner = new_owner, connect = self._connect, _print = self.print)
self.players[new_owner] = player
del self.players[old_owner]
# Get a list of player owners sorted by current status and age
def getSortedPlayerOwnerList(self):
players = [
{
'number': int(owner.split('.')[-1]),
'status': 2 if player.status == 'playing' else 1 if player.status == 'paused' else 0,
'owner': owner
}
for owner, player in self.players.items()
]
return [ info['owner'] for info in reversed(sorted(players, key=itemgetter('status', 'number'))) ]
# Get latest player that's currently playing
def getCurrentPlayer(self):
playing_players = [
player_owner for player_owner in self.getSortedPlayerOwnerList()
if
self.players[player_owner].status == 'playing' or
self.players[player_owner].status == 'paused'
]
return self.players[playing_players[0]] if playing_players else None
def print(self, status, player):
self.player_states[player.bus_name] = status
if self.connected:
current_player = self.getCurrentPlayer()
if current_player != None:
_printFlush(self.player_states[current_player.bus_name])
else:
_printFlush(ICON_STOPPED)
else:
self.print_queue.append([status, player])
def printQueue(self):
for args in self.print_queue:
self.print(args[0], args[1])
self.print_queue.clear()
class Player:
def __init__(self, session_bus, bus_name, owner = None, connect = True, _print = None):
self._session_bus = session_bus
self.bus_name = bus_name
self._disconnecting = False
self.__print = _print
self.metadata = {
'artist' : '',
'album' : '',
'title' : '',
'track' : 0
}
self._rate = 1.
self._positionAtLastUpdate = 0.
self._timeAtLastUpdate = time.time()
self._positionTimerRunning = False
self._metadata = None
self.status = 'stopped'
self.icon = ICON_NONE
self.icon_reversed = ICON_PLAYING
if owner is not None:
self.owner = owner
else:
self.owner = self._session_bus.get_name_owner(bus_name)
self._obj = self._session_bus.get_object(self.bus_name, '/org/mpris/MediaPlayer2')
self._properties_interface = dbus.Interface(self._obj, dbus_interface='org.freedesktop.DBus.Properties')
self._introspect_interface = dbus.Interface(self._obj, dbus_interface='org.freedesktop.DBus.Introspectable')
self._media_interface = dbus.Interface(self._obj, dbus_interface='org.mpris.MediaPlayer2')
self._player_interface = dbus.Interface(self._obj, dbus_interface='org.mpris.MediaPlayer2.Player')
self._introspect = self._introspect_interface.get_dbus_method('Introspect', dbus_interface=None)
self._getProperty = self._properties_interface.get_dbus_method('Get', dbus_interface=None)
self._playerPlay = self._player_interface.get_dbus_method('Play', dbus_interface=None)
self._playerPause = self._player_interface.get_dbus_method('Pause', dbus_interface=None)
self._playerPlayPause = self._player_interface.get_dbus_method('PlayPause', dbus_interface=None)
self._playerStop = self._player_interface.get_dbus_method('Stop', dbus_interface=None)
self._playerPrevious = self._player_interface.get_dbus_method('Previous', dbus_interface=None)
self._playerNext = self._player_interface.get_dbus_method('Next', dbus_interface=None)
self._playerRaise = self._media_interface.get_dbus_method('Raise', dbus_interface=None)
self._signals = {}
self.refreshPosition()
self.refreshStatus()
self.refreshMetadata()
if connect:
self.printStatus()
self.connect()
def play(self):
self._playerPlay()
def pause(self):
self._playerPause()
def playpause(self):
self._playerPlayPause()
def stop(self):
self._playerStop()
def previous(self):
self._playerPrevious()
def next(self):
self._playerNext()
def raisePlayer(self):
self._playerRaise()
def connect(self):
if self._disconnecting is not True:
introspect_xml = self._introspect(self.bus_name, '/')
if 'TrackMetadataChanged' in introspect_xml:
self._signals['track_metadata_changed'] = self._session_bus.add_signal_receiver(self.onMetadataChanged, 'TrackMetadataChanged', self.bus_name)
self._signals['seeked'] = self._player_interface.connect_to_signal('Seeked', self.onSeeked)
self._signals['properties_changed'] = self._properties_interface.connect_to_signal('PropertiesChanged', self.onPropertiesChanged)
def disconnect(self):
self._disconnecting = True
for signal_name, signal_handler in list(self._signals.items()):
signal_handler.remove()
del self._signals[signal_name]
def refreshStatus(self):
# Some clients (VLC) will momentarily create a new player before removing it again
# so we can't be sure the interface still exists
try:
self.status = str(self._getProperty('org.mpris.MediaPlayer2.Player', 'PlaybackStatus')).lower()
self.updateIcon()
self.checkPositionTimer()
except dbus.exceptions.DBusException:
self.disconnect()
def refreshMetadata(self):
# Some clients (VLC) will momentarily create a new player before removing it again
# so we can't be sure the interface still exists
try:
self._metadata = self._getProperty('org.mpris.MediaPlayer2.Player', 'Metadata')
self._parseMetadata()
except dbus.exceptions.DBusException:
self.disconnect()
def updateIcon(self):
self.icon = (
ICON_PLAYING if self.status == 'playing' else
ICON_PAUSED if self.status == 'paused' else
ICON_STOPPED if self.status == 'stopped' else
ICON_NONE
)
self.icon_reversed = (
ICON_PAUSED if self.status == 'playing' else
ICON_PLAYING
)
def _print(self, status):
self.__print(status, self)
def _parseMetadata(self):
if self._metadata != None:
# Obtain properties from _metadata
_artist = _getProperty(self._metadata, 'xesam:artist', [''])
_album = _getProperty(self._metadata, 'xesam:album', '')
_title = _getProperty(self._metadata, 'xesam:title', '')
_track = _getProperty(self._metadata, 'xesam:trackNumber', '')
_genre = _getProperty(self._metadata, 'xesam:genre', [''])
_disc = _getProperty(self._metadata, 'xesam:discNumber', '')
_length = _getProperty(self._metadata, 'xesam:length', 0) or _getProperty(self._metadata, 'mpris:length', 0)
_length_int = _length if type(_length) is int else int(float(_length))
_fmt_length = ( # Formats using h:mm:ss if length > 1 hour, else m:ss
f'{_length_int/1e6//60:.0f}:{_length_int/1e6%60:02.0f}'
if _length_int < 3600*1e6 else
f'{_length_int/1e6//3600:.0f}:{_length_int/1e6%3600//60:02.0f}:{_length_int/1e6%60:02.0f}'
)
_date = _getProperty(self._metadata, 'xesam:contentCreated', '')
_year = _date[0:4] if len(_date) else ''
_url = _getProperty(self._metadata, 'xesam:url', '')
_cover = _getProperty(self._metadata, 'xesam:artUrl', '') or _getProperty(self._metadata, 'mpris:artUrl', '')
_duration = _getDuration(_length_int)
# Update metadata
self.metadata['artist'] = re.sub(SAFE_TAG_REGEX, """\1\1""", _metadataGetFirstItem(_artist))
self.metadata['album'] = re.sub(SAFE_TAG_REGEX, """\1\1""", _metadataGetFirstItem(_album))
self.metadata['title'] = re.sub(SAFE_TAG_REGEX, """\1\1""", _metadataGetFirstItem(_title))
self.metadata['track'] = _track
self.metadata['genre'] = re.sub(SAFE_TAG_REGEX, """\1\1""", _metadataGetFirstItem(_genre))
self.metadata['disc'] = _disc
self.metadata['date'] = re.sub(SAFE_TAG_REGEX, """\1\1""", _date)
self.metadata['year'] = re.sub(SAFE_TAG_REGEX, """\1\1""", _year)
self.metadata['url'] = _url
self.metadata['filename'] = os.path.basename(_url)
self.metadata['length'] = _length_int
self.metadata['fmt-length'] = _fmt_length
self.metadata['cover'] = re.sub(SAFE_TAG_REGEX, """\1\1""", _metadataGetFirstItem(_cover))
self.metadata['duration'] = _duration
def onMetadataChanged(self, track_id, metadata):
self.refreshMetadata()
self.printStatus()
def onPropertiesChanged(self, interface, properties, signature):
updated = False
if dbus.String('Metadata') in properties:
_metadata = properties[dbus.String('Metadata')]
if _metadata != self._metadata:
self._metadata = _metadata
self._parseMetadata()
updated = True
if dbus.String('PlaybackStatus') in properties:
status = str(properties[dbus.String('PlaybackStatus')]).lower()
if status != self.status:
self.status = status
self.checkPositionTimer()
self.updateIcon()
updated = True
if dbus.String('Rate') in properties and dbus.String('PlaybackStatus') not in properties:
self.refreshStatus()
if NEEDS_POSITION and dbus.String('Rate') in properties:
rate = properties[dbus.String('Rate')]
if rate != self._rate:
self._rate = rate
self.refreshPosition()
if updated:
self.refreshPosition()
self.printStatus()
def checkPositionTimer(self):
if NEEDS_POSITION and self.status == 'playing' and not self._positionTimerRunning:
self._positionTimerRunning = True
GLib.timeout_add_seconds(1, self._positionTimer)
def onSeeked(self, position):
self.refreshPosition()
self.printStatus()
def _positionTimer(self):
self.printStatus()
self._positionTimerRunning = self.status == 'playing'
return self._positionTimerRunning
def refreshPosition(self):
try:
time_us = self._getProperty('org.mpris.MediaPlayer2.Player', 'Position')
except dbus.exceptions.DBusException:
time_us = 0
self._timeAtLastUpdate = time.time()
self._positionAtLastUpdate = time_us / 1000000
def _getPosition(self):
if self.status == 'playing':
return self._positionAtLastUpdate + self._rate * (time.time() - self._timeAtLastUpdate)
else:
return self._positionAtLastUpdate
def _statusReplace(self, match, metadata):
tag = match.group('tag')
format = match.group('format')
formatlen = match.group('formatlen')
text = match.group('text')
tag_found = False
reversed_tag = False
if tag.startswith('-'):
tag = tag[1:]
reversed_tag = True
if format is None:
tag_is_format_match = re.match(FORMAT_TAG_REGEX, tag)
if tag_is_format_match:
format = tag_is_format_match.group('format')
formatlen = tag_is_format_match.group('formatlen')
tag_found = True
if format is not None:
text = text.format_map(CleanSafeDict(**metadata))
if format == 'w':
formatlen = int(formatlen)
text = text[:formatlen]
elif format == 't':
formatlen = int(formatlen)
if len(text) > formatlen:
text = text[:max(formatlen - len(TRUNCATE_STRING), 0)] + TRUNCATE_STRING
if tag_found is False and tag in metadata and len(metadata[tag]):
tag_found = True
if reversed_tag:
tag_found = not tag_found
if tag_found:
return text
else:
return ''
def printStatus(self):
if self.status in [ 'playing', 'paused' ]:
metadata = { **self.metadata, 'icon': self.icon, 'icon-reversed': self.icon_reversed }
if NEEDS_POSITION:
metadata['position'] = time.strftime("%M:%S", time.gmtime(self._getPosition()))
# replace metadata tags in text
text = re.sub(FORMAT_REGEX, lambda match: self._statusReplace(match, metadata), FORMAT_STRING)
# restore polybar tag formatting and replace any remaining metadata tags after that
try:
text = re.sub(r'􏿿p􏿿(.*?)􏿿p􏿿(.*?)􏿿p􏿿(.*?)􏿿p􏿿', r'%{\1}\2%{\3}', text.format_map(CleanSafeDict(**metadata)))
except:
print("Invalid format string")
self._print(text)
else:
self._print(ICON_STOPPED)
def _dbusValueToPython(value):
if isinstance(value, dbus.Dictionary):
return {_dbusValueToPython(key): _dbusValueToPython(value) for key, value in value.items()}
elif isinstance(value, dbus.Array):
return [ _dbusValueToPython(item) for item in value ]
elif isinstance(value, dbus.Boolean):
return int(value) == 1
elif (
isinstance(value, dbus.Byte) or
isinstance(value, dbus.Int16) or
isinstance(value, dbus.UInt16) or
isinstance(value, dbus.Int32) or
isinstance(value, dbus.UInt32) or
isinstance(value, dbus.Int64) or
isinstance(value, dbus.UInt64)
):
return int(value)
elif isinstance(value, dbus.Double):
return float(value)
elif (
isinstance(value, dbus.ObjectPath) or
isinstance(value, dbus.Signature) or
isinstance(value, dbus.String)
):
return unquote(str(value))
def _getProperty(properties, property, default = None):
value = default
if not isinstance(property, dbus.String):
property = dbus.String(property)
if property in properties:
value = properties[property]
return _dbusValueToPython(value)
else:
return value
def _getDuration(t: int):
seconds = t / 1000000
return time.strftime("%M:%S", time.gmtime(seconds))
def _metadataGetFirstItem(_value):
if type(_value) is list:
# Returns the string representation of the first item on _value if it has at least one item.
# Returns an empty string if _value is empty.
return str(_value[0]) if len(_value) else ''
else:
# If _value isn't a list just return the string representation of _value.
return str(_value)
class CleanSafeDict(dict):
def __missing__(self, key):
return '{{{}}}'.format(key)
"""
Seems to assure print() actually prints when no terminal is connected
"""
_last_status = ''
def _printFlush(status, **kwargs):
global _last_status
if status != _last_status:
print(status, **kwargs)
sys.stdout.flush()
_last_status = status
parser = argparse.ArgumentParser()
parser.add_argument('command', help="send the given command to the active player",
choices=[ 'play', 'pause', 'play-pause', 'stop', 'previous', 'next', 'status', 'list', 'current', 'metadata', 'raise' ],
default=None,
nargs='?')
parser.add_argument('-b', '--blacklist', help="ignore a player by it's bus name. Can be given multiple times (e.g. -b vlc -b audacious)",
action='append',
metavar="BUS_NAME",
default=[])
parser.add_argument('-w', '--whitelist', help="permit a player by it's bus name like --blacklist. will block --blacklist if given",
action='append',
metavar="BUS_NAME",
default=[])
parser.add_argument('-f', '--format', default='{icon} {:artist:{artist} - :}{:title:{title}:}{:-title:{filename}:}')
parser.add_argument('--truncate-text', default='')
parser.add_argument('--icon-playing', default='')
parser.add_argument('--icon-paused', default='')
parser.add_argument('--icon-stopped', default='')
parser.add_argument('--icon-none', default='')
args = parser.parse_args()
FORMAT_STRING = re.sub(r'%\{(.*?)\}(.*?)%\{(.*?)\}', r'􏿿p􏿿\1􏿿p􏿿\2􏿿p􏿿\3􏿿p􏿿', args.format)
NEEDS_POSITION = "{position}" in FORMAT_STRING
TRUNCATE_STRING = args.truncate_text
ICON_PLAYING = args.icon_playing
ICON_PAUSED = args.icon_paused
ICON_STOPPED = args.icon_stopped
ICON_NONE = args.icon_none
block_mode = len(args.whitelist) == 0
filter_list = args.blacklist if block_mode else args.whitelist
if args.command is None:
PlayerManager(filter_list = filter_list, block_mode = block_mode)
else:
player_manager = PlayerManager(filter_list = filter_list, block_mode = block_mode, connect = False)
current_player = player_manager.getCurrentPlayer()
if args.command == 'play' and current_player:
current_player.play()
elif args.command == 'pause' and current_player:
current_player.pause()
elif args.command == 'play-pause' and current_player:
current_player.playpause()
elif args.command == 'stop' and current_player:
current_player.stop()
elif args.command == 'previous' and current_player:
current_player.previous()
elif args.command == 'next' and current_player:
current_player.next()
elif args.command == 'status' and current_player:
current_player.printStatus()
elif args.command == 'list':
print("\n".join(sorted([
"{} : {}".format(player.bus_name.split('.')[3], player.status)
for player in player_manager.players.values() ])))
elif args.command == 'current' and current_player:
print("{} : {}".format(current_player.bus_name.split('.')[3], current_player.status))
elif args.command == 'metadata' and current_player:
print(_dbusValueToPython(current_player._metadata))
elif args.command == 'raise' and current_player:
current_player.raisePlayer()

View File

@ -1,3 +1,3 @@
#!/bin/sh
echo "%{F#77dd77}%{F#ddd} " $(uptime --pretty | sed 's/up //')
source $(dirname $0)/../.env
echo "%{F$MOCHA_MAUVE}%{F$MOCHA_TEXT} " $(uptime --pretty | sed 's/up //')

View File

@ -1,5 +1,6 @@
#!/bin/sh
source $(dirname $0)/../.env
# Dependencies : jq ; udisks2
# Some updates by Quentin Duchemin on 18/03/07
# - Add label in lsblk selection
@ -41,7 +42,7 @@ usb_print() {
output="$output$space$mounted"
done
echo "%{F#ddd}$output"
echo "%{F$MOCHA_TEXT}$output"
}
usb_update() {

View File

@ -1,15 +1,17 @@
#!/bin/sh
connect=$(ping -q -w 1 -c 1 `ip r | grep default | cut -d ' ' -f 3` &> /dev/null)
# Wait for connection
sleep 5
source $(dirname $0)/../.env
connect=$(ping -q -w 1 -c 1 8.8.8.8 &> /dev/null)
if [ $? -eq 0 ]; then
updates_arch=$(/usr/bin/checkupdates | wc -l)
# a restricts to AUR packages
updates_aur=$(yay -Qua | wc -l)
updates=$(("$updates_arch" + "$updates_aur"))
if [ "$updates" -gt 0 ]; then
echo "%{F#dd7777}%{F#ddd} $updates_arch | $updates_aur"
echo "%{F$MOCHA_MAUVE}%{F$MOCHA_TEXT} $updates_arch | $updates_aur"
else
echo "%{F#77dd77}%{F#ddd} 0"
echo "%{F$MOCHA_GREEN}%{F$MOCHA_TEXT} 0"
fi
else
echo "%{F#77dd77}%{F#ddd} Offline"

View File

@ -0,0 +1,3 @@
@realtime - rtprio 99
@realtime - memlock unlimited
@realtime - nice unlimited

View File

@ -0,0 +1 @@
/etc/security/limits.d

View File

@ -0,0 +1,14 @@
[redshift]
temp-day=5700
temp-night=3500
brightness=1.0
gamma=0.8
; Brutal
fade=0
location-provider=manual
; This is Compiegne
[manual]
lat=49.41794
lon=2.82606

View File

@ -0,0 +1,112 @@
* {
bg-col: #1e1e2e;
bg-col-light: #1e1e2e;
border-col: #1e1e2e;
selected-col: #1e1e2e;
blue: #89b4fa;
fg-col: #cdd6f4;
fg-col2: #f38ba8;
grey: #6c7086;
width: 600;
font: "JetBrainsMono Nerd Font 14";
}
element-text, element-icon , mode-switcher {
background-color: inherit;
text-color: inherit;
}
window {
height: 360px;
border: 3px;
border-color: @border-col;
background-color: @bg-col;
}
mainbox {
background-color: @bg-col;
}
inputbar {
children: [prompt,entry];
background-color: @bg-col;
border-radius: 5px;
padding: 2px;
}
prompt {
background-color: @blue;
padding: 6px;
text-color: @bg-col;
border-radius: 3px;
margin: 20px 0px 0px 20px;
}
textbox-prompt-colon {
expand: false;
str: ":";
}
entry {
padding: 6px;
margin: 20px 0px 0px 10px;
text-color: @fg-col;
background-color: @bg-col;
}
listview {
border: 0px 0px 0px;
padding: 6px 0px 0px;
margin: 10px 0px 0px 20px;
columns: 2;
lines: 5;
background-color: @bg-col;
}
element {
padding: 5px;
background-color: @bg-col;
text-color: @fg-col ;
}
element-icon {
size: 25px;
}
element selected {
background-color: @selected-col ;
text-color: @fg-col2 ;
}
mode-switcher {
spacing: 0;
}
button {
padding: 10px;
background-color: @bg-col-light;
text-color: @grey;
vertical-align: 0.5;
horizontal-align: 0.5;
}
button selected {
background-color: @bg-col;
text-color: @blue;
}
message {
background-color: @bg-col-light;
margin: 2px;
padding: 2px;
border-radius: 5px;
}
textbox {
padding: 6px;
margin: 20px 0px 0px 20px;
text-color: @blue;
background-color: @bg-col-light;
}

View File

@ -0,0 +1,18 @@
configuration{
modi: "run,drun,window";
icon-theme: "JetBrainsMono Nerd Font";
show-icons: true;
terminal: "terminator";
drun-display-format: "{icon} {name}";
location: 0;
disable-history: false;
hide-scrollbar: true;
display-drun: "  Apps ";
display-run: "  Run ";
display-window: "  Window";
display-Network: " 󰤨 Network";
sidebar-mode: true;
}
@theme "catppuccin-mocha"

File diff suppressed because it is too large Load Diff

View File

@ -1,131 +0,0 @@
/**
* User: deadguy
* Copyright: deadguy
*/
configuration {
display-drun: "Activate";
display-run: "Execute";
display-window: "Window";
show-icons: true;
sidebar-mode: true;
}
* {
background-color: #080808;
text-color: #d3d7cf;
selbg: #215d9c;
actbg: #262626;
urgbg: #e53935;
winbg: #26c6da;
selected-normal-foreground: @winbg;
normal-foreground: @text-color;
selected-normal-background: @actbg;
normal-background: @background-color;
selected-urgent-foreground: @background-color;
urgent-foreground: @text-color;
selected-urgent-background: @urgbg;
urgent-background: @background-color;
selected-active-foreground: @winbg;
active-foreground: @text-color;
selected-active-background: @actbg;
active-background: @selbg;
line-margin: 2;
line-padding: 2;
separator-style: "none";
hide-scrollbar: "true";
margin: 0;
padding: 0;
}
window {
location: west;
anchor: west;
height: 100%;
width: 22%;
orientation: horizontal;
children: [mainbox];
}
mainbox {
spacing: 0.8em;
children: [ entry,listview,sidebar ];
}
button { padding: 15px 5px; }
button selected {
background-color: @active-background;
text-color: @background-color;
}
inputbar {
padding: 5px;
spacing: 5px;
}
listview {
spacing: 0.5em;
dynamic: false;
cycle: true;
}
element { padding: 10px; }
entry {
expand: false;
text-color: @normal-foreground;
vertical-align: 1;
padding: 5px;
}
element normal.normal {
background-color: @normal-background;
text-color: @normal-foreground;
}
element normal.urgent {
background-color: @urgent-background;
text-color: @urgent-foreground;
}
element normal.active {
background-color: @active-background;
text-color: @active-foreground;
}
element selected.normal {
background-color: @selected-normal-background;
text-color: @selected-normal-foreground;
border: 0 5px solid 0 0;
border-color: @active-background;
}
element selected.urgent {
background-color: @selected-urgent-background;
text-color: @selected-urgent-foreground;
}
element selected.active {
background-color: @selected-active-background;
text-color: @selected-active-foreground;
}
element alternate.normal {
background-color: @normal-background;
text-color: @normal-foreground;
}
element alternate.urgent {
background-color: @urgent-background;
text-color: @urgent-foreground;
}
element alternate.active {
background-color: @active-background;
text-color: @active-foreground;
}

View File

@ -0,0 +1,7 @@
# Instead of "typing" the character, which does not
# works in some apps, paste through the clipboard
# and restore previous content. Works better
# in most cases, use alt+t instead to use
# defaut behaviour.
action = clipboard
skin-tone = neutral

View File

@ -1,11 +0,0 @@
[Unit]
Description=Back up chosty's documents
OnFailure=notify-backup-failure.service
[Service]
Type=oneshot
# Cannot use -a as FAT32 does not support permission. Also don't use -g and -l (FAT32 does not support groups and symlinks)
# Do not use full path and relax timestamp, otherwise all files are copied over
# For some reason, exclude should be relative path (cf man), but this does not work for the first command. Dunno why
ExecStart=/usr/bin/rsync -vCRErtm --delete --delete-excluded --modify-window=10 --include="/home/chosty/.config" --exclude="/home/chosty/.*" --exclude="/home/chosty/aur" --exclude="/home/chosty/git" /home/chosty /mnt/backup/Linux
ExecStart=/usr/bin/rsync -vCErtm --delete --delete-excluded --modify-window=10 --exclude="/Documents/Jeux" /mnt/data/Documents /mnt/data/Images /mnt/data/Vidéos /mnt/backup/Data/

View File

@ -1,9 +0,0 @@
[Unit]
Description=Run backup daily
[Timer]
OnCalendar=weekly
Persistent=true
[Install]
WantedBy=timers.target

View File

@ -2,8 +2,10 @@
borderless = True
use_custom_url_handler = True
custom_url_handler = firefox
enabled_plugins = TerminalShot, LaunchpadCodeURLHandler, APTURLHandler, LaunchpadBugURLHandler
suppress_multiple_term_dialog = True
enabled_plugins = ActivityWatch, InactivityWatch, LaunchpadBugURLHandler, LaunchpadCodeURLHandler, APTURLHandler, TerminalShot, TerminatorThemes
ask_before_closing = never
always_split_with_profile = True
putty_paste_style_source_clipboard = True
[keybindings]
go_next = <Primary><Shift>n
go_prev = <Primary><Shift>p
@ -25,12 +27,35 @@
[profiles]
[[default]]
icon_bell = False
background_darkness = 0.87
background_type = transparent
background_color = "#282828"
background_darkness = 1.0
cursor_fg_color = "#000000"
cursor_bg_color = "#aaaaaa"
font = DejaVu Sans Mono 11
foreground_color = "#ebdbb2"
scrollbar_position = hidden
scrollback_infinite = True
use_system_font = False
use_theme_colors = True
bold_is_bright = True
title_transmit_fg_color = "#000000"
title_transmit_bg_color = "#ffffff"
[[Catppuccin_Mocha]]
icon_bell = False
background_color = "#282828"
background_darkness = 0.7
background_type = transparent
cursor_fg_color = "#000000"
cursor_bg_color = "#f5e0dc"
font = MesloLGM Nerd Font 11
foreground_color = "#ebdbb2"
show_titlebar = False
scrollbar_position = hidden
scrollback_infinite = True
palette = "#45475a:#f38ba8:#a6e3a1:#f9e2af:#89b4fa:#f5c2e7:#94e2d5:#bac2de:#585b70:#f38ba8:#a6e3a1:#f9e2af:#89b4fa:#f5c2e7:#94e2d5:#a6adc8"
use_system_font = False
bold_is_bright = True
title_hide_sizetext = True
title_transmit_fg_color = "#000000"
title_transmit_bg_color = "#ffffff"
[layouts]
@ -48,6 +73,6 @@
type = Terminal
parent = child0
order = 0
profile = default
profile = Catppuccin_Mocha
uuid = 498cd758-0193-4b69-b40a-9743e0b080a7
[plugins]

View File

@ -0,0 +1,136 @@
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"palette": {
"ahead": "#54433a",
"blue": "#8aadf4",
"darktext": "#6e738d",
"green": "#a6da95",
"grey": "#e4e4e4",
"lavender": "#b7bdf8",
"maroon": "#ee99a0",
"mauve": "#c6a0f6",
"text": "#ffffff"
},
"blocks": [
{
"type": "prompt",
"alignment": "left",
"segments": [
{
"properties": {
"alpine": "\uf300",
"arch": "\uf303",
"centos": "\uf304",
"debian": "\uf306",
"elementary": "\uf309",
"fedora": "\uf30a",
"gentoo": "\uf30d",
"linux": "\ue712",
"macos": "\ue711",
"manjaro": "\uf312",
"mint": "\uf30f",
"opensuse": "\uf314",
"raspbian": "\uf315",
"ubuntu": "\uf31c",
"windows": "\ue70f"
},
"style": "diamond",
"leading_diamond": "\u256d\u2500\ue0b2",
"template": " {{ .Icon }} ",
"foreground": "p:text",
"background": "p:mauve",
"type": "os"
},
{
"style": "powerline",
"template": " {{ .UserName }} ",
"foreground": "p:darktext",
"powerline_symbol": "\ue0b0",
"background": "p:grey",
"type": "session"
},
{
"properties": {
"folder_icon": "\u2026",
"folder_separator_icon": " <transparent>\ue0b1</> ",
"max_depth": 3,
"style": "agnoster_short"
},
"style": "powerline",
"template": " {{ .Path }} ",
"foreground": "p:text",
"powerline_symbol": "\ue0b0",
"background": "p:blue",
"type": "path"
},
{
"properties": {
"branch_gone_icon": "\ueab8",
"branch_icon": "\uf418 ",
"branch_identical_icon": "\uf444",
"branch_max_length": 25,
"fetch_stash_count": true,
"fetch_status": true
},
"style": "diamond",
"leading_diamond": "<transparent,background>\ue0b0</>",
"trailing_diamond": "\ue0b0",
"template": " {{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }} <transparent>\ue0b1</> <#121318>\uf044 {{ .Working.String }}</>{{ end }}{{ if .Staging.Changed }} <transparent>\ue0b1</> <#121318>\uf046 {{ .Staging.String }}</>{{ end }}{{ if gt .StashCount 0 }} <transparent>\ue0b1</> <#121318>\ueb4b {{ .StashCount }}</>{{ end }} ",
"foreground": "p:text",
"background": "p:green",
"type": "git",
"background_templates": [
"{{ if or (.Working.Changed) (.Staging.Changed) }}p:maroon{{ end }}"
]
}
],
"newline": true
},
{
"type": "prompt",
"alignment": "right",
"segments": [
{
"properties": {
"always_enabled": true,
"style": "austin"
},
"style": "powerline",
"template": " \ueba2 {{ .FormattedMs }} ",
"foreground": "p:darktext",
"powerline_symbol": "\ue0b2",
"background": "p:grey",
"type": "executiontime",
"invert_powerline": true
},
{
"properties": {
"time_format": "15:04:05"
},
"style": "diamond",
"trailing_diamond": "\ue0b0",
"template": " \uf073 {{ .CurrentDate | date .Format }} ",
"foreground": "p:text",
"background": "p:mauve",
"type": "time",
"invert_powerline": true
}
]
},
{
"type": "prompt",
"alignment": "left",
"segments": [
{
"style": "plain",
"template": "\u2570\u2500 {{ if .Root }}#{{else}}${{end}}",
"foreground": "p:mauve",
"type": "text"
}
],
"newline": true
}
],
"version": 3,
"final_space": true
}

View File

@ -0,0 +1 @@
ACTION=="add", SUBSYSTEM=="backlight", RUN+="/bin/chgrp video $sys$devpath/brightness", RUN+="/bin/chmod g+w $sys$devpath/brightness"

View File

@ -0,0 +1 @@
/etc/udev/rules.d

View File

@ -1 +0,0 @@
/etc/systemd/system/updatedb.timer.d/

View File

@ -5,11 +5,11 @@
# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an
# absolute path. No other format is supported.
#
XDG_DESKTOP_DIR="$HOME/documents/xdg/desktop"
XDG_DESKTOP_DIR="$HOME/"
XDG_DOWNLOAD_DIR="$HOME/downloads"
XDG_TEMPLATES_DIR="$HOME/documents/xdg/templates"
XDG_PUBLICSHARE_DIR="$HOME/documents/xdg/public"
XDG_TEMPLATES_DIR="$HOME/"
XDG_PUBLICSHARE_DIR="$HOME/"
XDG_DOCUMENTS_DIR="$HOME/documents"
XDG_MUSIC_DIR="$HOME/music"
XDG_MUSIC_DIR="$HOME/"
XDG_PICTURES_DIR="$HOME/images"
XDG_VIDEOS_DIR="$HOME/videos"

13
.env 100644
View File

@ -0,0 +1,13 @@
export SCENARI_SSH_USER='qduchemin'
export SCENARI_SSH_KEY_PATH="/home/.ssh/id_gpg.pub"
export PICASOFT_SSH_USER='qduchemi'
export PICASOFT_SSH_KEY_PATH='/home/.ssh/id_gpg.pub'
export PATH="$PATH:/home/go/bin:/usr/local/.local/bin:~/node_modules/.bin"
# trash-cli supports top-level trash (see https://specifications.freedesktop.org/trash-spec/trashspec-latest.html)
# gio, which is otherwise used by default, wants to write to ~/.local/share/Trash, which is on my
# system on another partition than user data, so that copying between partitions is denied by gio.
# another solution is to link $XDG_DATA_HOME/Trash somewhere on the same partition as user data
export ELECTRON_TRASH="trash-cli"
export ZSH_COLORIZE_TOOL="pygmentize"
export ZSH_COLORIZE_STYLE="catppuccin-macchiato"
export LESSOPEN="|lesspipe.sh %s"

26
.gitconfig 100644
View File

@ -0,0 +1,26 @@
[core]
pager = delta
[interactive]
diffFilter = delta --color-only
[delta]
navigate = true # use n and N to move between diff sections
side-by-side = true
hyperlinks = true
hyperlinks-file-link-format = "vscode://file/{path}"
[merge]
conflictstyle = diff3
[diff]
colorMoved = default
[user]
email = quentinduchemin@tuta.io
name = Lilou
[push]
autoSetupRemote = true
[pull]
rebase = true
[init]
defaultBranch = main

View File

@ -1 +1,4 @@
enable-ssh-support
default-cache-ttl 3600
max-cache-ttl 7200
pinentry-program /usr/bin/pinentry-gnome3

View File

@ -1 +1,3 @@
8870E499C64EEB7720EBA5A442F4FE90129BFAE3
85323D13424DE78C6469205C4A0404C4F8A02243
# End of file

View File

@ -19,8 +19,10 @@ POLYBAR_CONFIG="polybar"
ARCH_PACKAGES="bootstrap"
MERGE_DIRS="${I3_CONFIG} ${POLYBAR_CONFIG} ${ARCH_PACKAGES}"
changed_files="$(git --git-dir=$HOME/.cfg/ --work-tree=$HOME diff-tree -r --name-status --no-commit-id HEAD^1 HEAD)"
# Check if a file has been modified and deleted since last commit, if so perform an action
# $1 : path of file
# $1 : absolute path of the file
# $2 : command to launch if file has been created of modifed
# $3 : command to launch if file has been deleted
function check_copy() {
@ -29,15 +31,15 @@ function check_copy() {
echo -e "* Running \"$2\"" && eval "$2"
return
fi
echo "$changed_files" | grep --quiet "${1#$HOME/}"
if [ $? == "0" ]; then
echo "$changed_files" | cut -f 1 | grep --quiet "D"
if [ $? == "0" ]; then
changed_file=`grep "${1#$HOME/}" <<< "${changed_files}"`
if [ ! -z "${changed_file}" ]; then
if echo "$changed_file" | grep -q -E "^D"; then
echo "* $1 has been removed"
echo -e "\t* Running \"$3\"" && eval "$3"
else
echo "* Changes detected in $1"
echo -e "* Running \"$2\"" && eval "$2"
fi
if echo "$changed_file" | grep -q -E "^(A|M)"; then
echo "* Changes detected in $(basename $1)"
echo -e "\t* Running \"$2\"" && eval "$2"
fi
else
echo "$1 not modified, no need to copy"
@ -48,18 +50,25 @@ function check_copy() {
# with an optional `$1/config.d/$2` file. This is useful for having
# a common base for multiple computer, and per-computer stuff.
# $1 : path of the folder
# $2 : optional current environment
# $2 : current environment
# $3 : if defined, prepend $2 instead of appending
function merge_config() {
echo -e "\n=== Generate ${m} config file ==="
rm -f ${CONFIG}/${m}/${FINAL_CONFIG}
final_path=${CONFIG}/${m}/${FINAL_CONFIG}.${2}
rm -f ${final_path}
# Copy common config
cp ${CONFIG}/${m}/${BASE_CONFIG} ${CONFIG}/${m}/${FINAL_CONFIG}
echo "${CONFIG}/${m}/${FINAL_CONFIG} created"
cp ${CONFIG}/${m}/${BASE_CONFIG} ${final_path}
echo "${final_path} created"
# If there is an override folder, merge given env
if [ ! -z ${2} ] && [ -d ${CONFIG}/${m}/${MERGE_CONFIG_FOLDER} ]; then
for f in `find ${CONFIG}/${m}/config.d -type f -path "*${2}"`; do
echo "Found ${f}, add to regular config file"
cat "${f}" >> ${CONFIG}/${m}/${FINAL_CONFIG}
if [ -z $3 ]; then
echo "Found ${f}, append to regular config file"
echo -e "\n$(cat ${f})\n" >> ${final_path}
else
echo "Found ${f}, prepend to regular config file"
echo -e "\n$(cat ${f})\n$(cat ${final_path})\n" > ${final_path}
fi
done
fi
}
@ -70,30 +79,94 @@ function usage() {
exit 0
}
function init_system() {
echo -e "* Installing base Arch packages..."
yay -Syu --needed --noconfirm - < ${CONFIG}/${ARCH_PACKAGES}/${FINAL_CONFIG}
echo -e "* Changing shell to ZSH..."
chsh -s $(which zsh)
if [ "$ENV" = "desk" ]; then
echo -e "* Add user to realtime group..."
sudo usermod -aG realtime $(whoami)
fi
# https://man.archlinux.org/man/rofi-dmenu.5
echo -e "* Symlink dmenu → rofi..."
sudo ln -sf /usr/bin/rofi /usr/bin/dmenu
echo -e "* Enabling common systemd units..."
sudo systemctl enable --now systemd-timesyncd
sudo systemctl enable --now cups
sudo systemctl enable --now bluetooth
sudo systemctl enable --now bluetooth-autoconnect
sudo systemctl enable --now updatedb.timer
systemctl --user enable --now pipewire-pulse
systemctl --user enable --now pipewire-pulse.socket
echo -e "* Enable resolvctl..."
sudo systemctl enable --now systemd-resolved
sudo ln -sf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf
~/.config/bootstrap/init_netctl.sh ${ENV}
echo -e "* Ensure hardware clock is up to date..."
sudo hwclock --systohc
# So that "Open in Terminal" works inc Nemo
echo -e "* Make 'Open Terminal' work in Nemo..."
sudo gsettings set org.cinnamon.desktop.default-applications.terminal exec i3-sensible-terminal
# For screenshots
echo -e "* Install pychee for uploading screenshots on Lychee..."
pip install --break-system-packages pychee
# Additionnal plugins for ZSH
echo -e "* Install ZSH plugins for oh-my-zsh..."
sudo git clone https://github.com/zdharma-continuum/fast-syntax-highlighting.git /usr/share/oh-my-zsh/plugins/fast-syntax-highlighting
sudo git clone https://github.com/zsh-users/zsh-autosuggestions /usr/share/oh-my-zsh/plugins/zsh-autosuggestions
sudo git clone https://github.com/unixorn/fzf-zsh-plugin.git /usr/share/oh-my-zsh/plugins/fzf-zsh-plugin
echo -e "* Install everything we need for Catppuccin themes..."
echo -e "\tFor polybar..."
wget https://raw.githubusercontent.com/catppuccin/polybar/main/themes/macchiato.ini -O ~/.config/polybar/macchiato.ini
echo -e "\tFor zsh..."
sudo mkdir -p /usr/local/share/fsh
sudo wget https://raw.githubusercontent.com/catppuccin/zsh-fsh/main/themes/catppuccin-macchiato.ini -O /usr/local/share/fsh/catppuccin-macchiato.ini
echo -e "\tFor gtk..."
# Change icon color for Papirus Icon Theme
papirus-folders -C cat-latte-flamingo --theme Papirus-Dark
echo -e "\tFor Pygments..."
pip install --break-system-packages 'catppuccin[pygments]'
# Basic directory structure
echo -e "* Create base home directories..."
mkdir -p ~/documents ~/images/screenshots ~/videos ~/downloads
echo -e "* Allow user to control brightness..."
sudo usermod $(whoami) -aG video
echo -e "* Allow user to administrate printers..."
sudo usermod $(whoami) -aG wheel
echo -e "* Install host app for PassFF Firefox extension..."
curl -sSL github.com/passff/passff-host/releases/latest/download/install_host_app.sh | bash -s -- firefox
echo -e "* Set Firefox to be the default browser, probably overwritten by Chromium..."
xdg-settings set default-web-browser firefox.desktop
echo -e "* Ensure keyboard will still be in AZERTY mode when plugged/unplugged..."
# This creates a Xorg configuration file
sudo localectl --no-convert set-x11-keymap fr
echo -e "* Create a symlink rrm → rm (rm will be an alias to rmtrash) in zsh"
echo -e "* Install synchronization extension for VSCode settings and plugins..."
# Avoid to push whole extensions up to hundreds of MB, and avoid using
# Micro$oft proprietary stuff, usable with any git server
vscodium --install-extension zokugun.sync-settings
git clone git@git.chosto.me:Chosto/codium-settings.git ~/.config/codium-settings
echo -e "* Install plugin to pick theme for Terminator..."
# See https://github.com/EliverLara/terminator-themes
mkdir -p $HOME/.config/terminator/plugins
wget https://git.io/v5Zww -O $HOME"/.config/terminator/plugins/terminator-themes.py"
}
# Use XDG_CONFIG_HOME if defined, default otherwise
CONFIG=${XDG_CONFIG_HOME:-$HOME/.config}
ENV=${1}
changed_files="$(git --git-dir=$HOME/.cfg/ --work-tree=$HOME diff-tree -r --name-status --no-commit-id HEAD^1 HEAD)"
# First thing to do, before symlinks
for m in ${MERGE_DIRS}; do
if [ -f "${CONFIG}/${m}/${MERGE_CONFIG_FOLDER}/above" ]; then
merge_config $m ${ENV} true
else
merge_config $m ${ENV}
fi
done
if [ ! -z "$INIT" ]; then
echo -e "* Installing base Arch packages..."
yay -Syu --needed --noconfirm - < ${CONFIG}/${ARCH_PACKAGES}/${FINAL_CONFIG}
echo -e "* Changing shell to ZSH..."
chsh -s $(which zsh)
# https://man.archlinux.org/man/rofi-dmenu.5
echo -e "* Symlink dmenu → rofi..."
sudo ln -s /usr/bin/rofi /usr/bin/dmenu
echo -e "* Enabling NetworkManager..."
sudo systemctl enable --now NetworkManager
fi
if [ ! -z ${ENV} ]; then
echo -e "\n=== Create symlink to *.${ENV} regular files ==="
# Take all specific files and create a symlink pointing to it without the extension
# This file will be used by applications
@ -106,7 +179,6 @@ if [ ! -z ${ENV} ]; then
echo "${f%.*}${f}"
ln -sf ${f} ${f%.*}
done
fi
echo -e "\n=== Copy changed configuration which resides in outer directory ==="
# Destination files are regular files
@ -115,19 +187,34 @@ for f in `find ${CONFIG} -type f -name ${DEST_FILENAME}`; do
DEST=`cat ${f}`
# Get all files, either regular files or symlinks, which are not the destination file nor specific desktop/laptop files
# This is because if desktop/laptop files exist, they already have a symlink pointing to them at this stage
for config_file in `find ${DIR} -regextype emacs -mindepth 1 -type f -not \( -regex "*.${ENV_EXT_REGEXP}" -o -name "${DEST_FILENAME}" \)`; do
# We want to get the path relative to the directory we are searching in, so subfolders are kept when copying
for config_file in `find ${DIR} -regextype posix-extended -mindepth 1 \( -type f -o -type l \) -not \( -regex "${ENV_EXT_REGEXP}" -o -name "${DEST_FILENAME}" \) -exec realpath -s --relative-to ${DIR} {} \;`; do
# If we have to copy to a subfolder, extract it
if echo ${config_file} | grep -q '/'; then
subfolder=${config_file%/*}
else
subfolder=''
fi
filename=${config_file##*/}
# Now copy to destination
sudo mkdir -p ${DEST}
check_copy "${config_file}" "sudo cp ${config_file} ${DEST}" "sudo rm ${DEST}/${config_file##*/}"
real_dest=${DEST}/${subfolder}
sudo mkdir -p ${real_dest}
absolute_source=`realpath "${DIR}/${config_file}"`
check_copy "${absolute_source}" "sudo cp ${absolute_source} ${real_dest}" "sudo rm ${real_dest}/${filename}"
done
done
if [ ! -z "$INIT" ]; then
init_system
fi
if [ ! -z "${WM_RESTART}" ]; then
echo -e "\n=== Restart graphical environment ==="
# Reload i3 configuration
i3-msg reload
i3-msg restart
# Restart picom due to this bug https://github.com/yshui/picom/issues/166
killall picom; picom &>/dev/null &
killall picom
picom &>/dev/null &
fi

6
.vimrc 100644
View File

@ -0,0 +1,6 @@
vmap <C-c> :<Esc>`>a<CR><Esc>mx`<i<CR><Esc>my'xk$v'y!xclip -selection c<CR>u
map <Insert> :set paste<CR>i<CR><CR><Esc>k:.!xclip -o<CR>JxkJx:set nopaste<CR>
" Reopen the last edited position in files
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
syntax on
filetype on

11
.xinitrc 100755
View File

@ -0,0 +1,11 @@
xrandr --output DVI-I-1 --auto --output HDMI-1 --auto --scale 1x1 --right-of DVI-I-1
xrdb -merge /home/.Xresources
# Propagate environment variables to dbus-daemon, necessary for
# pinentry-gnome3 to properly display without falling
# back to ncurses.
dbus-update-activation-environment DISPLAY XAUTHORITY
WALLPAPER_PATH="/home/.local/share/backgrounds/wallpaper.jpg"
if [ -f ${WALLPAPER_PATH} ]; then
feh --bg-scale ${WALLPAPER_PATH}
fi
exec i3

56
.zshrc
View File

@ -1,11 +1,6 @@
# Path to your oh-my-zsh installation.
export ZSH=/usr/share/oh-my-zsh
# Set name of the theme to load. Optionally, if you set this to "random"
# it'll load a random theme each time that oh-my-zsh is loaded.
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
ZSH_THEME="agnoster"
# Uncomment the following line to use case-sensitive completion.
CASE_SENSITIVE="true"
@ -19,6 +14,10 @@ COMPLETION_WAITING_DOTS="true"
# stamp shown in the history command output.
# The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
HIST_STAMPS="dd.mm.yyyy"
# Global history search
HISTFILE=~/.zsh_history
HISTSIZE=10000
SAVEHIST=10000
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
@ -27,11 +26,7 @@ HIST_STAMPS="dd.mm.yyyy"
plugins=(
# acs command → print aliases by group
aliases
# `j` to go to an already used directory by partial name
autojump
colored-man-pages
# cat with colors → ccat or cless
colorize
# commands to copy file content or absolute path to clipboard
copyfile
copypath
@ -41,10 +36,16 @@ plugins=(
docker
# unique command for most archives
extract
# fish-like highlighting as you type
fast-syntax-highlighting
# fuzzy finder for history, files, docker, process, etc (see fzf)
fzf-zsh-plugin
# aliases
git
# password-store autocomplete
pass
# fish-like completion as you type
zsh-autosuggestions
)
# Enable option stacking in autocomplete, i.e. docker run -it <TAB>
@ -54,20 +55,41 @@ zstyle ':completion:*:*:docker-*:*' option-stacking yes
# Load ZSH
source $ZSH/oh-my-zsh.sh
# Use Quick Term prompt theme made for Oh My Posh, in zsh
eval "$(oh-my-posh init zsh --config ~/.config/theme/quick-term.omp.json)"
# Completions for zoxide
eval "$(zoxide init zsh)"
# Completions for scaleway-cli
eval "$(scw autocomplete script shell=zsh)"
# And use Catppuccin Macchiato theme for ZSH fast hightlight plugin (LOCAL means searching in /usr/local/share/fsh)
fast-theme LOCAL:catppuccin-macchiato >/dev/null
# Preferred editor for local and remote sessions
export EDITOR=vim
export EDITOR=nvim
# Do not print user@hostname if user is myself
DEFAULT_USER=`whoami`
# Aliases
alias cp="cpv"
alias lt='ls -lath'
# To use when .cfg contains a bare git repo.
# See this https://developer.atlassian.com/blog/2016/02/best-way-to-store-dotfiles-git-bare-repo/
alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'
config config --local status.showUntrackedFiles no
# GPG with SSH auth capabilities
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
# Use GPG key for SSH authentication
unset SSH_AGENT_PID
if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then
export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
fi
export GPG_TTY="$(tty)"
# Source aliases
if [ -f ~/.aliases ]; then
. ~/.aliases
fi
# Source environment variables
if [ -f ~/.env ]; then
. ~/.env
fi

View File

@ -1,8 +1,10 @@
# dotfiles
## Generic todo
## Generic TODOs
Would be great to have a real people-agnostic base, separated from my own customization. Right now, base configuration still have personal path and stuff, making it unusable as-is for other people.
* Would be great to have a real people-agnostic base, separated from my own customization. Right now, base configuration still have personal path and stuff, making it unusable as-is for other people.
* Have a command to cancel stuff if case something goes bad, want to restore base system, etc
* Automatically enable systemd units
## What is this, Chosto ?
@ -19,6 +21,7 @@ So basically, what I like about this setup is that there is no "useless" menu ba
In brief this is the classic Arch/i3 combo with :
* A wonderful theming for most of installed software with [Catppuccin Latte](https://github.com/catppuccin/catppuccin):wq
* [Polybar](https://github.com/jaagr/polybar/), a great replacement for i3-bar with easy custom plugins and [system tray](https://specifications.freedesktop.org/systemtray-spec/systemtray-spec-0.3.html)
* A notification daemon (urgency-aware), [Dunst](https://github.com/dunst-project/dunst), controlled by shortcuts (but possibly with mouse)
* [Rofi](https://github.com/DaveDavenport/rofi), a full-customizable app launcher
@ -40,9 +43,10 @@ In brief this is the classic Arch/i3 combo with :
* A working [Arch installation](https://wiki.archlinux.org/title/installation_guide)
* Login with a `sudoer` user
* [yay](https://github.com/Jguer/yay) AUR wrapper
* [yay](https://github.com/Jguer/yay) AUR wrapper (better check your [mirrors](https://wiki.archlinux.org/title/Mirrors) too)
* Python 3 and Pip
* Git
* SSH keys to pull and push from Git repositories
## Installation
@ -50,7 +54,7 @@ Please note : on my system `XDG_CONFIG_HOME` is empty and default to `$HOME/.con
### Clone the repository
* Clone in bare repository : `git clone --bare https://github.com/Chostakovitch/dotfiles.git $HOME/.cfg`. A bare repository does not have a working tree (basically it is just `.git` content). So we avoid conflicts with another git repository.
* Clone in bare repository : `git clone --bare https://git.chosto.me/Chosto/dotfiles.git $HOME/.cfg`. A bare repository does not have a working tree (basically it is just `.git` content). So we avoid conflicts with another git repository.
* Create a working tree outside `.cfg` : `git --git-dir=$HOME/.cfg/ --work-tree=$HOME checkout`.
Credits to [this article](https://developer.atlassian.com/blog/2016/02/best-way-to-store-dotfiles-git-bare-repo/) for the trick.
@ -65,13 +69,13 @@ However, depending on your machine you may want slightly different modules loade
This can be done in `~/.config/polybar/conf.d/<env>` (see [explanation for env](#managing-divergences-between-environments)).
This is optional for now as by default, polybar will use this fallback values :
If you want to test this setup, it will probably work with the `laptop` environnment. You can try these fallback values :
```ini
[variables]
dpi = 90
height = 27
top_left = powermenu system-uptime-pretty
dpi = 110
height = 40
top_left = powermenu system-uptime-pretty player-mpris
top_center = xwindow
top_right = system-usb-udev alsa date
```
@ -119,21 +123,21 @@ This will install all needed software and configuration. If you want to re-use m
In actual setup `env` can be :
* `desk` is currently adjusted for my home setup, i.e. two screens, a keyboard with media keys and [JACK Audio Connection Kit](https://wiki.archlinux.org/title/JACK_Audio_Connection_Kit).
* `laptop` is adjusted for a basic, single and high-DPI screen laptop, with a simple keyboard.
* `laptop` is adjusted for a basic, single 15' screen laptop, with a simple keyboard.
You can now reboot.
### Install Git Hook
You want to add files named `post-merge` **and** `pre-push` in `~/.cfg/hooks` with contains :
You want to add files named `post-merge` **and** `post-commit` in `~/.cfg/hooks` with contains :
```sh
#!/bin/sh
exec WM_RESTART=1 ~/.init_config.sh <env>
exec env WM_RESTART=1 ~/.init_config.sh <env>
```
And then `chmod +x ~/.cfg/hooks/{post-merge,pre-push}`.
And then `chmod +x ~/.cfg/hooks/{post-merge,post-commit}`.
`WM_RESTART` controls whether `i3`, `polybar` and `picom` are restarted.
That way, each time you commit or pull, changes are applied automagically, including configuration deletion detection.
@ -167,6 +171,8 @@ Other times, you have a base configuration for all environment with specific add
In that case, the script will create a `<config_subdir>/config` file, which contains the concatenation of `config_common` and `config.d/<env>`, the later being optional. Filenames and path are hardcoded for now.
If an `above` file is found in `config.d`, the per-environment configuration will be prepended to the base configuration. This is useful for e.g. setting base variables.
### Configuration outside XDG_CONFIG_HOME, e.g. /etc
Some configuration files reside in `/etc` directory, but I want to keep track of them.