Compare commits
15 Commits
d072f133ad
...
25c08c9a30
Author | SHA1 | Date |
---|---|---|
Quentin Duchemin | 25c08c9a30 | |
Quentin Duchemin | f302bd746a | |
Quentin Duchemin | 0d52fcdf20 | |
Quentin Duchemin | 5a3d510ad1 | |
Quentin Duchemin | 8c47567f9b | |
Quentin Duchemin | 5a3a34be55 | |
Quentin Duchemin | 89b177ffba | |
Quentin Duchemin | 980243881c | |
Quentin Duchemin | f699973555 | |
Quentin Duchemin | 50a47a6b76 | |
Quentin Duchemin | aa86cda075 | |
Quentin Duchemin | 5f304686f7 | |
Quentin Duchemin | ea22f2a027 | |
Quentin Duchemin | fcb5f5aa9d | |
Quentin Duchemin | 92bff24fab |
|
@ -1,7 +0,0 @@
|
||||||
Xft.autohint: 0
|
|
||||||
Xft.lcdfilter: lcddefault
|
|
||||||
Xft.hintstyle: hintfull
|
|
||||||
Xft.hinting: 1
|
|
||||||
Xft.antialias: 1
|
|
||||||
Xft.rgba: rgb
|
|
||||||
|
|
|
@ -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.autohint: 0
|
||||||
Xft.lcdfilter: lcddefault
|
Xft.lcdfilter: lcddefault
|
||||||
Xft.hintstyle: hintfull
|
Xft.hintstyle: hintfull
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
/etc/NetworkManager/conf.d
|
|
@ -0,0 +1,2 @@
|
||||||
|
[device]
|
||||||
|
wifi.backend=iwd
|
|
@ -1,3 +1,4 @@
|
||||||
|
cadence
|
||||||
alsa-plugins
|
alsa-plugins
|
||||||
gddccontrol
|
gddccontrol
|
||||||
hamster-time-tracker
|
hamster-time-tracker
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
arc-gtk-theme
|
arc-gtk-theme
|
||||||
arc-icon-theme
|
arc-icon-theme
|
||||||
autojump
|
|
||||||
cadence
|
|
||||||
docker
|
docker
|
||||||
|
dkms
|
||||||
dunst
|
dunst
|
||||||
feh
|
feh
|
||||||
firefox
|
firefox
|
||||||
|
@ -13,12 +12,17 @@ i3-wm
|
||||||
i3lock-color
|
i3lock-color
|
||||||
jq
|
jq
|
||||||
libusb-compat
|
libusb-compat
|
||||||
|
less
|
||||||
maim
|
maim
|
||||||
|
man-db
|
||||||
|
man-pages
|
||||||
mlocate
|
mlocate
|
||||||
|
nmap
|
||||||
nemo
|
nemo
|
||||||
neofetch
|
neofetch
|
||||||
network-manager-applet
|
network-manager-applet
|
||||||
networkmanager
|
networkmanager
|
||||||
|
nm-connection-editor
|
||||||
noto-fonts-emoji
|
noto-fonts-emoji
|
||||||
numlockx
|
numlockx
|
||||||
obsidian
|
obsidian
|
||||||
|
@ -36,7 +40,6 @@ python-pygments
|
||||||
python-pyperclip
|
python-pyperclip
|
||||||
python-requests
|
python-requests
|
||||||
qbittorrent
|
qbittorrent
|
||||||
redshift
|
|
||||||
restic
|
restic
|
||||||
rofi
|
rofi
|
||||||
rsync
|
rsync
|
||||||
|
@ -46,7 +49,7 @@ terminator
|
||||||
thunderbird
|
thunderbird
|
||||||
trash-cli
|
trash-cli
|
||||||
ttf-dejavu
|
ttf-dejavu
|
||||||
ttf-font-awesome-5
|
ttf-font-awesome
|
||||||
ttf-material-icons-git
|
ttf-material-icons-git
|
||||||
ttf-symbola
|
ttf-symbola
|
||||||
ttf-weather-icons
|
ttf-weather-icons
|
||||||
|
@ -60,7 +63,9 @@ xclip
|
||||||
xdg-user-dirs
|
xdg-user-dirs
|
||||||
xdotool
|
xdotool
|
||||||
xorg-server
|
xorg-server
|
||||||
|
xorg-xev
|
||||||
xorg-xinit
|
xorg-xinit
|
||||||
|
xorg-xrandr
|
||||||
xsel
|
xsel
|
||||||
yay-bin
|
yay-bin
|
||||||
zsh
|
zsh
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
|
|
||||||
width = (0, 400)
|
width = (0, 400)
|
||||||
height = 100
|
height = 100
|
||||||
offset = 15x15
|
offset = 30x40
|
||||||
|
|
||||||
# Show how many messages are currently hidden (because of geometry).
|
# Show how many messages are currently hidden (because of geometry).
|
||||||
indicate_hidden = true
|
indicate_hidden = true
|
||||||
|
|
|
@ -61,18 +61,9 @@ bindsym $mod+b exec --no-startup-id ~/.config/i3/scripts/brightness.sh
|
||||||
##################################
|
##################################
|
||||||
|
|
||||||
# Scratchpad
|
# Scratchpad
|
||||||
for_window [class="Hamster" window_type="normal"] floating enable, move scratchpad
|
|
||||||
for_window [class="Non-Mixer"] mark "mixer", move scratchpad
|
for_window [class="Non-Mixer"] mark "mixer", move scratchpad
|
||||||
for_window [class="Catia*"] mark "jack", 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+j [con_mark="jack"] scratchpad show, move position center
|
||||||
bindsym $mod+Shift+v [con_mark="mixer"] 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
|
for_window [class="Pianoteq STAGE"] floating enable, move position center
|
||||||
|
|
||||||
assign [class="Pianoteq STAGE"] → number 6
|
assign [class="Pianoteq STAGE"] → number 6
|
||||||
|
|
|
@ -2,29 +2,32 @@
|
||||||
# STARTING CONFIGURATION
|
# 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 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 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
|
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)
|
# Luminosity on laptop
|
||||||
bindsym XF86MonBrightnessDown exec --no-startup-id xbacklight -dec 10 -steps 200
|
bindsym XF86MonBrightnessDown exec --no-startup-id brightnessctl set 10%-
|
||||||
bindsym XF86MonBrightnessUp exec --no-startup-id xbacklight -inc 10 -steps 200
|
bindsym XF86MonBrightnessUp exec --no-startup-id brightnessctl set +10%
|
||||||
bindsym XF86KbdBrightnessDown exec --no-startup-id xbacklight -ctrl asus::kbd_backlight -dec 30
|
bindsym XF86KbdBrightnessDown exec --no-startup-id brightnessctl -d asus::kbd_backlight set +10%
|
||||||
bindsym XF86KbdBrightnessUp exec --no-startup-id xbacklight -ctrl asus::kbd_backlight -inc 30
|
bindsym XF86KbdBrightnessUp exec --no-startup-id brightnessctl -d asus::kbd_backlight set 10%-
|
||||||
|
|
||||||
|
# Get chosen DPI from Xresources, default 120
|
||||||
# set DPI along with .Xresources
|
set_from_resource $dpi i3wm.dpi 120
|
||||||
exec xrandr --dpi 160
|
# Only dunst seems to care about this setting
|
||||||
|
exec xrandr --dpi $dpi
|
||||||
|
|
||||||
##################################
|
##################################
|
||||||
# PROGRAMS STARTED AUTOMATICALLY
|
# 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 '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 '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
|
# 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
|
# 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
|
|
|
@ -42,6 +42,9 @@ smart_gaps on
|
||||||
# PROGRAMS STARTED AUTOMATICALLY
|
# PROGRAMS STARTED AUTOMATICALLY
|
||||||
##################################
|
##################################
|
||||||
|
|
||||||
|
# Load Xresources
|
||||||
|
exec --no-startup-id xrdb -merge ~/.Xresources
|
||||||
|
|
||||||
# Start compositor
|
# Start compositor
|
||||||
exec --no-startup-id picom --config ~/.config/picom.conf
|
exec --no-startup-id picom --config ~/.config/picom.conf
|
||||||
|
|
||||||
|
@ -206,6 +209,9 @@ bindsym Shift+BackSpace exec dunstctl close
|
||||||
# OPERATIONS FOR SPECIFIC WINDOWS
|
# OPERATIONS FOR SPECIFIC WINDOWS
|
||||||
##################################
|
##################################
|
||||||
|
|
||||||
|
# enable window icons for all windows
|
||||||
|
for_window [all] title_window_icon yes
|
||||||
|
|
||||||
# some windows will float automatically
|
# some windows will float automatically
|
||||||
for_window [class="(?i)Thunderbird"] floating enable
|
for_window [class="(?i)Thunderbird"] floating enable
|
||||||
for_window [window_role="About"] 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 [class="(?i)Thunderbird"] move position center
|
||||||
for_window [window_role="GtkFileChooserDialog"] move position center
|
for_window [window_role="GtkFileChooserDialog"] move position center
|
||||||
# scratchpad
|
|
||||||
|
# === Scratchpad ===
|
||||||
# Make the currently focused window a scratchpad
|
# Make the currently focused window a scratchpad
|
||||||
bindsym $mod+Shift+BackSpace move scratchpad
|
bindsym $mod+Shift+BackSpace move scratchpad
|
||||||
for_window [class="Signal" window_type="normal"] 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
|
# 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="Mail"] move scratchpad
|
||||||
# icon in tray, don't need shortcut to bring it back
|
# 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+m [instance="Mail"] scratchpad show, move position center
|
||||||
bindsym $mod+Shift+s [class="Signal"] 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
|
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+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
|
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
|
# automatic workspace
|
||||||
assign [class="(?i)Obsidian"] → number 4
|
assign [class="(?i)Obsidian"] → number 4
|
||||||
assign [class="(?i)Tor Browser"] → number 5
|
assign [class="(?i)Tor Browser"] → number 5
|
||||||
|
|
|
@ -1,6 +1,31 @@
|
||||||
[variables]
|
[variables]
|
||||||
dpi = 90
|
dpi = 100
|
||||||
height = 27
|
height = 30
|
||||||
top_left = powermenu system-uptime-pretty player-mpris
|
top_left = powermenu system-uptime-pretty player-mpris
|
||||||
top_center = xwindow
|
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
|
|
@ -1,6 +1,18 @@
|
||||||
[variables]
|
[variables]
|
||||||
dpi = 150
|
dpi = 110
|
||||||
height = 54
|
height = 40
|
||||||
top_left = powermenu system-uptime-pretty battery player-mpris
|
top_left = powermenu system-uptime-pretty battery player-mpris
|
||||||
top_center = xwindow
|
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%%
|
|
@ -13,9 +13,9 @@ margin-top=50
|
||||||
; Common to top and bottom bars
|
; Common to top and bottom bars
|
||||||
[bar/common]
|
[bar/common]
|
||||||
width = 100%
|
width = 100%
|
||||||
dpi = ${variables.dpi:90}
|
dpi = ${variables.dpi}
|
||||||
enable-ipc = true
|
enable-ipc = true
|
||||||
height = ${variables.height:30}
|
height = ${variables.height}
|
||||||
foreground = ${colors.foreground}
|
foreground = ${colors.foreground}
|
||||||
background = ${colors.background}
|
background = ${colors.background}
|
||||||
line-size = 3
|
line-size = 3
|
||||||
|
@ -42,9 +42,9 @@ padding-right = 10
|
||||||
module-margin-left = 4
|
module-margin-left = 4
|
||||||
module-margin-right = 4
|
module-margin-right = 4
|
||||||
|
|
||||||
modules-left = ${variables.top_left:powermenu system-uptime-pretty player-mpris}
|
modules-left = ${variables.top_left}
|
||||||
modules-center = ${variables.top_center:xwindow}
|
modules-center = ${variables.top_center}
|
||||||
modules-right = ${variables.top_right:system-usb-udev alsa date}
|
modules-right = ${variables.top_right}
|
||||||
|
|
||||||
tray-position = right
|
tray-position = right
|
||||||
|
|
||||||
|
@ -70,9 +70,9 @@ font-2 = Symbola:size=5;1
|
||||||
font-3 = MaterialIcons-Regular:size=11;4
|
font-3 = MaterialIcons-Regular:size=11;4
|
||||||
font-4 = Font Awesome 5 Free:style=solid:size=10;2
|
font-4 = Font Awesome 5 Free:style=solid:size=10;2
|
||||||
|
|
||||||
modules-left = i3
|
modules-left = ${variables.bottom_left}
|
||||||
;modules-center =
|
modules-center = ${variables.bottom_center}
|
||||||
modules-right = wired-network wireless-network updates-arch-combined temperature cpu memory filesystem-custom
|
modules-right = ${variables.bottom_right}
|
||||||
|
|
||||||
[module/player-mpris]
|
[module/player-mpris]
|
||||||
type = custom/script
|
type = custom/script
|
||||||
|
@ -173,28 +173,6 @@ ramp-coreload-7 = █
|
||||||
ramp-coreload-7-font = 3
|
ramp-coreload-7-font = 3
|
||||||
ramp-coreload-7-foreground = #ff5555
|
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]
|
[module/date]
|
||||||
type = internal/date
|
type = internal/date
|
||||||
interval = 1.0
|
interval = 1.0
|
||||||
|
@ -286,6 +264,7 @@ bar-width = 10
|
||||||
bar-indicator = |
|
bar-indicator = |
|
||||||
bar-fill = ─
|
bar-fill = ─
|
||||||
bar-empty = ─
|
bar-empty = ─
|
||||||
|
enable-scroll = true
|
||||||
|
|
||||||
[module/pulseaudio]
|
[module/pulseaudio]
|
||||||
type = internal/pulseaudio
|
type = internal/pulseaudio
|
||||||
|
@ -335,4 +314,4 @@ ramp-volume-2 = 🔊
|
||||||
ramp-headphones-0 =
|
ramp-headphones-0 =
|
||||||
ramp-headphones-1 =
|
ramp-headphones-1 =
|
||||||
|
|
||||||
interval = 3
|
interval = 3
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
icons=()
|
icons=( )
|
||||||
parts=(/)
|
parts=(/ /home)
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
ACTION=="add", SUBSYSTEM=="backlight", RUN+="/bin/chgrp video $sys$devpath/brightness", RUN+="/bin/chmod g+w $sys$devpath/brightness"
|
|
@ -0,0 +1 @@
|
||||||
|
/etc/udev/rules.d
|
|
@ -1 +0,0 @@
|
||||||
/etc/systemd/system/updatedb.timer.d/
|
|
|
@ -10,6 +10,6 @@ XDG_DOWNLOAD_DIR="$HOME/downloads"
|
||||||
XDG_TEMPLATES_DIR="$HOME/"
|
XDG_TEMPLATES_DIR="$HOME/"
|
||||||
XDG_PUBLICSHARE_DIR="$HOME/"
|
XDG_PUBLICSHARE_DIR="$HOME/"
|
||||||
XDG_DOCUMENTS_DIR="$HOME/documents"
|
XDG_DOCUMENTS_DIR="$HOME/documents"
|
||||||
XDG_MUSIC_DIR="$HOME/music"
|
XDG_MUSIC_DIR="$HOME/"
|
||||||
XDG_PICTURES_DIR="$HOME/images"
|
XDG_PICTURES_DIR="$HOME/images"
|
||||||
XDG_VIDEOS_DIR="$HOME/videos"
|
XDG_VIDEOS_DIR="$HOME/videos"
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
enable-ssh-support
|
enable-ssh-support
|
||||||
default-cache-ttl 3600
|
default-cache-ttl 3600
|
||||||
max-cache-ttl 7200
|
max-cache-ttl 7200
|
||||||
|
pinentry-program /usr/bin/pinentry-curses
|
||||||
|
|
|
@ -1 +1,2 @@
|
||||||
8870E499C64EEB7720EBA5A442F4FE90129BFAE3
|
8870E499C64EEB7720EBA5A442F4FE90129BFAE3
|
||||||
|
|
||||||
|
|
|
@ -19,8 +19,10 @@ POLYBAR_CONFIG="polybar"
|
||||||
ARCH_PACKAGES="bootstrap"
|
ARCH_PACKAGES="bootstrap"
|
||||||
MERGE_DIRS="${I3_CONFIG} ${POLYBAR_CONFIG} ${ARCH_PACKAGES}"
|
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
|
# 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
|
# $2 : command to launch if file has been created of modifed
|
||||||
# $3 : command to launch if file has been deleted
|
# $3 : command to launch if file has been deleted
|
||||||
function check_copy() {
|
function check_copy() {
|
||||||
|
@ -29,15 +31,15 @@ function check_copy() {
|
||||||
echo -e "* Running \"$2\"" && eval "$2"
|
echo -e "* Running \"$2\"" && eval "$2"
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
echo "$changed_files" | grep --quiet "${1#$HOME/}"
|
changed_file=`grep "${1#$HOME/}" <<< "${changed_files}"`
|
||||||
if [ $? == "0" ]; then
|
if [ ! -z "${changed_file}" ]; then
|
||||||
echo "$changed_files" | cut -f 1 | grep --quiet "D"
|
if echo "$changed_file" | grep -q -E "^D"; then
|
||||||
if [ $? == "0" ]; then
|
|
||||||
echo "* $1 has been removed"
|
echo "* $1 has been removed"
|
||||||
echo -e "\t* Running \"$3\"" && eval "$3"
|
echo -e "\t* Running \"$3\"" && eval "$3"
|
||||||
else
|
fi
|
||||||
echo "* Changes detected in $1"
|
if echo "$changed_file" | grep -q -E "^(A|M)"; then
|
||||||
echo -e "* Running \"$2\"" && eval "$2"
|
echo "* Changes detected in $(basename $1)"
|
||||||
|
echo -e "\t* Running \"$2\"" && eval "$2"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "$1 not modified, no need to copy"
|
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.
|
# a common base for multiple computer, and per-computer stuff.
|
||||||
# $1 : path of the folder
|
# $1 : path of the folder
|
||||||
# $2 : optional current environment
|
# $2 : optional current environment
|
||||||
|
# $3 : if defined, prepend $2 instead of appending
|
||||||
function merge_config() {
|
function merge_config() {
|
||||||
echo -e "\n=== Generate ${m} config file ==="
|
echo -e "\n=== Generate ${m} config file ==="
|
||||||
rm -f ${CONFIG}/${m}/${FINAL_CONFIG}
|
rm -f ${CONFIG}/${m}/${FINAL_CONFIG}
|
||||||
|
@ -58,8 +61,17 @@ function merge_config() {
|
||||||
# If there is an override folder, merge given env
|
# If there is an override folder, merge given env
|
||||||
if [ ! -z ${2} ] && [ -d ${CONFIG}/${m}/${MERGE_CONFIG_FOLDER} ]; then
|
if [ ! -z ${2} ] && [ -d ${CONFIG}/${m}/${MERGE_CONFIG_FOLDER} ]; then
|
||||||
for f in `find ${CONFIG}/${m}/config.d -type f -path "*${2}"`; do
|
for f in `find ${CONFIG}/${m}/config.d -type f -path "*${2}"`; do
|
||||||
echo "Found ${f}, add to regular config file"
|
final_path=${CONFIG}/${m}/${FINAL_CONFIG}
|
||||||
cat "${f}" >> ${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
|
done
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -75,30 +87,45 @@ CONFIG=${XDG_CONFIG_HOME:-$HOME/.config}
|
||||||
|
|
||||||
ENV=${1}
|
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
|
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
|
done
|
||||||
|
|
||||||
if [ ! -z "$INIT" ]; then
|
if [ ! -z "$INIT" ]; then
|
||||||
echo -e "* Installing base Arch packages..."
|
echo -e "* Installing base Arch packages..."
|
||||||
yay -Syu --needed --noconfirm - < ${CONFIG}/${ARCH_PACKAGES}/${FINAL_CONFIG}
|
yay -Syu --needed --noconfirm - < ${CONFIG}/${ARCH_PACKAGES}/${FINAL_CONFIG}
|
||||||
echo -e "* Changing shell to ZSH..."
|
echo -e "* Changing shell to ZSH..."
|
||||||
chsh -s $(which zsh)
|
sudo chsh -s $(which zsh)
|
||||||
# https://man.archlinux.org/man/rofi-dmenu.5
|
# https://man.archlinux.org/man/rofi-dmenu.5
|
||||||
echo -e "* Symlink dmenu → rofi..."
|
echo -e "* Symlink dmenu → rofi..."
|
||||||
sudo ln -sf /usr/bin/rofi /usr/bin/dmenu
|
sudo ln -sf /usr/bin/rofi /usr/bin/dmenu
|
||||||
echo -e "* Enabling NetworkManager..."
|
echo -e "* Enabling required systemd units..."
|
||||||
sudo systemctl enable --now NetworkManager
|
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
|
gsettings set org.cinnamon.desktop.default-applications.terminal exec i3-sensible-terminal
|
||||||
# For screenshots
|
# For screenshots
|
||||||
pip install pychee
|
echo -e "* Install pychee for uploading screenshots on Lychee..."
|
||||||
|
pip install --break-system-packages pychee
|
||||||
# Additionnal plugins for ZSH
|
# 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-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/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
|
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
|
fi
|
||||||
|
|
||||||
if [ ! -z ${ENV} ]; then
|
if [ ! -z ${ENV} ]; then
|
||||||
|
@ -123,11 +150,20 @@ for f in `find ${CONFIG} -type f -name ${DEST_FILENAME}`; do
|
||||||
DEST=`cat ${f}`
|
DEST=`cat ${f}`
|
||||||
# Get all files, either regular files or symlinks, which are not the destination file nor specific desktop/laptop files
|
# 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
|
# 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
|
# Now copy to destination
|
||||||
sudo mkdir -p ${DEST}
|
real_dest=${DEST}/${subfolder}
|
||||||
# ##* strips the base path, so we manipulate absolute paths by concatening with $DEST
|
sudo mkdir -p ${real_dest}
|
||||||
check_copy "${config_file}" "sudo cp ${config_file} ${DEST}" "sudo rm ${DEST}/${config_file##*/}"
|
absolute_source=`realpath "${DIR}/${config_file}"`
|
||||||
|
check_copy "${absolute_source}" "sudo cp ${absolute_source} ${real_dest}" "sudo rm ${real_dest}/${filename}"
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
14
.zshrc
14
.zshrc
|
@ -33,8 +33,6 @@ autoload -U compinit && compinit -u
|
||||||
plugins=(
|
plugins=(
|
||||||
# acs command → print aliases by group
|
# acs command → print aliases by group
|
||||||
aliases
|
aliases
|
||||||
# `j` to go to an already used directory by partial name
|
|
||||||
autojump
|
|
||||||
colored-man-pages
|
colored-man-pages
|
||||||
# cat with colors → ccat or cless
|
# cat with colors → ccat or cless
|
||||||
colorize
|
colorize
|
||||||
|
@ -81,8 +79,16 @@ alias lt='ls -lath'
|
||||||
alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'
|
alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'
|
||||||
config config --local status.showUntrackedFiles no
|
config config --local status.showUntrackedFiles no
|
||||||
|
|
||||||
# GPG with SSH auth capabilities
|
unset SSH_AGENT_PID
|
||||||
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
|
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
|
if [ -f ~/.aliases ]; then
|
||||||
. ~/.aliases
|
. ~/.aliases
|
||||||
|
|
21
README.md
21
README.md
|
@ -1,8 +1,10 @@
|
||||||
# dotfiles
|
# 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 ?
|
## 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
|
* [Rofi](https://github.com/DaveDavenport/rofi), a full-customizable app launcher
|
||||||
* Automatic login (drives are encrypted)
|
* Automatic login (drives are encrypted)
|
||||||
* Automatic backups
|
* 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
|
* 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
|
* 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
|
* 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)
|
* A working [Arch installation](https://wiki.archlinux.org/title/installation_guide)
|
||||||
* Login with a `sudoer` user
|
* 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
|
* Python 3 and Pip
|
||||||
* Git
|
* Git
|
||||||
|
|
||||||
|
@ -51,7 +52,7 @@ Please note : on my system `XDG_CONFIG_HOME` is empty and default to `$HOME/.con
|
||||||
|
|
||||||
### Clone the repository
|
### 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`.
|
* 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.
|
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 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
|
```ini
|
||||||
[variables]
|
[variables]
|
||||||
dpi = 90
|
dpi = 110
|
||||||
height = 27
|
height = 40
|
||||||
top_left = powermenu system-uptime-pretty player-mpris
|
top_left = powermenu system-uptime-pretty player-mpris
|
||||||
top_center = xwindow
|
top_center = xwindow
|
||||||
top_right = system-usb-udev alsa date
|
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 :
|
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).
|
* `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.
|
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.
|
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
|
### Configuration outside XDG_CONFIG_HOME, e.g. /etc
|
||||||
|
|
||||||
Some configuration files reside in `/etc` directory, but I want to keep track of them.
|
Some configuration files reside in `/etc` directory, but I want to keep track of them.
|
||||||
|
|
Loading…
Reference in New Issue