Compare commits

..

15 Commits

Author SHA1 Message Date
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
25 changed files with 190 additions and 117 deletions

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,4 +1,7 @@
Xft.dpi: 170
!*dpi is used by i3WM
!See https://i3wm.org/docs/userguide.html#xresources
*dpi: 120
Xft.dpi: 120
Xft.autohint: 0
Xft.lcdfilter: lcddefault
Xft.hintstyle: hintfull

View File

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

View File

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

View File

@ -1,3 +1,4 @@
cadence
alsa-plugins
gddccontrol
hamster-time-tracker

View File

@ -1,8 +1,7 @@
arc-gtk-theme
arc-icon-theme
autojump
cadence
docker
dkms
dunst
feh
firefox
@ -13,12 +12,17 @@ i3-wm
i3lock-color
jq
libusb-compat
less
maim
man-db
man-pages
mlocate
nmap
nemo
neofetch
network-manager-applet
networkmanager
nm-connection-editor
noto-fonts-emoji
numlockx
obsidian
@ -36,7 +40,6 @@ python-pygments
python-pyperclip
python-requests
qbittorrent
redshift
restic
rofi
rsync
@ -46,7 +49,7 @@ terminator
thunderbird
trash-cli
ttf-dejavu
ttf-font-awesome-5
ttf-font-awesome
ttf-material-icons-git
ttf-symbola
ttf-weather-icons
@ -60,7 +63,9 @@ xclip
xdg-user-dirs
xdotool
xorg-server
xorg-xev
xorg-xinit
xorg-xrandr
xsel
yay-bin
zsh

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

View File

@ -61,18 +61,9 @@ bindsym $mod+b exec --no-startup-id ~/.config/i3/scripts/brightness.sh
##################################
# Scratchpad
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
# Adequate sizes for Desktop
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 850e
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,29 +2,32 @@
# STARTING CONFIGURATION
##################################
# ALSA keybinding
# ALSA keybinding (won't work with some keyboards... scroll in polybar in that case)
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 (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
# Luminosity on laptop
bindsym XF86MonBrightnessDown exec --no-startup-id brightnessctl set 10%-
bindsym XF86MonBrightnessUp exec --no-startup-id brightnessctl set +10%
bindsym XF86KbdBrightnessDown exec --no-startup-id brightnessctl -d asus::kbd_backlight set +10%
bindsym XF86KbdBrightnessUp exec --no-startup-id brightnessctl -d asus::kbd_backlight set 10%-
# 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.5
# That one supports tapping but is disabled by default!
exec --no-startup-id xinput set-prop "Asus TouchPad" "libinput Tapping Enabled" 1
##################################
# BINDINGS FOR STARTING PROGRAMS
##################################
@ -35,9 +38,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

@ -42,6 +42,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
@ -206,6 +209,9 @@ bindsym Shift+BackSpace exec dunstctl close
# OPERATIONS FOR SPECIFIC WINDOWS
##################################
# enable window icons for all windows
for_window [all] title_window_icon yes
# some windows will float automatically
for_window [class="(?i)Thunderbird"] floating enable
for_window [window_role="About"] floating enable
@ -218,7 +224,8 @@ 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
@ -226,7 +233,7 @@ 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
# icon in tray, don't need shortcut to bring it back
for_window [instance="qBittorrent"] move scratchpad
for_window [class="qBittorrent"] 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+t [class="Telegram"] scratchpad show, move position center
@ -234,6 +241,14 @@ bindsym Mod4+ampersand [title="(?i)perso.*obsidian"] scratchpad show, move conta
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 [class="thunderbird" 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

View File

View File

@ -1,6 +1,31 @@
[variables]
dpi = 90
height = 27
dpi = 100
height = 30
top_left = powermenu system-uptime-pretty player-mpris
top_center = xwindow
top_right = system-usb-udev alsa date
top_right = system-usb-udev alsa date
bottom_left = i3
bottom_center = wired-network wireless-network updates-arch-combined
bottom_right = temperature cpu memory filesystem-custom
[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

View File

@ -1,6 +1,18 @@
[variables]
dpi = 150
height = 54
dpi = 110
height = 40
top_left = powermenu system-uptime-pretty battery player-mpris
top_center = xwindow
top_right = system-usb-udev backlight pulseaudio date
top_right = system-usb-udev backlight pulseaudio date
bottom_left = i3
bottom_center = wireless-network updates-arch-combined
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 = %{F#fba922}%{F#77dd77} %percentage_used%%
label-warn = %{F#fba922} %percentage_used%%

View File

@ -13,9 +13,9 @@ margin-top=50
; Common to top and bottom bars
[bar/common]
width = 100%
dpi = ${variables.dpi:90}
dpi = ${variables.dpi}
enable-ipc = true
height = ${variables.height:30}
height = ${variables.height}
foreground = ${colors.foreground}
background = ${colors.background}
line-size = 3
@ -42,9 +42,9 @@ padding-right = 10
module-margin-left = 4
module-margin-right = 4
modules-left = ${variables.top_left:powermenu system-uptime-pretty player-mpris}
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
@ -70,9 +70,9 @@ font-2 = Symbola:size=5;1
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
@ -173,28 +173,6 @@ 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
[module/date]
type = internal/date
interval = 1.0
@ -286,6 +264,7 @@ bar-width = 10
bar-indicator = |
bar-fill = ─
bar-empty = ─
enable-scroll = true
[module/pulseaudio]
type = internal/pulseaudio
@ -335,4 +314,4 @@ ramp-volume-2 = 🔊
ramp-headphones-0 = 
ramp-headphones-1 = 
interval = 3
interval = 3

View File

@ -1,2 +1,2 @@
icons=()
parts=(/)
icons=()
parts=(/ /home)

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

@ -10,6 +10,6 @@ XDG_DOWNLOAD_DIR="$HOME/downloads"
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"

View File

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

View File

@ -1 +1,2 @@
8870E499C64EEB7720EBA5A442F4FE90129BFAE3
8870E499C64EEB7720EBA5A442F4FE90129BFAE3

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"
@ -49,6 +51,7 @@ function check_copy() {
# a common base for multiple computer, and per-computer stuff.
# $1 : path of the folder
# $2 : optional 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}
@ -58,8 +61,17 @@ function merge_config() {
# 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}
final_path=${CONFIG}/${m}/${FINAL_CONFIG}
if [ -z $3 ]; then
echo "Found ${f}, append to regular config file"
cat "${f}" >> ${final_path}
else
echo "Found ${f}, prepend to regular config file"
cat ${f} > /tmp/config
echo -e '\n' >> /tmp/config
cat ${final_path} >> /tmp/config
mv /tmp/config ${final_path}
fi
done
fi
}
@ -75,30 +87,45 @@ 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)"
for m in ${MERGE_DIRS}; do
merge_config $m ${ENV}
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)
sudo chsh -s $(which zsh)
# 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 NetworkManager..."
echo -e "* Enabling required systemd units..."
sudo systemctl enable --now NetworkManager
# So that "Open in Terminal" works in Nemo
sudo systemctl enable --now systemd-timesyncd
# iwd will be used as a backend for NetworkManager
sudo systemctl disable wpa_supplicant
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..."
gsettings set org.cinnamon.desktop.default-applications.terminal exec i3-sensible-terminal
# For screenshots
pip install pychee
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/zsh-users/zsh-syntax-highlighting.git /usr/share/oh-my-zsh/plugins/zsh-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
# 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
fi
if [ ! -z ${ENV} ]; then
@ -123,11 +150,20 @@ 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 posix-extended -mindepth 1 \( -type f -o -type l \) -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 --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}
# ##* strips the base path, so we manipulate absolute paths by concatening with $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

14
.zshrc
View File

@ -33,8 +33,6 @@ autoload -U compinit && compinit -u
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
@ -81,8 +79,16 @@ alias lt='ls -lath'
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)
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)
gpg-connect-agent updatestartuptty /bye >/dev/null
export KEYGRIP=8870E499C64EEB7720EBA5A442F4FE90129BFAE3
# Sometimes gpg has a bug and needs to re-import key
alias gbye='gpg-connect-agent "delete_key $KEYGRIP" /bye'
if [ -f ~/.aliases ]; then
. ~/.aliases

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 ?
@ -24,7 +26,6 @@ In brief this is the classic Arch/i3 combo with :
* [Rofi](https://github.com/DaveDavenport/rofi), a full-customizable app launcher
* Automatic login (drives are encrypted)
* Automatic backups
* Blue light reducer at night
* A fancy lock screen, with optional hibernation, either triggered by hotkey or when there is no activity for X minutes
* ZSH with Oh My ZSH
* Mappings to control ALSA volume from dedicated keyboards buttons, to play/plause players compatible with MPRIS D-Bus Interface spec
@ -41,7 +42,7 @@ 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
@ -51,7 +52,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.
@ -66,12 +67,12 @@ 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
dpi = 110
height = 40
top_left = powermenu system-uptime-pretty player-mpris
top_center = xwindow
top_right = system-usb-udev alsa date
@ -120,7 +121,7 @@ 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.
@ -168,6 +169,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.