Compare commits
143 Commits
34d5596a67
...
master
Author | SHA1 | Date |
---|---|---|
Quentin Duchemin | ba435ec22f | |
Quentin Duchemin | 37b65269e1 | |
Quentin Duchemin | e7b4cf3ca3 | |
Quentin Duchemin | 6c50581b2a | |
Quentin Duchemin | 6abae7cb8f | |
Quentin Duchemin | c38e3a10b9 | |
Quentin Duchemin | 2213088b43 | |
Quentin Duchemin | 68331b2414 | |
Quentin Duchemin | bb1ad9c04c | |
Quentin Duchemin | 321dce81b8 | |
Quentin Duchemin | 2bf7769933 | |
Quentin Duchemin | 0c15cbcdaf | |
Quentin Duchemin | 9e8af1ef59 | |
Quentin Duchemin | 223d8c3729 | |
Quentin Duchemin | 6e7c9b0d70 | |
Quentin Duchemin | 77c077c9ae | |
Quentin Duchemin | b1424f7850 | |
Quentin Duchemin | 37d50f5984 | |
Quentin Duchemin | 345606b800 | |
Quentin Duchemin | b1e3ea44f8 | |
Quentin Duchemin | 730948ff31 | |
Quentin Duchemin | 645b1d973a | |
Quentin Duchemin | c2a131e9ec | |
Quentin Duchemin | c5d6db9980 | |
Quentin Duchemin | 3e020fe73f | |
Quentin Duchemin | 942256006a | |
Quentin Duchemin | 6cda4992bc | |
Quentin Duchemin | f488005eed | |
Quentin Duchemin | 391df582a5 | |
Quentin Duchemin | 81d0d523b7 | |
Quentin Duchemin | f126572738 | |
Quentin Duchemin | 9194648e9a | |
Quentin Duchemin | 46318211ed | |
Quentin Duchemin | bb1a0f23e0 | |
Quentin Duchemin | 760431104b | |
Quentin Duchemin | 6710d33bcf | |
Quentin Duchemin | ae7d4091c3 | |
Quentin Duchemin | 96ba27c99c | |
Quentin Duchemin | d88eeb06cf | |
Quentin Duchemin | 17a6abeec4 | |
Quentin Duchemin | 1074886cf3 | |
Quentin Duchemin | d510a03329 | |
Quentin Duchemin | 1f5a29a525 | |
Quentin Duchemin | 0846273757 | |
Quentin Duchemin | a613d5b1ae | |
Quentin Duchemin | 25e010bf6c | |
Quentin Duchemin | d8d0374875 | |
Quentin Duchemin | 2eb8c99f43 | |
Quentin Duchemin | 907e0df063 | |
Quentin Duchemin | f8b2b8883f | |
Quentin Duchemin | 12647d73bd | |
Quentin Duchemin | db5fb7011f | |
Quentin Duchemin | 5debbf8f40 | |
Quentin Duchemin | a2634742df | |
Quentin Duchemin | 9b222892fd | |
Quentin Duchemin | a3577d8e98 | |
Quentin Duchemin | b942d9e55e | |
Quentin Duchemin | 287d4a452d | |
Quentin Duchemin | 646ef5affc | |
Quentin Duchemin | 989a6215c8 | |
Quentin Duchemin | 1374da92d7 | |
Quentin Duchemin | 4427295a1d | |
Quentin Duchemin | 3cfd6b8818 | |
Quentin Duchemin | 7191312010 | |
Quentin Duchemin | 2b65e1cf3d | |
Quentin Duchemin | 6fd0445936 | |
Quentin Duchemin | e011531520 | |
Quentin Duchemin | ba6ecc5070 | |
Quentin Duchemin | 13a99eb43a | |
Quentin Duchemin | dcdbcc1723 | |
Quentin Duchemin | 734558ad9c | |
Quentin Duchemin | c9e03cfecd | |
Quentin Duchemin | 7761e9f517 | |
Quentin Duchemin | 390ba67252 | |
Quentin Duchemin | c9837c53bd | |
Quentin Duchemin | 54f15c191c | |
Quentin Duchemin | d0d0fe0144 | |
Quentin Duchemin | 9770422599 | |
Quentin Duchemin | 244dedd0bc | |
Quentin Duchemin | 1db779feb9 | |
Quentin Duchemin | 3527935ff4 | |
Quentin Duchemin | 7b09e0311d | |
Quentin Duchemin | bb81d1d220 | |
Quentin Duchemin | ea76177370 | |
Quentin Duchemin | 6eef37f11d | |
Quentin Duchemin | bee0b60afe | |
Quentin Duchemin | 204b5ff718 | |
Quentin Duchemin | d5856be935 | |
Quentin Duchemin | 390bb76203 | |
Quentin Duchemin | 23a14b66ba | |
Quentin Duchemin | 2e7a7dc891 | |
Quentin Duchemin | 366e63043a | |
Quentin Duchemin | c501977386 | |
Quentin Duchemin | d6675bf822 | |
Quentin Duchemin | 2abafa743c | |
Quentin Duchemin | 3672669bec | |
Quentin Duchemin | 5558b5c963 | |
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 | |
Quentin Duchemin | d072f133ad | |
Quentin Duchemin | 747506f8af | |
Quentin Duchemin | a844f73f75 | |
Quentin Duchemin | 71309318e8 | |
Quentin Duchemin | d033b81446 | |
Quentin Duchemin | 33a57ad978 | |
Quentin Duchemin | 9ecf704015 | |
Quentin Duchemin | 62f7d8b1e6 | |
Quentin Duchemin | 4c88528ee8 | |
Quentin Duchemin | 191bccfb5a | |
Quentin Duchemin | b3d43ef629 | |
Quentin Duchemin | 323ff52593 | |
Quentin Duchemin | 1a442bbe90 | |
Quentin Duchemin | 5221c65449 | |
Quentin Duchemin | 318205ad39 | |
Quentin Duchemin | 383f2998fd | |
Quentin Duchemin | d2f2fe6980 | |
Quentin Duchemin | 72b0bb96a4 | |
Quentin Duchemin | f875ca12cc | |
Quentin Duchemin | 213410a15e | |
Quentin Duchemin | 413c12c378 | |
Quentin Duchemin | fb134bbf39 | |
Quentin Duchemin | 03ca82c4c4 | |
Quentin Duchemin | fd2798c62e | |
Quentin Duchemin | 8f0edb835c | |
Quentin Duchemin | cee9c24380 | |
Quentin Duchemin | d0986fd825 | |
Quentin Duchemin | 0aa3d4ad96 | |
Quentin Duchemin | 8a7ea7a0fc | |
Quentin Duchemin | bfbe0747a6 | |
Quentin Duchemin | 3d02d9f41d |
|
@ -1 +0,0 @@
|
||||||
/home/.Xresources.desk
|
|
|
@ -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
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
Xft.autohint: 0
|
|
||||||
Xft.lcdfilter: lcddefault
|
|
||||||
Xft.hintstyle: hintfull
|
|
||||||
Xft.hinting: 1
|
|
||||||
Xft.antialias: 1
|
|
||||||
Xft.rgba: rgb
|
|
||||||
|
|
|
@ -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
|
|
||||||
|
|
|
@ -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'
|
|
@ -0,0 +1 @@
|
||||||
|
/etc/NetworkManager/conf.d
|
|
@ -0,0 +1,2 @@
|
||||||
|
[device]
|
||||||
|
wifi.backend=iwd
|
|
@ -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
|
|
@ -1,3 +0,0 @@
|
||||||
hamster-time-tracker
|
|
||||||
realtime-privileges
|
|
||||||
zita-ajbridge
|
|
|
@ -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
|
|
|
@ -0,0 +1 @@
|
||||||
|
gddccontrol
|
|
@ -1,54 +1,134 @@
|
||||||
|
android-file-transfer
|
||||||
|
ansible
|
||||||
|
ansible-lint
|
||||||
arc-gtk-theme
|
arc-gtk-theme
|
||||||
arc-icon-theme
|
arc-icon-theme
|
||||||
autojump
|
bat
|
||||||
cadence
|
bat-extras
|
||||||
|
blueman
|
||||||
|
bluez
|
||||||
|
bluez-utils
|
||||||
|
bluetooth-autoconnect
|
||||||
|
bind
|
||||||
|
catppuccin-cursors-macchiato
|
||||||
|
catppuccin-gtk-theme-macchiato
|
||||||
|
chafa
|
||||||
|
chromium
|
||||||
|
cups
|
||||||
|
dhcpcd
|
||||||
|
dialog
|
||||||
docker
|
docker
|
||||||
|
dosfstools
|
||||||
|
dkms
|
||||||
dunst
|
dunst
|
||||||
|
evince
|
||||||
|
eza
|
||||||
feh
|
feh
|
||||||
|
ffmpeg
|
||||||
|
ffmpegthumbnailer
|
||||||
firefox
|
firefox
|
||||||
flameshot
|
flameshot
|
||||||
|
fzf
|
||||||
|
gcr
|
||||||
|
git-delta
|
||||||
|
gthumb
|
||||||
|
helvum
|
||||||
|
hplip
|
||||||
|
htop
|
||||||
i3-wm
|
i3-wm
|
||||||
i3lock-color
|
i3lock-color
|
||||||
|
ifplugd
|
||||||
|
imagemagick
|
||||||
jq
|
jq
|
||||||
|
kwayland5
|
||||||
|
lesspipe
|
||||||
|
libreoffice-fresh
|
||||||
libusb-compat
|
libusb-compat
|
||||||
|
less
|
||||||
|
lshw
|
||||||
|
lxappearance-gtk3
|
||||||
maim
|
maim
|
||||||
|
man-db
|
||||||
|
man-pages
|
||||||
|
musescore
|
||||||
mlocate
|
mlocate
|
||||||
|
nmap
|
||||||
nemo
|
nemo
|
||||||
neofetch
|
neofetch
|
||||||
network-manager-applet
|
netctl
|
||||||
networkmanager
|
neovim
|
||||||
noto-fonts-emoji
|
noto-fonts-emoji
|
||||||
numlockx
|
numlockx
|
||||||
obsidian
|
obsidian
|
||||||
|
oh-my-posh
|
||||||
oh-my-zsh-git
|
oh-my-zsh-git
|
||||||
|
p7zip
|
||||||
pacman-contrib
|
pacman-contrib
|
||||||
|
pavucontrol
|
||||||
|
papirus-icon-theme
|
||||||
|
papirus-folders-catppuccin-git
|
||||||
pass
|
pass
|
||||||
|
perl-file-homedir
|
||||||
|
perl-yaml-tiny
|
||||||
picom
|
picom
|
||||||
|
pipewire
|
||||||
|
pipewire-audio
|
||||||
|
pipewire-alsa
|
||||||
|
pipewire-pulse
|
||||||
|
pipewire-jack
|
||||||
playerctl
|
playerctl
|
||||||
polybar
|
polybar
|
||||||
powerline-fonts
|
python-dbus
|
||||||
|
python-gobject
|
||||||
python-pip
|
python-pip
|
||||||
python-pygments
|
python-pygments
|
||||||
|
python-pyperclip
|
||||||
|
python-requests
|
||||||
|
qbittorrent
|
||||||
|
realtime-privileges
|
||||||
|
restic
|
||||||
|
ripgrep
|
||||||
|
rmtrash
|
||||||
rofi
|
rofi
|
||||||
|
rofimoji
|
||||||
rsync
|
rsync
|
||||||
|
scaleway-cli
|
||||||
signal-desktop
|
signal-desktop
|
||||||
|
stylua
|
||||||
telegram-desktop
|
telegram-desktop
|
||||||
|
texlive-binextra
|
||||||
|
tectonic
|
||||||
terminator
|
terminator
|
||||||
thunderbird
|
thunderbird
|
||||||
|
torbrowser-launcher
|
||||||
|
trash-cli
|
||||||
ttf-dejavu
|
ttf-dejavu
|
||||||
ttf-font-awesome-5
|
ttf-font-awesome
|
||||||
|
ttf-jetbrains-mono-nerd
|
||||||
ttf-material-icons-git
|
ttf-material-icons-git
|
||||||
ttf-symbola
|
ttf-symbola
|
||||||
ttf-weather-icons
|
ttf-weather-icons
|
||||||
|
ttf-meslo-nerd
|
||||||
|
unzip
|
||||||
|
usbutils
|
||||||
usb_modeswitch
|
usb_modeswitch
|
||||||
vim
|
vim
|
||||||
|
vlc
|
||||||
vscodium-bin
|
vscodium-bin
|
||||||
wget
|
wget
|
||||||
|
wpa_supplicant
|
||||||
xautolock
|
xautolock
|
||||||
|
xclip
|
||||||
xdg-user-dirs
|
xdg-user-dirs
|
||||||
xdotool
|
xdotool
|
||||||
xorg-server
|
xorg-server
|
||||||
|
xorg-xev
|
||||||
xorg-xinit
|
xorg-xinit
|
||||||
|
xorg-xinput
|
||||||
|
xorg-xrandr
|
||||||
xsel
|
xsel
|
||||||
yay-bin
|
yay-bin
|
||||||
|
zenity
|
||||||
|
zip
|
||||||
|
zoxide
|
||||||
zsh
|
zsh
|
|
@ -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
|
|
@ -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
|
||||||
|
@ -45,7 +45,7 @@
|
||||||
frame_width = 3
|
frame_width = 3
|
||||||
|
|
||||||
# Defines color of the frame around the notification window.
|
# Defines color of the frame around the notification window.
|
||||||
frame_color = "#8EC07C"
|
frame_color = "#8AADF4"
|
||||||
|
|
||||||
# Define a color for the separator.
|
# Define a color for the separator.
|
||||||
# possible values are:
|
# possible values are:
|
||||||
|
@ -185,18 +185,16 @@
|
||||||
|
|
||||||
# Ignore the dbus closeNotification message. This is useful to enforce the timeout set by dunst configuration.
|
# Ignore the dbus closeNotification message. This is useful to enforce the timeout set by dunst configuration.
|
||||||
ignore_dbusclose = true
|
ignore_dbusclose = true
|
||||||
[urgency_low]
|
|
||||||
frame_color = "#3B7C87"
|
[urgency_low]
|
||||||
foreground = "#3B7C87"
|
background = "#24273A"
|
||||||
background = "#191311"
|
foreground = "#CAD3F5"
|
||||||
timeout = 5
|
|
||||||
[urgency_normal]
|
[urgency_normal]
|
||||||
frame_color = "#5B8234"
|
background = "#24273A"
|
||||||
foreground = "#5B8234"
|
foreground = "#CAD3F5"
|
||||||
background = "#191311"
|
|
||||||
timeout = 20
|
[urgency_critical]
|
||||||
[urgency_critical]
|
background = "#24273A"
|
||||||
frame_color = "#B7472A"
|
foreground = "#CAD3F5"
|
||||||
foreground = "#B7472A"
|
frame_color = "#F5A97F"
|
||||||
background = "#191311"
|
|
||||||
timeout = 0
|
|
||||||
|
|
|
@ -1,6 +1,16 @@
|
||||||
[Settings]
|
[Settings]
|
||||||
gtk-icon-theme-name = Arc
|
gtk-icon-theme-name=Papirus-Dark
|
||||||
gtk-theme-name = Arc-Dark
|
gtk-theme-name=Catppuccin-Macchiato-Standard-Flamingo-Dark
|
||||||
gtk-font-name = Noto Sans 11
|
gtk-font-name=Noto Sans 11
|
||||||
gtk-application-prefer-dark-theme = true
|
gtk-can-change-accels=1
|
||||||
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
|
||||||
|
|
|
@ -4,50 +4,33 @@
|
||||||
|
|
||||||
# alterning workspace between each screen
|
# alterning workspace between each screen
|
||||||
workspace 1 output DVI-I-1
|
workspace 1 output DVI-I-1
|
||||||
workspace 2 output HDMI-0
|
workspace 2 output HDMI-1
|
||||||
workspace 3 output DVI-I-1
|
workspace 3 output DVI-I-1
|
||||||
workspace 4 output HDMI-0
|
workspace 4 output HDMI-1
|
||||||
workspace 5 output DVI-I-1
|
workspace 5 output DVI-I-1
|
||||||
workspace 6 output DVI-I-1
|
workspace 6 output DVI-I-1
|
||||||
workspace 7 output DVI-I-1
|
workspace 7 output DVI-I-1
|
||||||
workspace 8 output DVI-I-1
|
workspace 8 output DVI-I-1
|
||||||
workspace 9 output DVI-I-1
|
workspace 9 output DVI-I-1
|
||||||
|
|
||||||
# ALSA key binding (media keys do not even have keycode...)
|
# ALSA key binding
|
||||||
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
|
|
||||||
bindsym XF86AudioPlay exec --no-startup-id playerctl play-pause
|
bindsym XF86AudioPlay exec --no-startup-id playerctl play-pause
|
||||||
bindsym XF86AudioPrev exec --no-startup-id playerctl previous
|
bindsym XF86AudioPrev exec --no-startup-id playerctl previous
|
||||||
bindsym XF86AudioNext exec --no-startup-id playerctl next
|
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
|
# 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
|
# BINDINGS FOR STANDARD OPERATIONS
|
||||||
##################################
|
##################################
|
||||||
|
@ -57,15 +40,5 @@ exec --no-startup-id amixer -D hw:PCH -M sset Headphone 100%
|
||||||
##################################
|
##################################
|
||||||
|
|
||||||
# Scratchpad
|
# Scratchpad
|
||||||
## For Hamster, moving to SP automatically is problematic. Do it only by hand.
|
for_window [class="Pianoteq STAGE"] floating enable, move position center
|
||||||
for_window [class="Hamster" window_type="normal"] floating enable, move scratchpad
|
assign [class="Pianoteq STAGE"] → number 6
|
||||||
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
|
|
||||||
|
|
|
@ -2,28 +2,30 @@
|
||||||
# STARTING CONFIGURATION
|
# STARTING CONFIGURATION
|
||||||
##################################
|
##################################
|
||||||
|
|
||||||
# ALSA keybinding
|
# Luminosity on laptop
|
||||||
bindsym XF86AudioRaiseVolume exec --no-startup-id amixer -D hw:PCH -M sset Master 5%+
|
bindsym XF86MonBrightnessDown exec --no-startup-id brightnessctl set 5%-
|
||||||
bindsym XF86AudioLowerVolume exec --no-startup-id aimxer -D hw:PCH -M sset Master 5%-
|
bindsym XF86MonBrightnessUp exec --no-startup-id brightnessctl set +5%
|
||||||
bindsym XF86AudioMute exec --no-startup-id amixer -D hw:PCH -M sset 'Master' toggle
|
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)
|
# Get chosen DPI from Xresources, default 120
|
||||||
bindsym XF86MonBrightnessDown exec --no-startup-id xbacklight -dec 10 -steps 200
|
set_from_resource $dpi i3wm.dpi 120
|
||||||
bindsym XF86MonBrightnessUp exec --no-startup-id xbacklight -inc 10 -steps 200
|
# Only dunst seems to care about this setting
|
||||||
bindsym XF86KbdBrightnessDown exec --no-startup-id xbacklight -ctrl asus::kbd_backlight -dec 30
|
exec xrandr --dpi $dpi
|
||||||
bindsym XF86KbdBrightnessUp exec --no-startup-id xbacklight -ctrl asus::kbd_backlight -inc 30
|
|
||||||
|
|
||||||
|
|
||||||
# set DPI along with .Xresources
|
|
||||||
exec xrandr --dpi 160
|
|
||||||
|
|
||||||
##################################
|
##################################
|
||||||
# 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.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
|
# 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
|
# 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
|
|
||||||
|
|
|
@ -1,5 +1,41 @@
|
||||||
# i3 config file (v4)
|
# 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
|
# STARTING CONFIGURATION
|
||||||
##################################
|
##################################
|
||||||
|
@ -17,6 +53,8 @@ floating_modifier $mod
|
||||||
|
|
||||||
# no border nor title
|
# no border nor title
|
||||||
new_window none
|
new_window none
|
||||||
|
default_border pixel 0
|
||||||
|
default_floating_border pixel 5
|
||||||
|
|
||||||
# hide borders when touching edges
|
# hide borders when touching edges
|
||||||
hide_edge_borders both
|
hide_edge_borders both
|
||||||
|
@ -42,6 +80,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
|
||||||
|
|
||||||
|
@ -73,6 +114,10 @@ exec thunderbird
|
||||||
exec signal-desktop
|
exec signal-desktop
|
||||||
exec telegram-desktop
|
exec telegram-desktop
|
||||||
exec obsidian
|
exec obsidian
|
||||||
|
exec --no-startup-id redshift-gtk
|
||||||
|
exec qbittorrent
|
||||||
|
exec pavucontrol
|
||||||
|
exec helvum
|
||||||
|
|
||||||
# fetch keys from HSM
|
# fetch keys from HSM
|
||||||
exec --no-startup-id gpg --card-status
|
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
|
bindsym $mod+Return exec --no-startup-id i3-sensible-terminal
|
||||||
|
|
||||||
# start rofi (a program launcher)
|
# start rofi (a program launcher)
|
||||||
bindsym $mod+d exec rofi -show run -theme sidebar
|
bindsym $mod+d exec rofi -show run
|
||||||
bindsym $mod+Shift+d exec ~/.config/rofi/emoji-picker.py
|
bindsym $mod+Shift+d exec rofimoji
|
||||||
|
|
||||||
# just lock the screen
|
# just lock the screen
|
||||||
bindsym $mod+l exec --no-startup-id $Locker && sleep 1
|
bindsym $mod+l exec --no-startup-id $Locker && sleep 1
|
||||||
|
|
||||||
# lock and suspend to SWAP
|
# 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
|
# open Explorer
|
||||||
bindsym $mod+e exec --no-startup-id nemo
|
bindsym $mod+e exec --no-startup-id nemo
|
||||||
|
@ -192,11 +237,17 @@ mode "$resize_mode" {
|
||||||
|
|
||||||
bindsym $mod+r 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
|
# 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 Ctrl+$mod+space exec dunstctl history-pop
|
||||||
bindsym Shift+BackSpace exec dunstctl close
|
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="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
|
||||||
|
|
||||||
# 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
|
||||||
for_window [class="Telegram"] 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
|
# 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
|
||||||
|
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+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+e [title="qBittorrent v*"] 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
|
||||||
bindsym Mod4+ampersand [title="(?i)perso.*obsidian"] scratchpad show, move container to workspace 4, workspace 4, floating disable
|
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+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
|
# 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
|
||||||
assign [class="(?i)Firefox"] → number 3
|
assign [class="(?i)Firefox" window_role="browser"] → number 3
|
||||||
assign [class="(?i)VSCodium"] → number 2
|
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
|
|
@ -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
|
||||||
|
|
|
@ -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)
|
return client.add_photo(binary_img, str(uuid.uuid4()) + '.' + img_format, album_id)
|
||||||
|
|
||||||
def get_image_direct_link(client, image_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):
|
def main(argv):
|
||||||
upload, save, path = read_args(argv)
|
upload, save, path = read_args(argv)
|
||||||
|
@ -108,8 +108,8 @@ def main(argv):
|
||||||
if upload:
|
if upload:
|
||||||
s = login()
|
s = login()
|
||||||
album_id = get_album_id(s, SCREENSHOT_CONFIG['album_name'])
|
album_id = get_album_id(s, SCREENSHOT_CONFIG['album_name'])
|
||||||
image_id = upload_image(s, album_id, img, img_format)
|
image_info = upload_image(s, album_id, img, img_format)
|
||||||
image_link = get_image_direct_link(s, image_id)
|
image_link = get_image_direct_link(s, image_info['id'])
|
||||||
pyperclip.copy(image_link)
|
pyperclip.copy(image_link)
|
||||||
subprocess.run(['notify-send', '-u', 'low', '-i', 'Info', '-a', 'Screenchost', 'Screenshot uploaded', 'Link copied to clipboard!'])
|
subprocess.run(['notify-send', '-u', 'low', '-i', 'Info', '-a', 'Screenchost', 'Screenshot uploaded', 'Link copied to clipboard!'])
|
||||||
except subprocess.CalledProcessError as e:
|
except subprocess.CalledProcessError as e:
|
||||||
|
|
|
@ -4,7 +4,7 @@ JACK settings, as persisted by D-Bus object.
|
||||||
You probably don't want to edit this because
|
You probably don't want to edit this because
|
||||||
it will be overwritten next time jackdbus saves.
|
it will be overwritten next time jackdbus saves.
|
||||||
-->
|
-->
|
||||||
<!-- Sat Feb 18 21:25:33 2023 -->
|
<!-- Fri Feb 2 18:39:25 2024 -->
|
||||||
<jack>
|
<jack>
|
||||||
<engine>
|
<engine>
|
||||||
<option name="driver">alsa</option>
|
<option name="driver">alsa</option>
|
||||||
|
@ -12,10 +12,13 @@ it will be overwritten next time jackdbus saves.
|
||||||
</engine>
|
</engine>
|
||||||
<drivers>
|
<drivers>
|
||||||
<driver name="alsa">
|
<driver name="alsa">
|
||||||
<option name="capture">hw:PCH,0</option>
|
<option name="capture">hw:iD14,0</option>
|
||||||
<option name="playback">hw:PCH,0</option>
|
<option name="playback">hw:iD14,0</option>
|
||||||
<option name="inchannels">2</option>
|
<option name="rate">44100</option>
|
||||||
<option name="outchannels">2</option>
|
<option name="period">2048</option>
|
||||||
|
<option name="inchannels">12</option>
|
||||||
|
<option name="outchannels">6</option>
|
||||||
|
<option name="midi-driver">seq</option>
|
||||||
</driver>
|
</driver>
|
||||||
<driver name="alsarawmidi">
|
<driver name="alsarawmidi">
|
||||||
</driver>
|
</driver>
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
/etc
|
|
@ -0,0 +1,2 @@
|
||||||
|
LANG=en_US.UTF-8
|
||||||
|
LC_TIME=fr_FR.UTF-8
|
|
@ -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 })
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"catppuccin": { "branch": "main", "commit": "c2034f7b549152e5cc757820426341ea5000bc7a" },
|
||||||
|
"formatter.nvim": { "branch": "master", "commit": "cb4778b8432f1ae86dae4634c0b611cb269a4c2f" },
|
||||||
|
"lazy.nvim": { "branch": "main", "commit": "bef521ac89c8d423f9d092e37b58e8af0c099309" }
|
||||||
|
}
|
|
@ -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
|
|
@ -89,8 +89,8 @@ Include = /etc/pacman.d/mirrorlist
|
||||||
#[multilib-testing]
|
#[multilib-testing]
|
||||||
#Include = /etc/pacman.d/mirrorlist
|
#Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
#[multilib]
|
[multilib]
|
||||||
#Include = /etc/pacman.d/mirrorlist
|
Include = /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
# An example of a custom package repository. See the pacman manpage for
|
# An example of a custom package repository. See the pacman manpage for
|
||||||
# tips on creating your own repositories.
|
# tips on creating your own repositories.
|
||||||
|
|
|
@ -8,7 +8,8 @@
|
||||||
# unless explicitly requested using the wintypes option.
|
# unless explicitly requested using the wintypes option.
|
||||||
#
|
#
|
||||||
# shadow = false
|
# shadow = false
|
||||||
shadow = true;
|
# Get rid of shadow behind corners
|
||||||
|
shadow = false;
|
||||||
|
|
||||||
# The blur radius for shadows, in pixels. (defaults to 12)
|
# The blur radius for shadows, in pixels. (defaults to 12)
|
||||||
# shadow-radius = 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.
|
# Parameters for background blurring, see the *BLUR* section for more information.
|
||||||
# blur-method =
|
# blur-method =
|
||||||
# blur-size = 12
|
# blur-size = 12
|
||||||
|
@ -207,7 +216,8 @@ blur-background-exclude = [
|
||||||
# `xrender` is the default one.
|
# `xrender` is the default one.
|
||||||
#
|
#
|
||||||
# backend = 'glx'
|
# backend = 'glx'
|
||||||
backend = "xrender";
|
# With xrender there is black in place of rounded corners
|
||||||
|
backend = "glx";
|
||||||
|
|
||||||
# Enable/disable VSync.
|
# Enable/disable VSync.
|
||||||
# vsync = false
|
# vsync = false
|
||||||
|
@ -232,6 +242,7 @@ mark-ovredir-focused = true;
|
||||||
# detect-rounded-corners = false
|
# detect-rounded-corners = false
|
||||||
detect-rounded-corners = true;
|
detect-rounded-corners = true;
|
||||||
|
|
||||||
|
corner-radius = 7.0
|
||||||
# Detect '_NET_WM_OPACITY' on client windows, useful for window managers
|
# Detect '_NET_WM_OPACITY' on client windows, useful for window managers
|
||||||
# not passing '_NET_WM_OPACITY' of client windows to frame windows.
|
# not passing '_NET_WM_OPACITY' of client windows to frame windows.
|
||||||
#
|
#
|
||||||
|
|
|
@ -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}"
|
|
@ -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
|
|
|
@ -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
|
|
|
@ -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}
|
|
@ -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}
|
|
@ -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]
|
[global/wm]
|
||||||
margin-top=50
|
margin-top=50
|
||||||
|
include-file = $HOME/.config/polybar/macchiato.ini
|
||||||
|
|
||||||
; 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.text}
|
||||||
background = ${colors.background}
|
background = ${colors.surface0}
|
||||||
line-size = 3
|
line-size = 3
|
||||||
line-color = #f00
|
line-color = ${colors.base}
|
||||||
|
|
||||||
locale = fr_FR.UTF-8
|
locale = fr_FR.UTF-8
|
||||||
monitor = ${env:MONITOR:HDMI-0}
|
monitor = ${env:MONITOR:HDMI-0}
|
||||||
|
|
||||||
[bar/chostytopbar]
|
[bar/chostytopbar]
|
||||||
inherit = bar/common
|
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-1 = MaterialIcons-Regular:size=11;4
|
||||||
font-2 = Symbola:size=10;2
|
font-2 = Symbola:size=10;2
|
||||||
font-3 = Weather Icons:size=10;3
|
font-3 = Weather Icons:size=10;3
|
||||||
|
|
||||||
overline-size = 10
|
overline-size = 10
|
||||||
underline-size = 10
|
underline-size = 10
|
||||||
overline-color = ${self.background}
|
overline-color = ${colors.mauve}
|
||||||
underline-color = ${self.background}
|
underline-color = ${colors.mauve}
|
||||||
border-bottom-size = 1
|
border-bottom-size = 1
|
||||||
border-bottom-color = #333
|
border-bottom-color = ${colors.base}
|
||||||
padding-left = 2
|
padding-left = 2
|
||||||
padding-right = 10
|
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}
|
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
|
||||||
|
|
||||||
|
@ -53,9 +45,9 @@ inherit = bar/common
|
||||||
bottom = true
|
bottom = true
|
||||||
|
|
||||||
overline-size = 3
|
overline-size = 3
|
||||||
overline-color = ${colors.accent}
|
overline-color = ${colors.mauve}
|
||||||
underline-size = 3
|
underline-size = 3
|
||||||
underline-color = ${colors.accent}
|
underline-color = ${colors.mauve}
|
||||||
|
|
||||||
spacing = 3
|
spacing = 3
|
||||||
padding-left = 0
|
padding-left = 0
|
||||||
|
@ -63,38 +55,27 @@ padding-right = 5
|
||||||
module-margin-left = 6
|
module-margin-left = 6
|
||||||
module-margin-right = 6
|
module-margin-right = 6
|
||||||
|
|
||||||
font-0 = Roboto:size=10;2
|
font-0 = NotoSans-Regular:size=10;1
|
||||||
font-1 = Symbola:size=4;1
|
font-1 = Symbola:size=4;2
|
||||||
font-2 = Symbola:size=5;1
|
font-2 = Symbola:size=5;2
|
||||||
|
;MaterialIcons are the ones used for i3 icons
|
||||||
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]
|
||||||
|
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]
|
[module/xwindow]
|
||||||
type = internal/xwindow
|
type = internal/xwindow
|
||||||
label = %{F#ddd}%title%
|
label = ${env:BAR_WINDOW}
|
||||||
label-maxlen=100
|
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]
|
[module/i3]
|
||||||
type = internal/i3
|
type = internal/i3
|
||||||
format = <label-state> <label-mode>
|
format = <label-state> <label-mode>
|
||||||
|
@ -106,30 +87,33 @@ ws-icon-1 = 2;
|
||||||
ws-icon-2 = 3;
|
ws-icon-2 = 3;
|
||||||
ws-icon-3 = 4;
|
ws-icon-3 = 4;
|
||||||
ws-icon-4 = 5;
|
ws-icon-4 = 5;
|
||||||
|
ws-icon-5 = 6;
|
||||||
|
|
||||||
label-dimmed-underline = ${root.background}
|
|
||||||
label-separator = |
|
label-separator = |
|
||||||
|
|
||||||
|
label-mode-underline = ${colors.surface0}
|
||||||
|
|
||||||
label-focused = %icon% %name%
|
label-focused = %icon% %name%
|
||||||
label-focused-foreground = #f3f3f3
|
label-focused-foreground = ${colors.text}
|
||||||
;label-focused-underline = #${colors.accent}
|
label-focused-underline = ${colors.mauve}
|
||||||
label-focused-underline = #9f78e1
|
|
||||||
label-focused-font = 0
|
label-focused-font = 0
|
||||||
label-focused-padding = 4
|
label-focused-padding = 4
|
||||||
|
|
||||||
label-unfocused = %icon% %name%
|
label-unfocused = %icon% %name%
|
||||||
label-unfocused-underline = #555555
|
label-unfocused-underline = ${colors.surface0}
|
||||||
label-unfocused-font = 0
|
label-unfocused-font = 0
|
||||||
label-unfocused-padding = 4
|
label-unfocused-padding = 4
|
||||||
|
|
||||||
label-urgent = %icon% %name%
|
label-urgent = %icon% %name%
|
||||||
label-urgent-foreground = #000000
|
label-urgent-foreground = ${colors.base}
|
||||||
label-urgent-background = #bd2c40
|
label-urgent-background = ${colors.red}
|
||||||
label-urgent-underline = #9b0a20
|
label-urgent-underline = ${colors.mauve}
|
||||||
label-urgent-font = 0
|
label-urgent-font = 0
|
||||||
label-urgent-padding = 4
|
label-urgent-padding = 4
|
||||||
|
|
||||||
label-visible = %icon% %name%
|
label-visible = %icon% %name%
|
||||||
label-visible-foreground = #55ffffff
|
label-visible-foreground = ${colors.text}
|
||||||
|
label-visible-underline = ${colors.surface0}
|
||||||
label-visible-font = 0
|
label-visible-font = 0
|
||||||
label-visible-padding = 4
|
label-visible-padding = 4
|
||||||
|
|
||||||
|
@ -139,64 +123,39 @@ interval = 0.5
|
||||||
|
|
||||||
format = <label> <ramp-coreload>
|
format = <label> <ramp-coreload>
|
||||||
|
|
||||||
label = %{F#fba922}
|
label = ${env:BAR_CPU}
|
||||||
|
|
||||||
ramp-coreload-0 = ▁
|
ramp-coreload-0 = ▁
|
||||||
ramp-coreload-0-font = 3
|
ramp-coreload-0-font = 3
|
||||||
ramp-coreload-0-foreground = #aaff77
|
ramp-coreload-0-foreground = ${colors.sapphire}
|
||||||
ramp-coreload-1 = ▂
|
ramp-coreload-1 = ▂
|
||||||
ramp-coreload-1-font = 3
|
ramp-coreload-1-font = 3
|
||||||
ramp-coreload-1-foreground = #aaff77
|
ramp-coreload-1-foreground = ${colors.sapphire}
|
||||||
ramp-coreload-2 = ▃
|
ramp-coreload-2 = ▃
|
||||||
ramp-coreload-2-font = 3
|
ramp-coreload-2-font = 3
|
||||||
ramp-coreload-2-foreground = #aaff77
|
ramp-coreload-2-foreground = ${colors.sapphire}
|
||||||
ramp-coreload-3 = ▄
|
ramp-coreload-3 = ▄
|
||||||
ramp-coreload-3-font = 3
|
ramp-coreload-3-font = 3
|
||||||
ramp-coreload-3-foreground = #aaff77
|
ramp-coreload-3-foreground = ${colors.sapphire}
|
||||||
ramp-coreload-4 = ▅
|
ramp-coreload-4 = ▅
|
||||||
ramp-coreload-4-font = 3
|
ramp-coreload-4-font = 3
|
||||||
ramp-coreload-4-foreground = #fba922
|
ramp-coreload-4-foreground = ${colors.peach}
|
||||||
ramp-coreload-5 = ▆
|
ramp-coreload-5 = ▆
|
||||||
ramp-coreload-5-font = 3
|
ramp-coreload-5-font = 3
|
||||||
ramp-coreload-5-foreground = #fba922
|
ramp-coreload-5-foreground = ${colors.peach}
|
||||||
ramp-coreload-6 = ▇
|
ramp-coreload-6 = ▇
|
||||||
ramp-coreload-6-font = 3
|
ramp-coreload-6-font = 3
|
||||||
ramp-coreload-6-foreground = #ff5555
|
ramp-coreload-6-foreground = ${colors.maroon}
|
||||||
ramp-coreload-7 = █
|
ramp-coreload-7 = █
|
||||||
ramp-coreload-7-font = 3
|
ramp-coreload-7-font = 3
|
||||||
ramp-coreload-7-foreground = #ff5555
|
ramp-coreload-7-foreground = ${colors.red}
|
||||||
|
|
||||||
[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
|
||||||
|
|
||||||
date = " %A %d %B %Y"
|
date = " %A %d %B %Y"
|
||||||
|
|
||||||
time = %H:%M:%S
|
time = %H:%M:%S
|
||||||
|
label = ${env:BAR_DATE}
|
||||||
label = %{F#ddd} %date% %time%
|
|
||||||
|
|
||||||
[module/temperature]
|
[module/temperature]
|
||||||
type = internal/temperature
|
type = internal/temperature
|
||||||
|
@ -204,49 +163,42 @@ thermal-zone = 0
|
||||||
warn-temperature = 60
|
warn-temperature = 60
|
||||||
interval = 0.5
|
interval = 0.5
|
||||||
|
|
||||||
format = <ramp> <label>
|
format = <label>
|
||||||
format-warn = <ramp> <label-warn>
|
format-warn = <label-warn>
|
||||||
|
|
||||||
label = %{F#77dd77} %{F-} %temperature-c%
|
label = ${env:BAR_TEMP_OK}
|
||||||
label-warn = %{F#dd7777} %{F-} %temperature-c%
|
label-warn = ${env:BAR_TEMP_WARN}
|
||||||
label-warn-foreground = #dd7777
|
label-warn-foreground = ${colors.text}
|
||||||
|
|
||||||
ramp-0 =
|
|
||||||
ramp-1 =
|
|
||||||
ramp-2 =
|
|
||||||
ramp-foreground = ${colors.foreground-alt}
|
|
||||||
|
|
||||||
[module/powermenu]
|
[module/powermenu]
|
||||||
type = custom/menu
|
type = custom/menu
|
||||||
|
|
||||||
format-padding = 3
|
format-padding = 3
|
||||||
|
label-open = ${env:BAR_MENU_OPEN}
|
||||||
label-open = %{F#dd7777}%{F#ddd}
|
label-close = ${env:BAR_MENU_CLOSE}
|
||||||
label-close = %{F#dd7777}%{F#ddd}
|
|
||||||
label-separator = " · "
|
label-separator = " · "
|
||||||
|
|
||||||
menu-0-0 = Exit i3
|
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-0-exec = i3-msg exit
|
||||||
menu-0-1 = Reboot
|
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-1-exec = menu-open-1
|
||||||
menu-0-2 = Power off
|
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-0-2-exec = menu-open-2
|
||||||
|
|
||||||
menu-1-0 = Cancel
|
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-0-exec = menu-open-0
|
||||||
menu-1-1 = Reboot
|
menu-1-1 = Reboot
|
||||||
menu-1-1-foreground = ${colors.accent}
|
menu-1-1-foreground = ${colors.mauve}
|
||||||
menu-1-1-exec = systemctl reboot -i
|
menu-1-1-exec = systemctl reboot -i
|
||||||
|
|
||||||
menu-2-0 = Cancel
|
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-0-exec = menu-open-0
|
||||||
menu-2-1 = Power off
|
menu-2-1 = Power off
|
||||||
menu-2-1-foreground = ${colors.accent}
|
menu-2-1-foreground = ${colors.mauve}
|
||||||
menu-2-1-exec = systemctl poweroff
|
menu-2-1-exec = systemctl poweroff
|
||||||
|
|
||||||
[module/system-usb-udev]
|
[module/system-usb-udev]
|
||||||
|
@ -274,11 +226,12 @@ interval = 30
|
||||||
[module/backlight]
|
[module/backlight]
|
||||||
type = internal/backlight
|
type = internal/backlight
|
||||||
card = intel_backlight
|
card = intel_backlight
|
||||||
label = %{F#77dd77}☀️%{F#ddd} %percentage%%
|
label = ${env:BAR_BACKLIGHT}
|
||||||
bar-width = 10
|
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
|
||||||
|
@ -286,7 +239,7 @@ interval = 5
|
||||||
|
|
||||||
format-volume = <ramp-volume> <label-volume>
|
format-volume = <ramp-volume> <label-volume>
|
||||||
label-muted = 🔇 muted
|
label-muted = 🔇 muted
|
||||||
label-muted-foreground = #666
|
label-muted-foreground = ${colors.rosewater}
|
||||||
|
|
||||||
ramp-volume-0 = 🔈
|
ramp-volume-0 = 🔈
|
||||||
ramp-volume-1 = 🔉
|
ramp-volume-1 = 🔉
|
||||||
|
@ -304,9 +257,9 @@ poll-interval = 5
|
||||||
format-charging = <label-charging>
|
format-charging = <label-charging>
|
||||||
format-discharging = <label-discharging>
|
format-discharging = <label-discharging>
|
||||||
format-full = <label-full>
|
format-full = <label-full>
|
||||||
label-charging = %percentage%%
|
label-charging = ${env:BAR_BATTERY_CHARGING}
|
||||||
label-discharging = %percentage%%
|
label-discharging = ${env:BAR_BATTERY_DISCHARGING}
|
||||||
label-full = %{F#77dd77}
|
label-full = ${env:BAR_BATTERY_FULL}
|
||||||
|
|
||||||
[module/alsa]
|
[module/alsa]
|
||||||
type = internal/alsa
|
type = internal/alsa
|
||||||
|
@ -319,13 +272,13 @@ master-mixer = Master
|
||||||
|
|
||||||
format-volume = <ramp-volume> <label-volume>
|
format-volume = <ramp-volume> <label-volume>
|
||||||
label-muted = 🔇 muted
|
label-muted = 🔇 muted
|
||||||
label-muted-foreground = #66
|
label-muted-foreground = ${colors.rosewater}
|
||||||
|
|
||||||
ramp-volume-0 = 🔈
|
ramp-volume-0 = ${env:BAR_LOW_VOL}
|
||||||
ramp-volume-1 = 🔉
|
ramp-volume-1 = ${env:BAR_MED_VOL}
|
||||||
ramp-volume-2 = 🔊
|
ramp-volume-2 = ${env:BAR_HIGH_VOL}
|
||||||
|
|
||||||
ramp-headphones-0 =
|
ramp-headphones-0 = ${env:BAR_HEAD_VOL}
|
||||||
ramp-headphones-1 =
|
ramp-headphones-1 = ${env:BAR_HEAD_VOL}
|
||||||
|
|
||||||
interval = 3
|
interval = 3
|
|
@ -1,6 +1,8 @@
|
||||||
#/bin/sh
|
#/bin/sh
|
||||||
|
|
||||||
|
source $(dirname $0)/../.env
|
||||||
source $(dirname $0)/filesystem.data
|
source $(dirname $0)/filesystem.data
|
||||||
|
|
||||||
output=""
|
output=""
|
||||||
for i in "${!parts[@]}"; do
|
for i in "${!parts[@]}"; do
|
||||||
avail=$(df -h ${parts[$i]} | tail -1 | tr -s ' ' | cut -d' ' -f4)
|
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)
|
num=$(echo ${used} | cut -d'%' -f1)
|
||||||
|
|
||||||
if [ "$num" -gt 80 ] ; then
|
if [ "$num" -gt 80 ] ; then
|
||||||
color="#dd7777"
|
color="$MOCHA_RED"
|
||||||
elif [ "$num" -gt 50 ] ; then
|
elif [ "$num" -gt 50 ] ; then
|
||||||
color="#fba922"
|
color="$MOCHA_PEACH"
|
||||||
else
|
else
|
||||||
color="#77dd77"
|
color="$MOCHA_MAUVE"
|
||||||
fi
|
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
|
if [ $(($i + 1)) -ne "${#parts[@]}" ] ; then
|
||||||
output=$output" "
|
output=$output" "
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
source ~/.config/polybar/.env
|
||||||
names=("chostybottombar" "chostytopbar")
|
names=("chostybottombar" "chostytopbar")
|
||||||
killall -q polybar
|
killall -q polybar
|
||||||
while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
|
while pgrep -u $UID -x polybar >/dev/null; do sleep 1; done
|
||||||
monitor=$(xrandr --query | grep "connected" | grep "primary" | cut -d" " -f1)
|
monitor=$(xrandr --query | grep " connected" | grep "primary" | cut -d" " -f1)
|
||||||
for name in ${names[@]}; do
|
for name in ${names[@]}; do
|
||||||
MONITOR=${monitor} polybar -q --reload ${name} &
|
MONITOR=${monitor} polybar -q --reload ${name} &
|
||||||
done
|
done
|
|
@ -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\1p\2p\3p', 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()
|
|
@ -1,3 +1,3 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
source $(dirname $0)/../.env
|
||||||
echo "%{F#77dd77}%{F#ddd} " $(uptime --pretty | sed 's/up //')
|
echo "%{F$MOCHA_MAUVE}%{F$MOCHA_TEXT} " $(uptime --pretty | sed 's/up //')
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
source $(dirname $0)/../.env
|
||||||
# Dependencies : jq ; udisks2
|
# Dependencies : jq ; udisks2
|
||||||
# Some updates by Quentin Duchemin on 18/03/07
|
# Some updates by Quentin Duchemin on 18/03/07
|
||||||
# - Add label in lsblk selection
|
# - Add label in lsblk selection
|
||||||
|
@ -41,7 +42,7 @@ usb_print() {
|
||||||
output="$output$space $mounted"
|
output="$output$space $mounted"
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "%{F#ddd}$output"
|
echo "%{F$MOCHA_TEXT}$output"
|
||||||
}
|
}
|
||||||
|
|
||||||
usb_update() {
|
usb_update() {
|
||||||
|
|
|
@ -1,15 +1,17 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
# Wait for connection
|
||||||
connect=$(ping -q -w 1 -c 1 `ip r | grep default | cut -d ' ' -f 3` &> /dev/null)
|
sleep 5
|
||||||
|
source $(dirname $0)/../.env
|
||||||
|
connect=$(ping -q -w 1 -c 1 8.8.8.8 &> /dev/null)
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
updates_arch=$(/usr/bin/checkupdates | wc -l)
|
updates_arch=$(/usr/bin/checkupdates | wc -l)
|
||||||
# a restricts to AUR packages
|
# a restricts to AUR packages
|
||||||
updates_aur=$(yay -Qua | wc -l)
|
updates_aur=$(yay -Qua | wc -l)
|
||||||
updates=$(("$updates_arch" + "$updates_aur"))
|
updates=$(("$updates_arch" + "$updates_aur"))
|
||||||
if [ "$updates" -gt 0 ]; then
|
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
|
else
|
||||||
echo "%{F#77dd77}%{F#ddd} 0"
|
echo "%{F$MOCHA_GREEN}%{F$MOCHA_TEXT} 0"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "%{F#77dd77}%{F#ddd} Offline"
|
echo "%{F#77dd77}%{F#ddd} Offline"
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
@realtime - rtprio 99
|
||||||
|
@realtime - memlock unlimited
|
||||||
|
@realtime - nice unlimited
|
|
@ -0,0 +1 @@
|
||||||
|
/etc/security/limits.d
|
|
@ -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
|
|
@ -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;
|
||||||
|
}
|
||||||
|
|
|
@ -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
|
@ -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;
|
|
||||||
}
|
|
|
@ -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
|
|
@ -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/
|
|
|
@ -1,9 +0,0 @@
|
||||||
[Unit]
|
|
||||||
Description=Run backup daily
|
|
||||||
|
|
||||||
[Timer]
|
|
||||||
OnCalendar=weekly
|
|
||||||
Persistent=true
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=timers.target
|
|
|
@ -2,8 +2,10 @@
|
||||||
borderless = True
|
borderless = True
|
||||||
use_custom_url_handler = True
|
use_custom_url_handler = True
|
||||||
custom_url_handler = firefox
|
custom_url_handler = firefox
|
||||||
enabled_plugins = TerminalShot, LaunchpadCodeURLHandler, APTURLHandler, LaunchpadBugURLHandler
|
enabled_plugins = ActivityWatch, InactivityWatch, LaunchpadBugURLHandler, LaunchpadCodeURLHandler, APTURLHandler, TerminalShot, TerminatorThemes
|
||||||
suppress_multiple_term_dialog = True
|
ask_before_closing = never
|
||||||
|
always_split_with_profile = True
|
||||||
|
putty_paste_style_source_clipboard = True
|
||||||
[keybindings]
|
[keybindings]
|
||||||
go_next = <Primary><Shift>n
|
go_next = <Primary><Shift>n
|
||||||
go_prev = <Primary><Shift>p
|
go_prev = <Primary><Shift>p
|
||||||
|
@ -25,12 +27,35 @@
|
||||||
[profiles]
|
[profiles]
|
||||||
[[default]]
|
[[default]]
|
||||||
icon_bell = False
|
icon_bell = False
|
||||||
background_darkness = 0.87
|
background_color = "#282828"
|
||||||
background_type = transparent
|
background_darkness = 1.0
|
||||||
|
cursor_fg_color = "#000000"
|
||||||
|
cursor_bg_color = "#aaaaaa"
|
||||||
font = DejaVu Sans Mono 11
|
font = DejaVu Sans Mono 11
|
||||||
|
foreground_color = "#ebdbb2"
|
||||||
scrollbar_position = hidden
|
scrollbar_position = hidden
|
||||||
scrollback_infinite = True
|
scrollback_infinite = True
|
||||||
use_system_font = False
|
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_fg_color = "#000000"
|
||||||
title_transmit_bg_color = "#ffffff"
|
title_transmit_bg_color = "#ffffff"
|
||||||
[layouts]
|
[layouts]
|
||||||
|
@ -48,6 +73,6 @@
|
||||||
type = Terminal
|
type = Terminal
|
||||||
parent = child0
|
parent = child0
|
||||||
order = 0
|
order = 0
|
||||||
profile = default
|
profile = Catppuccin_Mocha
|
||||||
uuid = 498cd758-0193-4b69-b40a-9743e0b080a7
|
uuid = 498cd758-0193-4b69-b40a-9743e0b080a7
|
||||||
[plugins]
|
[plugins]
|
||||||
|
|
|
@ -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
|
||||||
|
}
|
|
@ -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/
|
|
|
@ -5,11 +5,11 @@
|
||||||
# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an
|
# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an
|
||||||
# absolute path. No other format is supported.
|
# absolute path. No other format is supported.
|
||||||
#
|
#
|
||||||
XDG_DESKTOP_DIR="$HOME/documents/xdg/desktop"
|
XDG_DESKTOP_DIR="$HOME/"
|
||||||
XDG_DOWNLOAD_DIR="$HOME/downloads"
|
XDG_DOWNLOAD_DIR="$HOME/downloads"
|
||||||
XDG_TEMPLATES_DIR="$HOME/documents/xdg/templates"
|
XDG_TEMPLATES_DIR="$HOME/"
|
||||||
XDG_PUBLICSHARE_DIR="$HOME/documents/xdg/public"
|
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"
|
||||||
|
|
|
@ -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"
|
|
@ -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
|
|
@ -1 +1,4 @@
|
||||||
enable-ssh-support
|
enable-ssh-support
|
||||||
|
default-cache-ttl 3600
|
||||||
|
max-cache-ttl 7200
|
||||||
|
pinentry-program /usr/bin/pinentry-gnome3
|
||||||
|
|
|
@ -1 +1,3 @@
|
||||||
8870E499C64EEB7720EBA5A442F4FE90129BFAE3
|
8870E499C64EEB7720EBA5A442F4FE90129BFAE3
|
||||||
|
85323D13424DE78C6469205C4A0404C4F8A02243
|
||||||
|
# End of file
|
||||||
|
|
183
.init_config.sh
183
.init_config.sh
|
@ -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"
|
||||||
|
@ -48,18 +50,25 @@ function check_copy() {
|
||||||
# with an optional `$1/config.d/$2` file. This is useful for having
|
# with an optional `$1/config.d/$2` file. This is useful for having
|
||||||
# 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 : 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}
|
final_path=${CONFIG}/${m}/${FINAL_CONFIG}.${2}
|
||||||
|
rm -f ${final_path}
|
||||||
# Copy common config
|
# Copy common config
|
||||||
cp ${CONFIG}/${m}/${BASE_CONFIG} ${CONFIG}/${m}/${FINAL_CONFIG}
|
cp ${CONFIG}/${m}/${BASE_CONFIG} ${final_path}
|
||||||
echo "${CONFIG}/${m}/${FINAL_CONFIG} created"
|
echo "${final_path} created"
|
||||||
# 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"
|
if [ -z $3 ]; then
|
||||||
cat "${f}" >> ${CONFIG}/${m}/${FINAL_CONFIG}
|
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
|
done
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -70,43 +79,106 @@ function usage() {
|
||||||
exit 0
|
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
|
# Use XDG_CONFIG_HOME if defined, default otherwise
|
||||||
CONFIG=${XDG_CONFIG_HOME:-$HOME/.config}
|
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)"
|
# First thing to do, before symlinks
|
||||||
|
|
||||||
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
|
echo -e "\n=== Create symlink to *.${ENV} regular files ==="
|
||||||
echo -e "* Installing base Arch packages..."
|
# Take all specific files and create a symlink pointing to it without the extension
|
||||||
yay -Syu --needed --noconfirm - < ${CONFIG}/${ARCH_PACKAGES}/${FINAL_CONFIG}
|
# This file will be used by applications
|
||||||
echo -e "* Changing shell to ZSH..."
|
for f in `find ${CONFIG} -type f -name "*.${ENV}"`; do
|
||||||
chsh -s $(which zsh)
|
echo "${f%.*} → ${f}"
|
||||||
# https://man.archlinux.org/man/rofi-dmenu.5
|
ln -sf ${f} ${f%.*}
|
||||||
echo -e "* Symlink dmenu → rofi..."
|
done
|
||||||
sudo ln -s /usr/bin/rofi /usr/bin/dmenu
|
# Take care of config files at home level, outside ${CONFIG} (e.g. Xresources)
|
||||||
echo -e "* Enabling NetworkManager..."
|
for f in `find ${HOME} -maxdepth 1 -mindepth 1 -type f -name "*.${ENV}"`; do
|
||||||
sudo systemctl enable --now NetworkManager
|
echo "${f%.*} → ${f}"
|
||||||
fi
|
ln -sf ${f} ${f%.*}
|
||||||
|
done
|
||||||
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
|
|
||||||
for f in `find ${CONFIG} -type f -name "*.${ENV}"`; do
|
|
||||||
echo "${f%.*} → ${f}"
|
|
||||||
ln -sf ${f} ${f%.*}
|
|
||||||
done
|
|
||||||
# Take care of config files at home level, outside ${CONFIG} (e.g. Xresources)
|
|
||||||
for f in `find ${HOME} -maxdepth 1 -mindepth 1 -type f -name "*.${ENV}"`; do
|
|
||||||
echo "${f%.*} → ${f}"
|
|
||||||
ln -sf ${f} ${f%.*}
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo -e "\n=== Copy changed configuration which resides in outer directory ==="
|
echo -e "\n=== Copy changed configuration which resides in outer directory ==="
|
||||||
# Destination files are regular files
|
# Destination files are regular files
|
||||||
|
@ -115,19 +187,34 @@ 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 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
|
# Now copy to destination
|
||||||
sudo mkdir -p ${DEST}
|
real_dest=${DEST}/${subfolder}
|
||||||
check_copy "${config_file}" "sudo cp ${config_file} ${DEST}" "sudo rm ${DEST}/${config_file##*/}"
|
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
|
||||||
done
|
done
|
||||||
|
|
||||||
|
if [ ! -z "$INIT" ]; then
|
||||||
|
init_system
|
||||||
|
fi
|
||||||
|
|
||||||
if [ ! -z "${WM_RESTART}" ]; then
|
if [ ! -z "${WM_RESTART}" ]; then
|
||||||
echo -e "\n=== Restart graphical environment ==="
|
echo -e "\n=== Restart graphical environment ==="
|
||||||
# Reload i3 configuration
|
# Reload i3 configuration
|
||||||
i3-msg reload
|
i3-msg restart
|
||||||
|
|
||||||
# Restart picom due to this bug https://github.com/yshui/picom/issues/166
|
# Restart picom due to this bug https://github.com/yshui/picom/issues/166
|
||||||
killall picom; picom &>/dev/null &
|
killall picom
|
||||||
|
picom &>/dev/null &
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -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
|
|
@ -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
56
.zshrc
|
@ -1,11 +1,6 @@
|
||||||
# Path to your oh-my-zsh installation.
|
# Path to your oh-my-zsh installation.
|
||||||
export ZSH=/usr/share/oh-my-zsh
|
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.
|
# Uncomment the following line to use case-sensitive completion.
|
||||||
CASE_SENSITIVE="true"
|
CASE_SENSITIVE="true"
|
||||||
|
|
||||||
|
@ -19,6 +14,10 @@ COMPLETION_WAITING_DOTS="true"
|
||||||
# stamp shown in the history command output.
|
# stamp shown in the history command output.
|
||||||
# The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
|
# The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
|
||||||
HIST_STAMPS="dd.mm.yyyy"
|
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/*)
|
# 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/
|
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
|
||||||
|
@ -27,11 +26,7 @@ HIST_STAMPS="dd.mm.yyyy"
|
||||||
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
|
|
||||||
colorize
|
|
||||||
# commands to copy file content or absolute path to clipboard
|
# commands to copy file content or absolute path to clipboard
|
||||||
copyfile
|
copyfile
|
||||||
copypath
|
copypath
|
||||||
|
@ -41,10 +36,16 @@ plugins=(
|
||||||
docker
|
docker
|
||||||
# unique command for most archives
|
# unique command for most archives
|
||||||
extract
|
extract
|
||||||
|
# fish-like highlighting as you type
|
||||||
|
fast-syntax-highlighting
|
||||||
|
# fuzzy finder for history, files, docker, process, etc (see fzf)
|
||||||
|
fzf-zsh-plugin
|
||||||
# aliases
|
# aliases
|
||||||
git
|
git
|
||||||
# password-store autocomplete
|
# password-store autocomplete
|
||||||
pass
|
pass
|
||||||
|
# fish-like completion as you type
|
||||||
|
zsh-autosuggestions
|
||||||
)
|
)
|
||||||
|
|
||||||
# Enable option stacking in autocomplete, i.e. docker run -it <TAB>
|
# Enable option stacking in autocomplete, i.e. docker run -it <TAB>
|
||||||
|
@ -54,20 +55,41 @@ zstyle ':completion:*:*:docker-*:*' option-stacking yes
|
||||||
# Load ZSH
|
# Load ZSH
|
||||||
source $ZSH/oh-my-zsh.sh
|
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
|
# Preferred editor for local and remote sessions
|
||||||
export EDITOR=vim
|
export EDITOR=nvim
|
||||||
|
|
||||||
# Do not print user@hostname if user is myself
|
# Do not print user@hostname if user is myself
|
||||||
DEFAULT_USER=`whoami`
|
DEFAULT_USER=`whoami`
|
||||||
|
|
||||||
# Aliases
|
|
||||||
alias cp="cpv"
|
|
||||||
alias lt='ls -lath'
|
|
||||||
|
|
||||||
# To use when .cfg contains a bare git repo.
|
# 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/
|
# 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'
|
alias config='/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME'
|
||||||
config config --local status.showUntrackedFiles no
|
|
||||||
|
|
||||||
# GPG with SSH auth capabilities
|
# Use GPG key for SSH authentication
|
||||||
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)"
|
||||||
|
|
||||||
|
# Source aliases
|
||||||
|
if [ -f ~/.aliases ]; then
|
||||||
|
. ~/.aliases
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Source environment variables
|
||||||
|
if [ -f ~/.env ]; then
|
||||||
|
. ~/.env
|
||||||
|
fi
|
||||||
|
|
30
README.md
30
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 ?
|
||||||
|
|
||||||
|
@ -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 :
|
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)
|
* [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)
|
* 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
|
* [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)
|
* 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
|
||||||
|
* SSH keys to pull and push from Git repositories
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
|
@ -50,7 +54,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.
|
||||||
|
@ -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 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
|
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
|
||||||
```
|
```
|
||||||
|
@ -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 :
|
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.
|
||||||
|
|
||||||
### Install Git Hook
|
### 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
|
```sh
|
||||||
#!/bin/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.
|
`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.
|
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.
|
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