From 70fd4983a21adc5cf0bf653edd725440d067f9b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodolphe=20Br=C3=A9ard?= Date: Sat, 4 Jan 2025 10:20:59 +0100 Subject: [PATCH 1/3] Remove unused vim plugins --- .vimrc | 9 --------- 1 file changed, 9 deletions(-) diff --git a/.vimrc b/.vimrc index d4dcbe0..b1d88e4 100644 --- a/.vimrc +++ b/.vimrc @@ -6,12 +6,9 @@ filetype off call plug#begin('~/.vim/plugged') Plug 'bling/vim-airline' " Lean & mean status/tabline for vim that's light as air. -Plug 'antoyo/vim-licenses' " Vim Plugin that Provides Commands to Add Licenses at the Top of the Buffer. Plug 'sjl/badwolf' " A Vim color scheme. Plug 'rust-lang/rust.vim' " Vim configuration for Rust. Plug 'cespare/vim-toml' " Vim syntax for TOML. -Plug 'editorconfig/editorconfig-vim' " EditorConfig plugin -Plug 'Yggdroot/indentLine' " Display thin vertical lines at each indentation level Plug 'leafOfTree/vim-vue-plugin' " Vim syntax and indent plugin for .vue files. Plug 'leafOfTree/vim-svelte-plugin' " Vim syntax and indent plugin for .svelte files. call plug#end() @@ -53,12 +50,6 @@ nnoremap k gk let &t_ut='' -" Licenses -let g:licenses_copyright_holders_name = $USER_NICKNAME -let g:licenses_authors_name = $USER_NICKNAME -let g:licenses_default_commands = ['affero', 'apache', 'bsd3', 'cecill', 'gfdl', 'gpl', 'gplv2', 'isc', 'lgpl', 'mit', 'mpl', 'verbatim'] - - " Line number modes :set number relativenumber :augroup numbertoggle From 4e8dd3ad5185520d083d5016383812087d54cfa2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodolphe=20Br=C3=A9ard?= Date: Sat, 4 Jan 2025 10:46:55 +0100 Subject: [PATCH 2/3] Update the README --- README.md | 42 ++++++++++++++++++++++++++++++++---------- 1 file changed, 32 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 4267d1c..a408c1a 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,8 @@ This is just a bunch of dotfiles. ## ArchLinux packages +Installing packages: + ``` sh # Base utils pacman -S bat duf eza htop inetutils jq kitty-terminfo neovim openssh tmux transmission-cli tree wget whois zellij zsh zsh-syntax-highlighting @@ -41,6 +43,20 @@ pacman -S pacman-contrib namcap pacman -S ccid libnfc mfoc opensc pcsc-tools pcsclite ``` +### Arch User Repository + +Installing yay: + +``` sh +mkdir -p "$HOME/projects/builds" +git clone "https://aur.archlinux.org/yay.git" "$HOME/projects/builds/yay" +cd "$HOME/projects/builds/yay" +makepkg +pacman -U "yay--x86_64.pkg.tar.zst" +``` + +Installing packages: + ``` sh # Base utils yay -S liquidprompt vim-plug @@ -50,18 +66,22 @@ yay -S brother-dcp1610w brscan-skey brscan4 yay -S cardpeek ``` -## vim +## vim / neovim Plugins are managed by `vim-plug`, which is installed from the AUR. ``` sh -vim +PlugInstall +vim +PlugInstall # install all plugins +vim +PlugUpdate # install or update all plugins +vim +PlugClean # remove plugins no longer in the list ``` -## wallpaper +## Wallpaper -The wallpaper is randomly set from images (png, jpg and jpeg) from `~/pictures/wallpapers/enabled/`. You should populate this directory with symbolic links pointing to images stored in `~/pictures/wallpapers/`. +The wallpaper is randomly set from images (png, jpg and jpeg) from +`~/pictures/wallpapers/enabled/`. You should populate this directory with +symbolic links pointing to images stored in `~/pictures/wallpapers/`. ## /etc/locale.conf @@ -79,7 +99,8 @@ EOF ## rtkit-daemon -Par défaut, [rtkit-daemon][rtkit] a tendance à inonder les journaux systèmes de notifications peu intéressantes : +By default, [rtkit-daemon][rtkit] tends to flood the system logs with not very +useful notifications: ``` déc. 31 14:16:56 lpt-01 rtkit-daemon[1347]: Supervising 12 threads of 9 processes of 1 users. @@ -88,7 +109,7 @@ déc. 31 14:17:00 lpt-01 rtkit-daemon[1347]: Supervising 12 threads of 9 process déc. 31 14:17:00 lpt-01 rtkit-daemon[1347]: Supervising 12 threads of 9 processes of 1 users. ``` -La solution est de lui fixer un niveau de journalisation plus adapté : +This can be fixed by setting a higher log level: ``` sudo mkdir "/etc/systemd/system/rtkit-daemon.service.d" @@ -97,13 +118,14 @@ sudo systemctl daemon-reload sudo systemctl restart rtkit-daemon.service ``` -Ainsi, `journalctl -f` n'est plus surchargé. - [rtkit]: https://archlinux.org/packages/extra/x86_64/rtkit/ ## NetworkManager -Pour désactiver le WiFi lorsqu'une liaison filaire est disponible, regarder l'exemple 15 du `man 7 nmcli-examples`. +To deactivate WiFi when a wired connection is up, have a look at example 15 +from `man 7 nmcli-examples`. -TL; DR: copier/coller un script dans `/etc/NetworkManager/dispatcher.d/70-wifi-wired-exclusive.sh` et rendre ce fichier exécutable. +TL; DR: copy and paste a script in +`/etc/NetworkManager/dispatcher.d/70-wifi-wired-exclusive.sh` and set it +executable. From 07a91ea1364b3eb90b977aa903addc9b3750887d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodolphe=20Br=C3=A9ard?= Date: Sat, 4 Jan 2025 11:31:43 +0100 Subject: [PATCH 3/3] Improve the wallpaper script --- .config/hypr/hyprland.conf | 2 +- bin/set_wallpaper | 20 +++++++++++++++++--- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/.config/hypr/hyprland.conf b/.config/hypr/hyprland.conf index 8cd5583..e68627e 100644 --- a/.config/hypr/hyprland.conf +++ b/.config/hypr/hyprland.conf @@ -43,7 +43,7 @@ $lock = swaylock --color=000000 --daemonize # exec-once = $terminal # exec-once = nm-applet & # exec-once = waybar & hyprpaper & firefox -exec-once = ~/.local/bin/set_wallpaper && hyprpaper +exec-once = ~/.local/bin/set_wallpaper exec-once = waybar diff --git a/bin/set_wallpaper b/bin/set_wallpaper index eeb509f..014518d 100755 --- a/bin/set_wallpaper +++ b/bin/set_wallpaper @@ -3,11 +3,22 @@ set -euo pipefail IFS=$'\n\t' -WALLPAPER_DIRECTORY="$HOME/pictures/wallpapers/enabled" HYPRPAPER_CNF="$HOME/.config/hypr/hyprpaper.conf" +WALLPAPER_DIR="$HOME/pictures/wallpapers/enabled" +WALLPAPER_DIR_WINTER="$WALLPAPER_DIR/winter" -if [ -d "$WALLPAPER_DIRECTORY" ]; then - WALLPAPER_FILE="$(find "$WALLPAPER_DIRECTORY" -type l -print | shuf | head -n 1)" +# Set the wallpaper directory based on the current month +case "$(date '+%m')" in + "01"|"02"|"11"|"12") + if [ -d "$WALLPAPER_DIR_WINTER" ]; then + WALLPAPER_DIR="$WALLPAPER_DIR_WINTER" + fi + ;; +esac + +# Generate the configuration +if [ -d "$WALLPAPER_DIR" ]; then + WALLPAPER_FILE="$(find "$WALLPAPER_DIR" -maxdepth 1 -type f -print | shuf | head -n 1)" if [ -L "$WALLPAPER_FILE" ]; then WALLPAPER_FILE="$(readlink -f "$WALLPAPER_FILE")" fi @@ -17,3 +28,6 @@ wallpaper = ,$WALLPAPER_FILE splash = false EOF fi + +# Set the wallpaper +hyprpaper