Compare commits

..
4 Commits
Author SHA1 Message Date
nnduc 2691744a84 Merge pull request '2027' (#3) from 2027 into main
Reviewed-on: #3
2026-07-16 02:57:15 +00:00
nnduc cc20ef2087 Merge branch 'main' into 2027 2026-07-16 02:56:48 +00:00
nnduc de4fd59f82 Merge pull request '2026' (#2) from 2026 into main
Reviewed-on: #2
2026-02-16 18:51:54 +00:00
nnduc a79592c91d Update sway/config 2026-02-16 07:16:19 +00:00
48 changed files with 1364 additions and 638 deletions
-38
View File
@@ -1,38 +0,0 @@
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
HISTFILE=~/.histfile
HISTSIZE=2000
SAVEHIST=2000
bindkey -v
# End of lines configured by zsh-newuser-install
# The following lines were added by compinstall
bindkey "\e[3~" delete-char
autoload -Uz compinit && compinit
zstyle ':completion:*' menu select
# End of lines added by compinstall
source /home/nnduc/git/powerlevel10k/powerlevel10k.zsh-theme
source /home/nnduc/git/zsh-autosuggestions/zsh-autosuggestions.zsh
zshaddhistory() {
whence ${${(z)1}[1]} >/dev/null || return 2
}
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
export EDITOR=nvim
export TERM='xterm-256color'
export PATH="$HOME/.local/bin:$PATH"
alias ls='ls --color=auto'
alias doc='docker-compose'
alias cla='cd /home/nnduc/.cache/ && claude'
alias wa="watch -n1 "sensors | grep -E 'Tctl|edge|junction|mem:|Composite'""
Executable → Regular
View File
-22
View File
@@ -1,22 +0,0 @@
# Shift_R+F12 shows/hides the HUD
no_display
toggle_hud=Shift_R+F12
fps
frametime
frame_timing
gpu_stats
cpu_stats
# diagnostics: log starts 20s after launch, Shift_L+F2 toggles logging
output_folder=/home/nnduc/mangologs
autostart_log=20
log_interval=0
toggle_logging=Shift_L+F2
gpu_core_clock
gpu_mem_clock
vram
ram
cpu_mhz
# fps
fps_limit=80,60,120,0
fps_limit_method=early
toggle_fps_limit=Shift_L+F1
Executable → Regular
-255
View File
@@ -33,264 +33,9 @@ Section "Device"
Driver "intel" Driver "intel"
Option "TearFree" "true" Option "TearFree" "true"
EndSection EndSection
```
- amd: xf86-video-amdgpu (`VariableRefresh` = FreeSync, fullscreen apps only under Xorg)
- sudo -e /etc/X11/xorg.conf.d/20-amdgpu.conf
```
Section "Device"
Identifier "AMD"
Driver "amdgpu"
Option "VariableRefresh" "true"
Option "TearFree" "true"
EndSection
```
## High refresh rate flicker (AMD):
- At high refresh rates (240Hz+) the vblank can be too short for the GPU to
switch VRAM clock unnoticed, so the desktop flickers under changing load.
Windows avoids it by keeping VRAM clock high; amdgpu on Linux may not.
- Check: if the `*` jumps between levels while idle, this is likely the cause.
```bash
watch -n0.2 cat /sys/class/drm/card*/device/pp_dpm_mclk
```
- Fix 1: run the desktop at a lower rate (`i3/config` uses 120Hz). Find the
output name with `xrandr` (e.g. `DisplayPort-0`) and adjust it there:
```bash
xrandr --output DisplayPort-0 --mode 1920x1080 --rate 120
```
- sway: same idea in `sway/config` (`swaymsg -t get_outputs` for the name).
Keep `adaptive_sync off` there — sway applies it to the whole desktop, which
can stutter/flicker:
```
output DP-1 mode 1920x1080@120Hz adaptive_sync off
```
- Fix 2: keep the high rate and pin VRAM clock to its top level (more idle
power, resets on reboot; top level is the last line of `pp_dpm_mclk`):
```bash
echo manual | sudo tee /sys/class/drm/card*/device/power_dpm_force_performance_level
echo 3 | sudo tee /sys/class/drm/card*/device/pp_dpm_mclk
```
- Gaming: 120Hz + FreeSync is plenty for ~60fps games (VRR covers the dips).
Cap fps a few below max refresh so VRR stays active, e.g. Dota 2 console
`fps_max 117`. Under Xorg, VRR applies to fullscreen games only; under sway
with `adaptive_sync off` games run without it.
- To turn off FreeSync for a single game (Xorg): `adaptive_sync=false %command%`
(Steam launch options).
- Login greeters (SDDM, LightDM, ...) are fullscreen and mostly static, so VRR
drops to the bottom of the range and flickers. `mesa/drirc` disables it for
any `*greeter*` executable; install system-wide (greeters don't read `~/.drirc`):
```bash
sudo cp xorg/20-amdgpu.conf /etc/X11/xorg.conf.d/
sudo cp mesa/drirc /etc/drirc
``` ```
![stones](./screenshots/Screenshot_20240503_095414.png) ![stones](./screenshots/Screenshot_20240503_095414.png)
## Shader cache (Steam)
With Steam's *Shader Pre-caching* off (it re-downloads caches for every game
almost daily), Steam points Mesa at a temporary
`~/.local/share/Steam/shader_cache_temp_dir_*` and deletes it when the game
exits, so every session recompiles shaders (hitches everywhere, every time).
Steam only sets the legacy `MESA_GLSL_CACHE_DIR`, so the newer variable wins.
Set it session-wide (i3 is started by SDDM, `environment.d` doesn't reach
Steam). The cache lives in `/var/cache` so `~/.cache` cleaners don't wipe it,
with one private subdir per user: Mesa creates its dirs `0700`, so a single
shared dir can't work (and would let users poison each other's shaders).
`/etc/environment` can't expand `$USER`, so use `/etc/profile.d` (SDDM's
X11/Wayland sessions and TTY logins source it). Run as your normal user, not
from a root shell (`~` and `$USER` must be yours), with Steam closed:
```bash
sudo mkdir -p /var/cache/mesa_shader_cache
sudo chmod 1777 /var/cache/mesa_shader_cache # like /tmp: anyone creates own subdir
mv ~/.cache/mesa_shader_cache /var/cache/mesa_shader_cache/$USER # no sudo: keeps ownership
sudo sed -i '/^MESA_SHADER_CACHE_/d' /etc/environment
sudo tee /etc/profile.d/mesa-shader-cache.sh >/dev/null <<'EOF'
export MESA_SHADER_CACHE_DIR="/var/cache/mesa_shader_cache/$USER"
export MESA_SHADER_CACHE_MAX_SIZE=10G
export PRESSURE_VESSEL_FILESYSTEMS_RW=/var/cache/mesa_shader_cache
EOF
```
The last line matters: Steam runs games (native and Proton) in the Steam
Linux Runtime container, which shares `$HOME` but gives the game its own empty
`/var`. Without it the cache is written to a tmpfs inside the container and
thrown away when the game exits.
Re-login, then check it's yours and persists after playing (should print > 0):
```bash
echo $MESA_SHADER_CACHE_DIR; ls -ld $MESA_SHADER_CACHE_DIR # owner must be you
find $MESA_SHADER_CACHE_DIR -mmin -60 -type f | wc -l
```
Deleting the cache is harmless: shaders just recompile (stutter) on first use.
## Installing dependencies
Package availability differs between distros — Arch has everything below in the
official/multilib repos, no AUR needed. Gentoo's main tree is missing a few
newer tools (noted below); those need the [GURU overlay](https://wiki.gentoo.org/wiki/Project:GURU)
or manual/cargo install.
### Window manager & session (both i3 and sway)
**Arch**
```bash
sudo pacman -S i3-wm i3status i3blocks sway swaybg swaylock swayidle \
waybar polybar rofi alacritty dex snixembed \
xss-lock xorg-xset xorg-xrandr xclip scrot imagemagick i3lock \
network-manager-applet blueman gnome-keyring polkit-gnome \
pipewire wireplumber pipewire-pulse pipewire-alsa pipewire-jack \
pasystray playerctl brightnessctl \
fcitx5 fcitx5-im fcitx5-configtool
```
**Gentoo**
```bash
sudo emerge --ask \
x11-wm/i3 x11-misc/i3status x11-misc/i3blocks \
gui-wm/sway gui-apps/swaybg gui-apps/swaylock gui-apps/swayidle \
gui-apps/waybar x11-misc/polybar x11-misc/rofi x11-terms/alacritty \
x11-misc/dex x11-misc/snixembed \
x11-misc/xss-lock x11-apps/xset x11-apps/xrandr x11-misc/xclip media-gfx/scrot \
media-gfx/imagemagick x11-misc/i3lock \
net-misc/networkmanager net-misc/network-manager-applet net-wireless/blueman \
app-crypt/gnome-keyring gnome-extra/polkit-gnome \
media-video/pipewire media-video/wireplumber media-sound/playerctl \
app-i18n/fcitx app-i18n/fcitx-qt app-i18n/fcitx-gtk
```
- `brightnessctl` is **not in the main Gentoo tree** — install from the GURU
overlay (`sudo emerge --ask brightnessctl`, after enabling GURU below) or
build from source. Add your user to the `video` and `input` groups either way.
- PipeWire's PulseAudio/ALSA/JACK compatibility on Gentoo is controlled by
USE flags (`pulseaudio`/`alsa`/`jack`... check `equery u media-video/pipewire`)
rather than separate packages.
- `pasystray` (systray volume icon) is not in the main tree either; the GURU
overlay or `pavucontrol` are common substitutes.
Enable the GURU overlay once, needed by several packages below:
```bash
sudo eselect repository enable guru
sudo emerge --sync guru
```
### Wayland screenshots, clipboard, and screen sharing (sway)
These are the pieces the Print-key bindings and screen sharing/recording in
`sway/config` depend on — without `xdg-desktop-portal-wlr` specifically,
no app (browser tab share, Discord, OBS) can capture the screen at all.
**Arch**
```bash
sudo pacman -S grim slurp wl-clipboard cliphist \
xdg-desktop-portal xdg-desktop-portal-wlr xdg-desktop-portal-gtk \
wf-recorder obs-studio
```
**Gentoo**
```bash
sudo emerge --ask \
gui-apps/grim gui-apps/slurp gui-apps/wl-clipboard \
sys-apps/xdg-desktop-portal gui-libs/xdg-desktop-portal-wlr sys-apps/xdg-desktop-portal-gtk \
media-video/wf-recorder media-video/obs-studio
```
- `cliphist` (clipboard history) is not in the main tree — GURU overlay.
After installing the portal packages, restart the portal service so it picks
up the new backend:
```bash
systemctl --user restart xdg-desktop-portal
```
### AMD GPU stack (mesa/RADV/amdgpu)
**Arch**
```bash
sudo pacman -S mesa lib32-mesa vulkan-radeon lib32-vulkan-radeon \
xf86-video-amdgpu linux-firmware-amdgpu libvdpau-va-gl
```
Mesa on current Arch already bundles the VA-API driver (`radeonsi_drv_video.so`)
and there's no separate `mesa-vdpau`/`lib32-mesa-vdpau` package anymore —
`libvdpau-va-gl` is the VDPAU-to-VA-API translation layer that replaces it.
**Gentoo**
```bash
# In /etc/portage/make.conf:
# VIDEO_CARDS="amdgpu radeonsi"
sudo emerge --ask media-libs/mesa media-libs/vulkan-loader \
x11-drivers/xf86-video-amdgpu media-video/libvdpau media-libs/libvdpau-va-gl
```
Make sure `mesa` is built with `USE="vulkan"` and, for 32-bit/Steam
compatibility, `ABI_X86="32 64"` in `package.use`.
### Gaming & performance
**Arch**
```bash
sudo pacman -S gamemode lib32-gamemode mangohud lib32-mangohud
```
**Gentoo**
```bash
sudo emerge --ask games-util/gamemode
```
- `mangohud` is **not in the main Gentoo tree** — GURU overlay
(`sudo emerge --ask games-util/mangohud` after enabling GURU).
Adaptive sync (sway): the desktop runs at a fixed 240 Hz with VRR off, because
sway only renders on change and idle frame rates fall below the panel's 48 Hz
floor (out of LFC range → flicker). gamemode turns VRR on for DP-1 while a
game runs and off when it exits (install `gamemode/gamemode.ini` to
`~/.config/gamemode.ini`); `lock-now` turns it off while locked.
### GPU monitoring & tuning
**Arch**
```bash
sudo pacman -S radeontop amdgpu_top nvtop lact lm_sensors
```
**Gentoo**
```bash
sudo emerge --ask app-misc/radeontop sys-process/nvtop sys-power/lm-sensors
```
- `amdgpu_top`, `lact`, and `corectrl` (fan curves/overclocking GUIs) are not
in the main tree — GURU overlay, or install `lact`/`amdgpu_top` via `cargo`
since both are Rust tools.
### Razer peripherals (polling rate, DPI, RGB)
**Arch**
```bash
sudo pacman -S openrazer-daemon openrazer-meta polychromatic
sudo gpasswd -a $USER plugdev
```
**Gentoo**
```bash
sudo emerge --ask sys-apps/openrazer
sudo gpasswd -a $USER plugdev
```
- Gentoo ships a single unified `sys-apps/openrazer` package (driver +
daemon together) rather than split `-daemon`/`-meta` packages.
`polychromatic` (GUI) is not in the main tree — GURU overlay.
### Notifications & fonts
**Arch**
```bash
sudo pacman -S ttf-firacode-nerd
# tiramisu (notification daemon) is AUR-only on Arch: yay -S tiramisu
```
**Gentoo**
```bash
sudo emerge --ask media-fonts/nerd-fonts
```
- `tiramisu` is not in the main Gentoo tree — GURU overlay or build from
source (https://github.com/Sweets/tiramisu).
### PipeWire launcher (Gentoo only)
`sway/config` calls `gentoo-pipewire-launcher`, the community launcher script
documented on the [Gentoo PipeWire wiki page](https://wiki.gentoo.org/wiki/PipeWire) —
it's a shell script you place on your `PATH` yourself, not a portage package.
## Vim ## Vim
### Vimplug ### Vimplug
Executable → Regular
View File
View File
Executable → Regular
View File
Executable → Regular
View File
+9 -24
View File
@@ -10,8 +10,8 @@
# Please see https://i3wm.org/docs/userguide.html for a complete reference! # Please see https://i3wm.org/docs/userguide.html for a complete reference!
set $mod Mod1 set $mod Mod1
set $wallpaper_dir /media/sync/images/wallpapers set $wallpaper_dir /sync/images/wallpapers
set $terminal 'alacritty' set $terminal 'wezterm'
# Font for window titles. Will also be used by the bar unless a different font # Font for window titles. Will also be used by the bar unless a different font
# is used in the bar {} block below. # is used in the bar {} block below.
font pango:NotoSans 12 font pango:NotoSans 12
@@ -20,11 +20,6 @@ font pango:NotoSans 12
# text rendering and scalability on retina/hidpi displays (thanks to pango). # text rendering and scalability on retina/hidpi displays (thanks to pango).
#font pango:DejaVu Sans Mono 8 #font pango:DejaVu Sans Mono 8
# Clear leftover Wayland env (e.g. from a previous Hyprland/sway session) out of
# systemd/dbus so dbus-activated apps like Thunar don't try to use a dead compositor.
# Must run before anything dbus-activated starts.
exec --no-startup-id sh -c "systemctl --user unset-environment WAYLAND_DISPLAY HYPRLAND_INSTANCE_SIGNATURE SWAYSOCK; dbus-update-activation-environment --systemd DISPLAY XAUTHORITY XDG_CURRENT_DESKTOP=i3 XDG_SESSION_TYPE=x11; pkill -x Thunar"
# Start XDG autostart .desktop files using dex. See also # Start XDG autostart .desktop files using dex. See also
# https://wiki.archlinux.org/index.php/XDG_Autostart # https://wiki.archlinux.org/index.php/XDG_Autostart
exec --no-startup-id dex --autostart --environment i3 exec --no-startup-id dex --autostart --environment i3
@@ -34,18 +29,16 @@ exec --no-startup-id dex --autostart --environment i3
#exec --no-startup-id /usr/bin/gnome-keyring-daemon --start --components=gpg,pkcs11,secrets,ssh #exec --no-startup-id /usr/bin/gnome-keyring-daemon --start --components=gpg,pkcs11,secrets,ssh
# xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the # xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the
# screen before suspend. Use systemctl lock-session to lock your screen. # screen before suspend. Use systemctl lock-session to lock your screen.
exec --no-startup-id xrandr --output HDMI-0 --mode 1920x1080 --rate 120
# idle: lock after 5min (xss-lock -> scripts/lock), DPMS off after 15min; # burn-in prevention: blank after 5min, DPMS off after 10min, skip lock if fullscreen
# dpms-inhibit skips all of it while a fullscreen window is visible
exec --no-startup-id xset b off exec --no-startup-id xset b off
exec --no-startup-id xset s noblank
exec --no-startup-id xset s 300 300 exec --no-startup-id xset s 300 300
exec --no-startup-id xset dpms 0 0 900 exec --no-startup-id xset dpms 300 600 900
exec --no-startup-id xss-lock -- ~/.config/i3/scripts/lock $wallpaper_dir exec --no-startup-id xss-lock -- ~/.config/i3/scripts/lock $wallpaper_dir
exec --no-startup-id ~/.config/i3/scripts/dpms-inhibit
bindsym $mod+l exec ~/.config/i3/scripts/lock-now $wallpaper_dir bindsym $mod+l exec ~/.config/i3/scripts/lock-now $wallpaper_dir
bindsym $mod+Shift+o exec --no-startup-id ~/.config/i3/scripts/lock-then-suspend $wallpaper_dir bindsym $mod+Shift+o exec systemctl suspend
bindsym $mod+Shift+p exec systemctl poweroff bindsym $mod+Shift+p exec systemctl poweroff
bindsym Print exec --no-startup-id bash -c 'f="$(xdg-user-dir PICTURES)/$(date +%s_scrot.png)" && scrot -s "$f" && xclip -selection clipboard -t image/png -i "$f" && notify-send "Screenshot saved" "$f"' bindsym Print exec --no-startup-id bash -c 'f="$(xdg-user-dir PICTURES)/$(date +%s_scrot.png)" && scrot -s "$f" && xclip -selection clipboard -t image/png -i "$f" && notify-send "Screenshot saved" "$f"'
@@ -54,16 +47,14 @@ bindsym $mod+Print exec --no-startup-id bash -c 'f="$(xdg-user-dir PICTURES)/$(d
# and nm-applet is a desktop environment-independent system tray GUI for it. # and nm-applet is a desktop environment-independent system tray GUI for it.
# applets # applets
exec --no-startup-id snixembed --fork exec --no-startup-id picom --config ~/.config/picom/picom.conf
exec --no-startup-id fcitx5 -d exec --no-startup-id fcitx5 -d
exec --no-startup-id nm-applet exec --no-startup-id nm-applet
exec --no-startup-id blueman-applet exec --no-startup-id blueman-applet
exec --no-startup-id /usr/bin/gnome-keyring-daemon --start --components=ssh,pkcs11 exec --no-startup-id /usr/bin/gnome-keyring-daemon --start --components=ssh,pkcs11
exec --no-startup-id /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
exec --no-startup-id ~/.config/i3/scripts/wallpaper-rotate $wallpaper_dir exec --no-startup-id ~/.config/i3/scripts/wallpaper-rotate $wallpaper_dir
exec --no-startup-id pasystray #exec --no-startup-id pasystray
exec --no-startup-id polybar exec --no-startup-id polybar
exec --no-startup-id ~/.config/i3/scripts/guide-freeze
set $refresh_i3status killall -SIGUSR1 i3status set $refresh_i3status killall -SIGUSR1 i3status
@@ -103,9 +94,6 @@ floating_modifier $mod
# or left-clicking anywhere into the window while holding the floating modifier. # or left-clicking anywhere into the window while holding the floating modifier.
#tiling_drag modifier titlebar #tiling_drag modifier titlebar
#xrandr --output HDMI-2 --auto --right-of eDP1 #xrandr --output HDMI-2 --auto --right-of eDP1
# High refresh rates can flicker on AMD (VRAM clock switching), so run the
# desktop at 120Hz. See README "High refresh rate flicker".
exec --no-startup-id xrandr --output DisplayPort-0 --mode 1920x1080 --rate 240
# start a terminal # start a terminal
#bindsym $mod+Return exec i3-sensible-terminal #bindsym $mod+Return exec i3-sensible-terminal
@@ -114,9 +102,6 @@ bindsym $mod+Return exec $terminal
# kill focused window # kill focused window
bindsym $mod+Shift+q kill bindsym $mod+Shift+q kill
# freeze / resume focused window (SIGSTOP / SIGCONT)
bindsym $mod+m exec --no-startup-id ~/.config/i3/scripts/freeze-toggle
# start dmenu (a program launcher) # start dmenu (a program launcher)
#bindsym $mod+d exec --no-startup-id j4-dmenu-desktop #bindsym $mod+d exec --no-startup-id j4-dmenu-desktop
#bindsym $mod+d exec --no-startup-id dmenu #bindsym $mod+d exec --no-startup-id dmenu
@@ -273,7 +258,7 @@ bindsym $mod+r mode "resize"
for_window [class="signal"] floating enable for_window [class="signal"] floating enable
for_window [class="Dino"] floating enable for_window [class="Dino"] floating enable
for_window [class="firefox"] move container to workspace 1 for_window [class="firefox"] move container to workspace 1
for_window [class="eu.betterbird.Betterbird"] move container to workspace 4 for_window [class="thunderbird"] move container to workspace 4
for_window [class="Thunar"] move container to workspace 3 for_window [class="Thunar"] move container to workspace 3
for_window [class="steam_app_1364781"] border none, fullscreen enable for_window [class="steam_app_1364781"] border none, fullscreen enable
Executable → Regular
View File
Executable → Regular
View File
+100
View File
@@ -0,0 +1,100 @@
#!/usr/bin/env bash
# audio-device-switch - audio device switch with a keybind
# Adapted from this:
# https://gist.githubusercontent.com/kbravh/1117a974f89cc53664e55823a55ac320/raw/9d04a10ae925074536047ae8100c6b0dbfc303d6/audio-device-switch.sh
# Readme: https://gist.github.com/kbravh/1117a974f89cc53664e55823a55ac320
# Creator: https://github.com/kbravh
# Audio Output Switcher
# This script will cycle to the next available audio output device.
# It can be tied to a hotkey to easily be triggered.
# This is handy, for example, for swapping between speakers and headphones.
# This script will work on systems running PulseAudio or Pipewire services.
# Check which sound server is running
if pgrep pulseaudio >/dev/null; then
sound_server="pulseaudio"
elif pgrep pipewire >/dev/null; then
sound_server="pipewire"
else
echo "Neither PulseAudio nor PipeWire is running."
exit 1
fi
# Grab a count of how many audio sinks we have
if [[ "$sound_server" == "pulseaudio" ]]; then
sink_count=$(pacmd list-sinks | grep -c "index:[[:space:]][[:digit:]]")
# Create an array of the actual sink IDs
sinks=()
mapfile -t sinks < <(pacmd list-sinks | grep 'index:[[:space:]][[:digit:]]' | sed -n -e 's/.*index:[[:space:]]\([[:digit:]]\)/\1/p')
# Get the ID of the active sink
active_sink=$(pacmd list-sinks | sed -n -e 's/[[:space:]]*\*[[:space:]]index:[[:space:]]\([[:digit:]]\)/\1/p')
elif [[ "$sound_server" == "pipewire" ]]; then
sink_count=$(pactl list sinks | grep -c "Sink #[[:digit:]]")
# Create an array of the actual sink IDs
sinks=()
mapfile -t sinks < <(pactl list sinks | grep 'Sink #[[:digit:]]' | sed -n -e 's/.*Sink #\([[:digit:]]\)/\1/p')
# Get the ID of the active sink
active_sink_name=$(pactl info | grep 'Default Sink:' | sed -n -e 's/.*Default Sink:[[:space:]]\+\(.*\)/\1/p')
active_sink=$(pactl list sinks | grep -B 2 "$active_sink_name" | sed -n -e 's/Sink #\([[:digit:]]\)/\1/p' | head -n 1)
fi
# Get the ID of the last sink in the array
final_sink=${sinks[$((sink_count - 1))]}
# Find the index of the active sink
for index in "${!sinks[@]}"; do
if [[ "${sinks[$index]}" == "$active_sink" ]]; then
active_sink_index=$index
fi
done
# Default to the first sink in the list
next_sink=${sinks[0]}
next_sink_index=0
# If we're not at the end of the list, move up the list
if [[ $active_sink -ne $final_sink ]]; then
next_sink_index=$((active_sink_index + 1))
next_sink=${sinks[$next_sink_index]}
fi
#change the default sink
if [[ "$sound_server" == "pulseaudio" ]]; then
pacmd "set-default-sink ${next_sink}"
elif [[ "$sound_server" == "pipewire" ]]; then
# Get the name of the next sink
next_sink_name=$(pactl list sinks | grep -C 2 "Sink #$next_sink" | sed -n -e 's/.*Name:[[:space:]]\+\(.*\)/\1/p' | head -n 1)
pactl set-default-sink "$next_sink_name"
fi
#move all inputs to the new sink
if [[ "$sound_server" == "pulseaudio" ]]; then
for app in $(pacmd list-sink-inputs | sed -n -e 's/index:[[:space:]]\([[:digit:]]\)/\1/p'); do
pacmd "move-sink-input $app $next_sink"
done
elif [[ "$sound_server" == "pipewire" ]]; then
for app in $(pactl list sink-inputs | sed -n -e 's/.*Sink Input #\([[:digit:]]\)/\1/p'); do
pactl "move-sink-input $app $next_sink"
done
fi
# Create a list of the sink descriptions
sink_descriptions=()
if [[ "$sound_server" == "pulseaudio" ]]; then
mapfile -t sink_descriptions < <(pacmd list-sinks | sed -n -e 's/.*alsa.name[[:space:]]=[[:space:]]"\(.*\)"/\1/p')
elif [[ "$sound_server" == "pipewire" ]]; then
mapfile -t sink_descriptions < <(pactl list sinks | sed -n -e 's/.*Description:[[:space:]]\+\(.*\)/\1/p')
fi
# Find the index that matches our new active sink
for sink_index in "${!sink_descriptions[@]}"; do
if [[ "$sink_index" == "$next_sink_index" ]]; then
notify-send -i audio-volume-high "Sound output switched to:" "${sink_descriptions[$sink_index]}"
exit
fi
done
+17
View File
@@ -0,0 +1,17 @@
#!/usr/bin/env bash
# script to monitor temperatures in waybar/i3blocks e.t.c.
# example only use `sensors` to find your names to replace `Tdie|Tctl|Package`
# example output part from sensors:
# zenpower-pci-00c3
# Adapter: PCI adapter
# SVI2_Core: 1.03 V
# SVI2_SoC: 994.00 mV
# Tdie: +53.1°C
# Tctl: +53.1°C
# Tccd1: +42.5°C
# Tccd2: +43.2°C
temp=$(sensors 2>/dev/null | grep -E 'Tdie|Tctl|Package id 0' | grep -oP '\+?[0-9]+\.\d+(?=°C)' | tr -d '+' | head -n1)
echo "${temp}°C"
-57
View File
@@ -1,57 +0,0 @@
#!/bin/bash
# Suspends xset screensaver/DPMS blanking while any visible workspace has a
# fullscreen window (video, game, presentation), restores normal timeouts
# once nothing is fullscreen.
interval="${1:-5}"
# Single-instance lock: i3 restarts/reloads re-run our autostart exec, so
# without this, stray duplicate loops accumulate and race each other's state.
# Per session, so a loop lingering from a logged-out session can't block this one.
exec 9>"/tmp/.dpms-inhibit-$(id -u)-${XDG_SESSION_ID:-0}.lock"
flock -n 9 || exit 0
has_fullscreen() {
python3 - <<'EOF'
import json, subprocess, sys
def is_fullscreen(node):
if node.get('window') and node.get('fullscreen_mode', 0) > 0: return True
return any(is_fullscreen(c) for c in node.get('nodes', []) + node.get('floating_nodes', []))
def find_ws(node, name):
if node.get('type') == 'workspace' and node.get('name') == name: return node
for c in node.get('nodes', []) + node.get('floating_nodes', []):
r = find_ws(c, name)
if r: return r
try:
wss = json.loads(subprocess.check_output(['i3-msg', '-t', 'get_workspaces'], stderr=subprocess.DEVNULL))
tree = json.loads(subprocess.check_output(['i3-msg', '-t', 'get_tree'], stderr=subprocess.DEVNULL))
for ws in wss:
if ws.get('visible'):
node = find_ws(tree, ws['name'])
if node and is_fullscreen(node):
sys.exit(0)
except Exception:
pass
sys.exit(1)
EOF
}
inhibited=0
while true; do
# our i3 is gone (logged out): don't linger into the next session
i3-msg -t get_version >/dev/null 2>&1 || exit 0
if has_fullscreen; then
xset s off
xset -dpms
inhibited=1
else
if [ "$inhibited" -eq 1 ]; then
xset s 300 300
xset dpms 0 0 900
inhibited=0
fi
fi
sleep "$interval"
done
+16
View File
@@ -0,0 +1,16 @@
#!/usr/bin/env bash
# Copyright (C) 2025 Johannes Kamprad
# SPDX-License-Identifier: GPL-3.0-or-later
# empty_workspace - open a new workspace automatically named with next number on i3
MAX_DESKTOPS=20
WORKSPACES=$(seq -s '\n' 1 1 ${MAX_DESKTOPS})
EMPTY_WORKSPACE=$( (i3-msg -t get_workspaces | tr ',' '\n' | grep num | awk -F: '{print int($2)}' ; \
echo -e ${WORKSPACES} ) | sort -n | uniq -u | head -n 1)
i3-msg workspace ${EMPTY_WORKSPACE}
-19
View File
@@ -1,19 +0,0 @@
#!/bin/bash
# Freeze / resume the focused window's process tree (SIGSTOP / SIGCONT).
pid=$(xdotool getactivewindow getwindowpid 2>/dev/null) || exit 1
# collect pid plus all descendants (Wine/Proton games spawn several)
descendants() {
local p
for p in $(pgrep -P "$1"); do
echo "$p"
descendants "$p"
done
}
pids="$pid $(descendants "$pid")"
name=$(ps -o comm= -p "$pid")
case "$(ps -o state= -p "$pid")" in
T*) kill -CONT $pids && notify-send -t 1500 "Resumed" "$name ($pid)" ;;
*) kill -STOP $pids && notify-send -t 1500 "Frozen" "$name ($pid)" ;;
esac
+17
View File
@@ -0,0 +1,17 @@
#!/usr/bin/env bash
# script to monitor temperatures in waybar/i3blocks e.t.c.
# example only use `sensors` to find your sensor to replace `i915-pci-0600`
# example output part from sensors:
# i915-pci-0600
# Adapter: PCI adapter
# in0: 630.00 mV
# fan1: 0 RPM
# temp1: +55.0°C
# energy1: 1.26 MJ
# examples using Nvidia tools:
#echo "$(nvidia-smi --format=csv,noheader --query-gpu=temperature.gpu) °C"
#echo "$(nvidia-settings -q gpucoretemp -t) °C"
# example using sensor name:
sensors 2>/dev/null | awk '/i915-pci-0600/{flag=1} flag && /temp1/ {gsub("\\+", "", $2); print $2, $3; exit}'
-50
View File
@@ -1,50 +0,0 @@
#!/usr/bin/env python3
# Freeze/resume the focused window on the controller's Home/guide button (BTN_MODE).
# Stdlib only: reads raw evdev events. Gamepads are readable by the seat user.
import glob, os, select, signal, struct, subprocess, time
EV_KEY, BTN_MODE = 1, 0x13c
EVENT = struct.Struct('llHHi') # struct input_event
LONG_BITS = struct.calcsize('l') * 8
CMD = [os.path.expanduser('~/.config/i3/scripts/freeze-toggle')]
signal.signal(signal.SIGCHLD, signal.SIG_IGN) # auto-reap child processes
def has_btn_mode(path):
try:
with open(f'/sys/class/input/{os.path.basename(path)}/device/capabilities/key') as f:
words = f.read().split()
except OSError:
return False
bits = 0
for w in words:
bits = bits << LONG_BITS | int(w, 16)
return bits >> BTN_MODE & 1
fds = {} # fd -> device path
last = 0.0
rescan = 0.0
while True:
if time.monotonic() >= rescan: # pick up hotplugged controllers
for path in glob.glob('/dev/input/event*'):
if path not in fds.values() and has_btn_mode(path):
try:
fds[os.open(path, os.O_RDONLY)] = path
except OSError:
pass
rescan = time.monotonic() + 2
ready, _, _ = select.select(list(fds), [], [], 2)
for fd in ready:
try:
data = os.read(fd, EVENT.size * 64)
except OSError: # controller unplugged
os.close(fd)
del fds[fd]
continue
for sec, usec, type_, code, value in EVENT.iter_unpack(data):
if type_ == EV_KEY and code == BTN_MODE and value == 1:
now = sec + usec / 1e6
if now - last < 0.4: # GuliKit's Home button double-fires ~10ms apart
continue
last = now
subprocess.Popen(CMD, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
+16
View File
@@ -0,0 +1,16 @@
#!/bin/sh
# needed for nwg-looks
# usage: import-gsettings
config="${XDG_CONFIG_HOME:-$HOME/.config}/gtk-3.0/settings.ini"
if [ ! -f "$config" ]; then exit 1; fi
gnome_schema="org.gnome.desktop.interface"
gtk_theme="$(grep 'gtk-theme-name' "$config" | cut -d'=' -f2)"
icon_theme="$(grep 'gtk-icon-theme-name' "$config" | cut -d'=' -f2)"
cursor_theme="$(grep 'gtk-cursor-theme-name' "$config" | cut -d'=' -f2)"
font_name="$(grep 'gtk-font-name' "$config" | cut -d'=' -f2)"
gsettings set "$gnome_schema" gtk-theme "$gtk_theme"
gsettings set "$gnome_schema" icon-theme "$icon_theme"
gsettings set "$gnome_schema" cursor-theme "$cursor_theme"
gsettings set "$gnome_schema" font-name "$font_name"
+10
View File
@@ -0,0 +1,10 @@
#!/bin/sh
# keyhint rofi tool to search used keybindings in i3wm
I3_CONFIG=$HOME/.config/i3/config
mod_key=$(sed -nre 's/^set \$mod (.*)/\1/p' ${I3_CONFIG})
grep "^bindsym" ${I3_CONFIG} \
| sed "s/-\(-\w\+\)\+//g;s/\$mod/${mod_key}/g;s/Mod1/Alt/g;s/exec //;s/bindsym //;s/^\s\+//;s/^\([^ ]\+\) \(.\+\)$/\2: \1/;s/^\s\+//" \
| tr -s ' ' \
| rofi -dmenu -theme ~/.config/rofi/rofikeyhint.rasi
+8 -2
View File
@@ -1,4 +1,10 @@
#!/bin/bash #!/bin/bash
# Invoked by xss-lock on idle (after 5min) and before suspend. Idle locking # Skip lock if a fullscreen window is active (game, video, etc.)
# during fullscreen is suppressed by dpms-inhibit. active=$(xprop -root _NET_ACTIVE_WINDOW 2>/dev/null | awk '{print $NF}')
if [ -n "$active" ] && [ "$active" != "0x0" ]; then
state=$(xprop -id "$active" _NET_WM_STATE 2>/dev/null)
if echo "$state" | grep -q "_NET_WM_STATE_FULLSCREEN"; then
exit 0
fi
fi
exec ~/.config/i3/scripts/lock-now "$1" exec ~/.config/i3/scripts/lock-now "$1"
-12
View File
@@ -1,12 +0,0 @@
#!/bin/bash
wall_dir="${1:?wallpaper directory required}"
img=$(find "$wall_dir" -type f \( -iname "*.jpg" -o -iname "*.jpeg" -o -iname "*.png" \) | shuf -n1)
tmp=/tmp/lockscreen.png
res=$(xrandr --current | awk '/ connected/ {getline; print $1; exit}')
: "${res:=1920x1080}"
if [ -n "$img" ] && convert "$img" -resize "${res}^" -gravity Center -extent "$res" "$tmp" 2>/dev/null; then
i3lock -i "$tmp"
else
i3lock -c 000000
fi
systemctl suspend
+95
View File
@@ -0,0 +1,95 @@
#!/usr/bin/env bash
# original source: https://gitlab.com/Nmoleo/i3-volume-brightness-indicator
# changed to use brightnessctl [xbacklight is non functional on modern hardware]
# by joekamprad [Aug 2025]
bar_color="#7f7fff"
volume_step=1
brightness_step=5
max_volume=100
notification_timeout=1000 # in ms
# Uses regex to get volume from pactl
function get_volume {
pactl get-sink-volume @DEFAULT_SINK@ | grep -Po '[0-9]{1,3}(?=%)' | head -1
}
# Uses regex to get mute status from pactl
function get_mute {
pactl get-sink-mute @DEFAULT_SINK@ | grep -Po '(?<=Mute: )(yes|no)'
}
# Uses brightnessctl instead of xbacklight
function get_brightness {
brightnessctl g | awk '{print int($1)}'
# You could also use: brightnessctl info | grep -Po '(?<=Current brightness: )[0-9]+'
}
# Calculates brightness percentage
function get_brightness_percent {
current=$(brightnessctl g)
max=$(brightnessctl m)
percent=$(( 100 * current / max ))
echo $percent
}
function get_volume_icon {
volume=$(get_volume)
mute=$(get_mute)
if [ "$volume" -eq 0 ] || [ "$mute" == "yes" ] ; then
volume_icon=""
elif [ "$volume" -lt 50 ]; then
volume_icon=""
else
volume_icon=""
fi
}
function get_brightness_icon {
brightness_icon=""
}
function show_volume_notif {
volume=$(get_volume)
get_volume_icon
notify-send -i volume_icon -t 1000 "Volume" "$volume_icon $volume%" -h int:value:$volume -h string:x-canonical-private-synchronous:volume
}
function show_brightness_notif {
get_brightness_icon
brightness=$(get_brightness_percent)
notify-send -i brightness_icon -t $notification_timeout -h string:x-dunst-stack-tag:brightness_notif -h int:value:$brightness "$brightness_icon $brightness%"
}
case $1 in
volume_up)
pactl set-sink-mute @DEFAULT_SINK@ 0
volume=$(get_volume)
if [ $(( "$volume" + "$volume_step" )) -gt $max_volume ]; then
pactl set-sink-volume @DEFAULT_SINK@ $max_volume%
else
pactl set-sink-volume @DEFAULT_SINK@ +$volume_step%
fi
show_volume_notif
;;
volume_down)
pactl set-sink-volume @DEFAULT_SINK@ -$volume_step%
show_volume_notif
;;
volume_mute)
pactl set-sink-mute @DEFAULT_SINK@ toggle
show_volume_notif
;;
brightness_up)
brightnessctl s +$brightness_step% > /dev/null
show_brightness_notif
;;
brightness_down)
brightnessctl s $brightness_step%- > /dev/null
show_brightness_notif
;;
esac
+168
View File
@@ -0,0 +1,168 @@
#!/usr/bin/env bash
# original source: https://gitlab.com/Nmoleo/i3-volume-brightness-indicator
# alternative to volume_brightness.sh that uses brightnessctl for both keyboard & screen brightness
# See README.md for usage instructions
volume_step=1
keyboard_brightness_step=20
screen_brightness_step=1
max_volume=100
notification_timeout=1000
# Specify Icon Theme here:
volume_theme_icon="audio-volume-high"
screen_brightness_theme_icon="display-brightness"
keyboard_brightness_theme_icon="display-brightness"
# Keyboard Backlight device detection here:
device_cache="/tmp/kbd_backlight_device"
if [ -f "$device_cache" ]; then
# If there is cache, load it into device
device=$(cat "$device_cache")
else
# If there is no cache, create one
device=$(brightnessctl --list | grep -Po '\w+::kbd_backlight')
echo "$device" > "$device_cache"
fi
# Uses regex to get volume from pactl
function get_volume {
pactl get-sink-volume @DEFAULT_SINK@ | grep -Po '[0-9]{1,3}(?=%)' | head -1
}
# Uses regex to get mute status from pactl
function get_mute {
pactl get-sink-mute @DEFAULT_SINK@ | grep -Po '(?<=Mute: )(yes|no)'
}
# Get keyboard_brightness from brightnessctl
function get_keyboard_brightness {
if [ -n "$device" ]; then
keyboard_curr=$(brightnessctl -d "$device" get)
keyboard_max=$(brightnessctl -d "$device" max)
echo $(( keyboard_curr * 100 / keyboard_max))
fi
}
# Grabs screen brightness and formats it out of 100
function get_screen_brightness {
screen_curr=$(brightnessctl -q get)
screen_max=$(brightnessctl -q max)
echo $(( screen_curr * 100 / screen_max ))
}
# Returns a mute icon, a volume-low icon, or a volume-high icon, depending on the volume
function get_volume_icon {
volume=$(get_volume)
mute=$(get_mute)
if [ "$volume" -eq 0 ] || [ "$mute" == "yes" ] ; then
volume_icon=""
elif [ "$volume" -lt 50 ] ; then
volume_icon=""
else
volume_icon=""
fi
}
# Always returns the same icon - I couldn't get the brightness-low icon to work with fontawesome
function get_keyboard_brightness_icon {
kb_brightness=$(get_keyboard_brightness)
if [ "$kb_brightness" -eq 0 ] ; then
keyboard_brightness_icon="" # unfilled circle
elif [ "$kb_brightness" -lt 50 ] ; then
keyboard_brightness_icon="" # fa-adjust (low brightness)
else
keyboard_brightness_icon="" # full circle (high brightness)
fi
}
function get_screen_brightness_icon {
sc_brightness=$(get_screen_brightness)
if [ "$sc_brightness" -eq 0 ] ; then
screen_brightness_icon="" # unfilled circle
elif [ "$sc_brightness" -lt 50 ] ; then
screen_brightness_icon="" # fa-adjust (low brightness)
else
screen_brightness_icon="" # full circle (high brightness)
fi
}
# Displays a volume notification using notify-send
function show_volume_notif {
mute=$(get_mute)
volume=$(get_volume)
get_volume_icon
notify-send -i $volume_theme_icon -t $notification_timeout "Volume" "$volume_icon $volume%" -h int:value:$volume -h string:x-canonical-private-synchronous:volume
}
# Displays a keyboard_brightness notification
function show_keyboard_brightness_notif {
keyboard_brightness=$(get_keyboard_brightness)
# Debug Purposes:
# echo $keyboard_brightness
get_keyboard_brightness_icon
notify-send -i $keyboard_brightness_theme_icon -t $notification_timeout "Keyboard Brightness" -h string:x-dunst-stack-tag:keyboard_brightness_notif -h int:value:$keyboard_brightness "$keyboard_brightness_icon $keyboard_brightness%"
}
# Displays a screen_brightness notification
function show_screen_brightness_notif {
screen_brightness=$(get_screen_brightness)
# Debug Purposes:
# echo $screen_brightness
get_screen_brightness_icon
notify-send -i $screen_brightness_theme_icon -t $notification_timeout "Screen Brightness" -h string:x-dunst-stack-tag:screen_brightness_notif -h int:value:$screen_brightness "$screen_brightness_icon $screen_brightness%"
}
# Main function - Takes user input, "volume_up", "volume_down", "keyboard_brightness_up", "keyboard_brightness_down", "brightness_up", or "brightness_down"
case $1 in
volume_up)
# Unmutes and increases volume, then displays the notification
pactl set-sink-mute @DEFAULT_SINK@ 0
volume=$(get_volume)
if [ $(( "$volume" + "$volume_step" )) -gt $max_volume ]; then
pactl set-sink-volume @DEFAULT_SINK@ $max_volume%
else
pactl set-sink-volume @DEFAULT_SINK@ +$volume_step%
fi
show_volume_notif
;;
volume_down)
# Raises volume and displays the notification
pactl set-sink-volume @DEFAULT_SINK@ -$volume_step%
show_volume_notif
;;
volume_mute)
# Toggles mute and displays the notification
pactl set-sink-mute @DEFAULT_SINK@ toggle
show_volume_notif
;;
keyboard_brightness_up)
# Increases keyboard brightness and displays the notification
brightnessctl -d "$device" set ${keyboard_brightness_step}+
show_keyboard_brightness_notif
;;
keyboard_brightness_down)
# Decreases keyboard brightness and displays the notification
brightnessctl -d "$device" set ${keyboard_brightness_step}-
show_keyboard_brightness_notif
;;
screen_brightness_up)
# Increases screen brightness and displays the notification
brightnessctl -q set ${screen_brightness_step}%+
show_screen_brightness_notif
;;
screen_brightness_down)
# Decreases screen brightness and displays the notification
brightnessctl -q set ${screen_brightness_step}%-
show_screen_brightness_notif
;;
esac
+1 -1
View File
@@ -13,7 +13,7 @@ has_fullscreen() {
import json, subprocess, sys import json, subprocess, sys
def is_fullscreen(node): def is_fullscreen(node):
if node.get('window') and node.get('fullscreen_mode', 0) > 0: return True if node.get('fullscreen_mode', 0) > 0: return True
return any(is_fullscreen(c) for c in node.get('nodes', []) + node.get('floating_nodes', [])) return any(is_fullscreen(c) for c in node.get('nodes', []) + node.get('floating_nodes', []))
def find_ws(node, name): def find_ws(node, name):
-7
View File
@@ -1,7 +0,0 @@
<driconf>
<device>
<application name="Login greeters" executable_regexp=".*greeter.*">
<option name="adaptive_sync" value="false" />
</application>
</device>
</driconf>
Executable → Regular
+3 -6
View File
@@ -24,7 +24,7 @@ vim.opt.updatetime = 250
vim.opt.undofile = true vim.opt.undofile = true
-------------------- Clipboard -------------------- -------------------- Clipboard --------------------
--vim.opt.clipboard = 'unnamedplus' vim.opt.clipboard = 'unnamedplus'
vim.g.clipboard = { vim.g.clipboard = {
name = 'OSC 52', name = 'OSC 52',
@@ -41,9 +41,8 @@ vim.keymap.set("v", "<leader>y", '"+y')
vim.keymap.set("n", "<leader>Y", '"+yg_') vim.keymap.set("n", "<leader>Y", '"+yg_')
vim.keymap.set("n", "<leader>y", '"+y') vim.keymap.set("n", "<leader>y", '"+y')
vim.keymap.set("n", "<leader>yy", '"+yy') vim.keymap.set("n", "<leader>yy", '"+yy')
-- "+p/"+P dropped: OSC52 paste blocks 1-10s waiting for a terminal response vim.keymap.set("n", "<leader>p", '"+p')
-- most SSH clients never send. Plain p/P already pastes the last yank via vim.keymap.set("n", "<leader>P", '"+P')
-- the unnamed register, instantly.
-------------------- Keymaps -------------------- -------------------- Keymaps --------------------
vim.keymap.set("n", "i", ":nohls<CR>i", { silent = true }) vim.keymap.set("n", "i", ":nohls<CR>i", { silent = true })
@@ -106,5 +105,3 @@ if vim.fn.executable("rg") == 1 then
vim.opt.grepprg = "rg --vimgrep --smart-case" vim.opt.grepprg = "rg --vimgrep --smart-case"
vim.opt.grepformat = "%f:%l:%c:%m" vim.opt.grepformat = "%f:%l:%c:%m"
end end
Executable → Regular
+1 -14
View File
@@ -52,7 +52,7 @@ vim.keymap.set("n", "<leader>P", '"+P')
-- Background toogling -- Background toogling
vim.keymap.set("n", "<leader>bg", function() vim.keymap.set("n", "<leader>bg", function()
vim.o.background = vim.o.background == "dark" and "light" or "dark" vim.o.background = vim.o.background == "dark" and "light" or "dark"
end, { desc = "Toggle light/dark background" }) end, { desc = "Toggle light/dark background" })
-- Join paragraph -- Join paragraph
@@ -224,17 +224,4 @@ require("lazy").setup({
-- Julia -- Julia
{ "JuliaEditorSupport/julia-vim" }, { "JuliaEditorSupport/julia-vim" },
{
dir = "/home/nnduc/git/vim-uk",
event = "VeryLazy",
build = "cmake -S . -B build -DCMAKE_BUILD_TYPE=Release && cmake --build build -j",
opts = {
input_method = "vni",
toggle_key = "<leader>v",
},
config = function(_, opts)
require("uknvim").setup(opts)
end,
},
}) })
Executable → Regular
+12 -12
View File
@@ -1,20 +1,20 @@
{ {
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" }, "Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
"coq.artifacts": { "branch": "artifacts", "commit": "d545035d06408f2d68cd03bc401425e42c298fc4" }, "coq.artifacts": { "branch": "artifacts", "commit": "ef5f21d638ccc456cfa5b8d0ab37093cefe48c8b" },
"coq.thirdparty": { "branch": "3p", "commit": "a021e24f1ff538d339aece0de80d621b68862701" }, "coq.thirdparty": { "branch": "3p", "commit": "2bd969a2bcd2624f9c260b1000957c7e665e308e" },
"coq_nvim": { "branch": "coq", "commit": "0cdbf99893729c5ffa74064382efc53364d7045d" }, "coq_nvim": { "branch": "coq", "commit": "d939a34ceb2b57d2937890337a4aa75eb55e18a8" },
"fzf-lua": { "branch": "main", "commit": "78b85d2a522b1e6a2d154216b3e532a1df1ad6d7" }, "fzf-lua": { "branch": "main", "commit": "d9508cc1d05ffcdc91a32dfd38fc1013a56b20da" },
"gruvbox.nvim": { "branch": "main", "commit": "154eb5ff5b96d0641307113fa385eaf0d36d9796" }, "gruvbox.nvim": { "branch": "main", "commit": "334d5fd49fc8033f26408425366c66c6390c57bb" },
"julia-vim": { "branch": "master", "commit": "52b30547346b21bc93acda28d626795667f9e087" }, "julia-vim": { "branch": "master", "commit": "52b30547346b21bc93acda28d626795667f9e087" },
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" }, "lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
"lualine.nvim": { "branch": "master", "commit": "221ce6b2d999187044529f49da6554a92f740a96" }, "lualine.nvim": { "branch": "master", "commit": "47f91c416daef12db467145e16bed5bbfe00add8" },
"nvim-autopairs": { "branch": "master", "commit": "430522f95fe4fb7c511ec64f8c1a90cc6a66c05c" }, "nvim-autopairs": { "branch": "master", "commit": "59bce2eef357189c3305e25bc6dd2d138c1683f5" },
"nvim-bqf": { "branch": "main", "commit": "c282a62bec6c0621a1ef5132aa3f4c9fc4dcc2c7" }, "nvim-bqf": { "branch": "main", "commit": "f65fba733268ffcf9c5b8ac381287eca7c223422" },
"nvim-lspconfig": { "branch": "master", "commit": "a9bb4d5f4276aa5cddc015faa3ecc5a7b5a26b14" }, "nvim-lspconfig": { "branch": "master", "commit": "0203a9608d63eda57679b01e69f33a7b4c34b0d1" },
"nvim-tree.lua": { "branch": "master", "commit": "478c69c0fe253caea88de9c5e138bfa77395a59a" }, "nvim-tree.lua": { "branch": "master", "commit": "4b30847c91d498446cb8440c03031359b045e050" },
"nvim-web-devicons": { "branch": "master", "commit": "58447c1fca354bbf184425e4a8d01deecbd6f3c4" }, "nvim-web-devicons": { "branch": "master", "commit": "d7462543c9e366c0d196c7f67a945eaaf5d99414" },
"vim-fugitive": { "branch": "master", "commit": "3b753cf8c6a4dcde6edee8827d464ba9b8c4a6f0" }, "vim-fugitive": { "branch": "master", "commit": "3b753cf8c6a4dcde6edee8827d464ba9b8c4a6f0" },
"vim-ime": { "branch": "master", "commit": "79e3b02eb50a57305113550be7ca163b267b5e30" }, "vim-ime": { "branch": "master", "commit": "79e3b02eb50a57305113550be7ca163b267b5e30" },
"viml-surround": { "branch": "master", "commit": "98358bad347aa2b8a180c2edde84c3bd8a51fdd1" }, "viml-surround": { "branch": "master", "commit": "98358bad347aa2b8a180c2edde84c3bd8a51fdd1" },
"vimtex": { "branch": "master", "commit": "16a5609d17a436db7f48046d91747fd6a9d75c74" } "vimtex": { "branch": "master", "commit": "82d2305ff71dfb3bd91602534cc9bb9a195bcb38" }
} }
Executable → Regular
View File
Executable → Regular
View File
Executable → Regular
View File
+15
View File
@@ -0,0 +1,15 @@
backend = "xrender";
vsync = true;
use-damage = true;
# games bypass picom entirely when fullscreen
unredir-if-possible = true;
# no effects — featherweight
shadow = false;
fading = false;
blur-background = false;
corner-radius = 0;
detect-transient = true;
detect-client-leader = true;
+476
View File
@@ -0,0 +1,476 @@
# Simple daemon config file for PipeWire version "1.2.3" #
#
# Copy and edit this file in /etc/pipewire for system-wide changes
# or in ~/.config/pipewire for local changes.
#
# It is also possible to place a file with an updated section in
# /etc/pipewire/minimal.conf.d/ for system-wide changes or in
# ~/.config/pipewire/minimal.conf.d/ for local changes.
#
context.properties = {
## Configure properties in the system.
#library.name.system = support/libspa-support
#context.data-loop.library.name.system = support/libspa-support
#support.dbus = true
#link.max-buffers = 64
link.max-buffers = 16 # version < 3 clients can't handle more
#mem.warn-mlock = false
#mem.allow-mlock = true
#mem.mlock-all = false
#clock.power-of-two-quantum = true
#log.level = 2
#cpu.zero.denormals = false
core.daemon = true # listening for socket connections
core.name = pipewire-0 # core name and socket name
## Properties for the DSP configuration.
#default.clock.rate = 48000
#default.clock.allowed-rates = [ 48000 ]
#default.clock.quantum = 1024
#default.clock.min-quantum = 32
#default.clock.max-quantum = 2048
#default.clock.quantum-limit = 8192
#default.clock.quantum-floor = 4
#default.video.width = 640
#default.video.height = 480
#default.video.rate.num = 25
#default.video.rate.denom = 1
#
settings.check-quantum = true
settings.check-rate = true
# This config can use udev or hardcoded ALSA devices. Make sure to
# change the alsa device below when disabling udev
minimal.use-udev = true
# Load the pulseaudio emulation daemon
minimal.use-pulse = true
}
context.properties.rules = [
{ matches = [ { cpu.vm.name = !null } ]
actions = {
update-props = {
# These overrides are only applied when running in a vm.
default.clock.min-quantum = 1024
}
}
}
]
context.spa-libs = {
#<factory-name regex> = <library-name>
#
# Used to find spa factory names. It maps an spa factory name
# regular expression to a library name that should contain
# that factory.
#
audio.convert.* = audioconvert/libspa-audioconvert
audio.adapt = audioconvert/libspa-audioconvert
api.alsa.* = alsa/libspa-alsa
support.* = support/libspa-support
}
context.modules = [
#{ name = <module-name>
# ( args = { <key> = <value> ... } )
# ( flags = [ ( ifexists ) ( nofail ) ] )
# ( condition = [ { <key> = <value> ... } ... ] )
#}
#
# Loads a module with the given parameters.
# If ifexists is given, the module is ignored when it is not found.
# If nofail is given, module initialization failures are ignored.
#
# Uses realtime scheduling to boost the audio thread priorities. This uses
# RTKit if the user doesn't have permission to use regular realtime
# scheduling.
{ name = libpipewire-module-rt
args = {
nice.level = -11
rt.prio = 88
#rt.time.soft = -1
#rt.time.hard = -1
}
flags = [ ifexists nofail ]
}
# The native communication protocol.
{ name = libpipewire-module-protocol-native }
# The profile module. Allows application to access profiler
# and performance data. It provides an interface that is used
# by pw-top and pw-profiler.
{ name = libpipewire-module-profiler }
# Allows applications to create metadata objects. It creates
# a factory for Metadata objects.
{ name = libpipewire-module-metadata }
# Creates a factory for making nodes that run in the
# context of the PipeWire server.
{ name = libpipewire-module-spa-node-factory }
{ name = libpipewire-module-spa-device-factory }
# Allows creating nodes that run in the context of the
# client. Is used by all clients that want to provide
# data to PipeWire.
{ name = libpipewire-module-client-node }
# The access module can perform access checks and block
# new clients.
{ name = libpipewire-module-access
args = {
# access.allowed to list an array of paths of allowed
# apps.
#access.allowed = [
# /usr/bin/pipewire-media-session
#]
# An array of rejected paths.
#access.rejected = [ ]
# An array of paths with restricted access.
#access.restricted = [ ]
# Anything not in the above lists gets assigned the
# access.force permission.
#access.force = flatpak
}
}
# Makes a factory for wrapping nodes in an adapter with a
# converter and resampler.
{ name = libpipewire-module-adapter }
# Makes a factory for creating links between ports.
{ name = libpipewire-module-link-factory }
{ name = libpipewire-module-protocol-pulse
condition = [ { minimal.use-pulse = true } ]
}
]
pulse.properties = {
# the addresses this server listens on
server.address = [
"unix:native"
]
}
stream.properties = {
adapter.auto-port-config = { mode = dsp }
}
context.objects = [
#{ factory = <factory-name>
# ( args = { <key> = <value> ... } )
# ( flags = [ ( nofail ) ] )
# ( condition = [ { <key> = <value> ... } ... ] )
#}
#
# Creates an object from a PipeWire factory with the given parameters.
# If nofail is given, errors are ignored (and no object is created).
#
#{ factory = spa-node-factory args = { factory.name = videotestsrc node.name = videotestsrc node.description = videotestsrc "Spa:Pod:Object:Param:Props:patternType" = 1 } }
#{ factory = spa-device-factory args = { factory.name = api.jack.device foo=bar } flags = [ nofail ] }
#{ factory = spa-device-factory args = { factory.name = api.alsa.enum.udev } }
#{ factory = spa-node-factory args = { factory.name = api.alsa.seq.bridge node.name = Internal-MIDI-Bridge } }
#{ factory = adapter args = { factory.name = audiotestsrc node.name = my-test node.description = audiotestsrc } }
#{ factory = spa-node-factory args = { factory.name = api.vulkan.compute.source node.name = my-compute-source } }
# Make a default metadata store
{ factory = metadata
args = {
metadata.name = default
# metadata.values = [
# { key = default.audio.sink value = { name = somesink } }
# { key = default.audio.source value = { name = somesource } }
# ]
}
}
# A default dummy driver. This handles nodes marked with the "node.always-process"
# property when no other driver is currently active. JACK clients need this.
{ factory = spa-node-factory
args = {
factory.name = support.node.driver
node.name = Dummy-Driver
node.group = pipewire.dummy
priority.driver = 20000
}
}
{ factory = spa-node-factory
args = {
factory.name = support.node.driver
node.name = Freewheel-Driver
priority.driver = 19000
node.group = pipewire.freewheel
node.freewheel = true
#freewheel.wait = 10
}
}
# This creates a ALSA udev device that will enumerate all
# ALSA devices. Because it is using ACP and has the auto-profile
# property set, this will enable a profile and create associated
# nodes, which will be automatically configured to their best
# configuration with the auto-port-config settings.
# Extra node and device params can be given with node.param and
# device.param prefixes.
{ factory = spa-device-factory
args = {
factory.name = api.alsa.enum.udev
alsa.use-acp = true
device.object.properties = {
api.acp.auto-profile = true
api.acp.auto-port = true
device.object.properties = {
node.adapter = audio.adapt
resample.disable = false
adapter.auto-port-config = {
mode = dsp
monitor = false
control = false
position = preserve # unknown, aux
}
#node.param.Props = {
# channelVolumes = [ 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.6 ]
#}
}
#device.param.Profile = {
# #idx = 0
# name = pro-audio
#}
}
}
condition = [ { minimal.use-udev = true } ]
}
# This creates a single PCM source device for the given
# alsa device path hw:0. You can change source to sink
# to make a sink in the same way.
{ factory = adapter
args = {
factory.name = api.alsa.pcm.source
node.name = "system"
node.description = "system"
media.class = "Audio/Source"
api.alsa.path = "hw:4"
#api.alsa.period-size = 0
#api.alsa.period-num = 0
#api.alsa.headroom = 0
#api.alsa.start-delay = 0
#api.alsa.disable-mmap = false
#api.alsa.disable-batch = false
#api.alsa.use-chmap = false
#api.alsa.multirate = true
#latency.internal.rate = 0
#latency.internal.ns = 0
#clock.name = api.alsa.0
node.suspend-on-idle = false
#audio.format = "S32"
#audio.rate = 48000
#audio.allowed-rates = [ ]
#audio.channels = 4
#audio.position = [ FL FR RL RR ]
#resample.quality = 4
resample.disable = true
#monitor.channel-volumes = false
#channelmix.normalize = false
#channelmix.mix-lfe = true
#channelmix.upmix = true
#channelmix.upmix-method = psd # none, simple
#channelmix.lfe-cutoff = 150
#channelmix.fc-cutoff = 12000
#channelmix.rear-delay = 12.0
#channelmix.stereo-widen = 0.0
#channelmix.hilbert-taps = 0
#channelmix.disable = false
#dither.noise = 0
#node.param.Props = {
# params = [
# audio.channels 6
# ]
#}
adapter.auto-port-config = {
mode = dsp
monitor = false
control = false
position = unknown # aux, preserve
}
#node.param.PortConfig = {
# direction = Output
# mode = dsp
# format = {
# mediaType = audio
# mediaSubtype = raw
# format = F32
# rate = 48000
# channels = 4
# position = [ FL FR RL RR ]
# }
#}
#node.param.Props = {
# channelVolumes = [ 0.5 0.4 0.3 0.5 ]
#}
}
condition = [ { minimal.use-udev = false } ]
}
{ factory = adapter
args = {
factory.name = api.alsa.pcm.sink
node.name = "system"
node.description = "system"
media.class = "Audio/Sink"
api.alsa.path = "hw:4"
#api.alsa.period-size = 0
#api.alsa.period-num = 0
#api.alsa.headroom = 0
#api.alsa.start-delay = 0
#api.alsa.disable-mmap = false
#api.alsa.disable-batch = false
#api.alsa.use-chmap = false
#api.alsa.multirate = true
#latency.internal.rate = 0
#latency.internal.ns = 0
#clock.name = api.alsa.0
node.suspend-on-idle = false
#audio.format = "S32"
#audio.rate = 48000
#audio.allowed-rates = [ ]
#audio.channels = 2
#audio.position = "FL,FR"
#resample.quality = 4
resample.disable = true
#channelmix.normalize = false
#channelmix.mix-lfe = true
#channelmix.upmix = true
#channelmix.upmix-method = psd # none, simple
#channelmix.lfe-cutoff = 150
#channelmix.fc-cutoff = 12000
#channelmix.rear-delay = 12.0
#channelmix.stereo-widen = 0.0
#channelmix.hilbert-taps = 0
#channelmix.disable = false
#dither.noise = 0
#node.param.Props = {
# params = [
# audio.format S16
# ]
#}
adapter.auto-port-config = {
mode = dsp
monitor = false
control = false
position = unknown # aux, preserve
}
#node.param.PortConfig = {
# direction = Input
# mode = dsp
# monitor = true
# format = {
# mediaType = audio
# mediaSubtype = raw
# format = F32
# rate = 48000
# channels = 4
# }
#}
#node.param.Props = {
# channelVolumes = [ 0.5 0.4 0.3 0.5 ]
#}
}
condition = [ { minimal.use-udev = false } ]
}
# This creates a new Source node. It will have input ports
# that you can link, to provide audio for this source.
#{ factory = adapter
# args = {
# factory.name = support.null-audio-sink
# node.name = "my-mic"
# node.description = "Microphone"
# media.class = "Audio/Source/Virtual"
# audio.position = "FL,FR"
# monitor.passthrough = true
# adapter.auto-port-config = {
# mode = dsp
# monitor = true
# position = preserve # unknown, aux, preserve
# }
# }
#}
# This creates a new link between the source and the virtual
# source ports.
#{ factory = link-factory
# args = {
# link.output.node = system
# link.output.port = capture_1
# link.input.node = my-mic
# link.input.port = input_FL
# }
#}
#{ factory = link-factory
# args = {
# link.output.node = system
# link.output.port = capture_2
# link.input.node = my-mic
# link.input.port = input_FR
# }
#}
]
context.exec = [
#{ path = <program-name>
# ( args = "<arguments>" | [ <arg1> <arg2> ... ] )
# ( condition = [ { <key> = <value> ... } ... ] )
#}
#
# Execute the given program with arguments.
#
# You can optionally start the pulseaudio-server here as well
# but it is better to start it as a systemd service.
# It can be interesting to start another daemon here that listens
# on another address with the -a option (eg. -a tcp:4713).
#
##{ path = "/usr/bin/pipewire" args = "-c pipewire-pulse.conf" }
]
node.rules = [
{ matches = [
{
# all keys must match the value. ! negates. ~ starts regex.
#alsa.card_name = "ICUSBAUDIO7D"
#api.alsa.pcm.stream = "playback"
}
]
actions = {
update-props = {
#node.name = "alsa_playback.ICUSBAUDIO7D"
}
}
}
]
device.rules = [
{ matches = [
{
#alsa.card_name = "ICUSBAUDIO7D"
}
]
actions = {
update-props = {
#device.name = "alsa_card.ICUSBAUDIO7D"
#api.acp.auto-profile = false
#api.acp.auto-port = false
#device.param.Profile = {
# #idx = 0
# name = off
#}
}
}
}
]
+345
View File
@@ -0,0 +1,345 @@
# Daemon config file for PipeWire version "1.2.3" #
#
# Copy and edit this file in /etc/pipewire for system-wide changes
# or in ~/.config/pipewire for local changes.
#
# It is also possible to place a file with an updated section in
# /etc/pipewire/pipewire.conf.d/ for system-wide changes or in
# ~/.config/pipewire/pipewire.conf.d/ for local changes.
#
context.properties = {
## Configure properties in the system.
#library.name.system = support/libspa-support
#context.data-loop.library.name.system = support/libspa-support
#support.dbus = true
#link.max-buffers = 64
link.max-buffers = 16 # version < 3 clients can't handle more
mem.warn-mlock = true # Gentoo should have good RLIMITs now
#mem.allow-mlock = true
#mem.mlock-all = false
#clock.power-of-two-quantum = true
#log.level = 2
#cpu.zero.denormals = false
#loop.rt-prio = -1 # -1 = use module-rt prio, 0 disable rt
#loop.class = data.rt
#thread.affinity = [ 0 1 ] # optional array of CPUs
#context.num-data-loops = 1 # -1 = num-cpus, 0 = no data loops
#
#context.data-loops = [
# { loop.rt-prio = -1
# loop.class = [ data.rt audio.rt ]
# #library.name.system = support/libspa-support
# thread.name = data-loop.0
# #thread.affinity = [ 0 1 ] # optional array of CPUs
# }
#]
core.daemon = true # listening for socket connections
core.name = pipewire-0 # core name and socket name
## Properties for the DSP configuration.
default.clock.rate = 44100
default.clock.rates = [ 44100 96000 192000 384000]
default.clock.allowed-rates = [ 44100 96000 192000 384000]
#default.clock.quantum = 1024
#default.clock.min-quantum = 32
#default.clock.max-quantum = 2048
#default.clock.quantum-limit = 8192
#default.clock.quantum-floor = 4
#default.video.width = 640
#default.video.height = 480
#default.video.rate.num = 25
#default.video.rate.denom = 1
#
#settings.check-quantum = false
#settings.check-rate = false
# keys checked below to disable module loading
module.x11.bell = true
# enables autoloading of access module, when disabled an alternative
# access module needs to be loaded.
module.access = true
# enables autoloading of module-jackdbus-detect
module.jackdbus-detect = true
}
context.properties.rules = [
{ matches = [ { cpu.vm.name = !null } ]
actions = {
update-props = {
# These overrides are only applied when running in a vm.
default.clock.min-quantum = 1024
}
}
}
]
context.spa-libs = {
#<factory-name regex> = <library-name>
#
# Used to find spa factory names. It maps an spa factory name
# regular expression to a library name that should contain
# that factory.
#
audio.convert.* = audioconvert/libspa-audioconvert
avb.* = avb/libspa-avb
api.alsa.* = alsa/libspa-alsa
api.v4l2.* = v4l2/libspa-v4l2
api.libcamera.* = libcamera/libspa-libcamera
api.bluez5.* = bluez5/libspa-bluez5
api.vulkan.* = vulkan/libspa-vulkan
api.jack.* = jack/libspa-jack
support.* = support/libspa-support
video.convert.* = videoconvert/libspa-videoconvert
#videotestsrc = videotestsrc/libspa-videotestsrc
#audiotestsrc = audiotestsrc/libspa-audiotestsrc
}
context.modules = [
#{ name = <module-name>
# ( args = { <key> = <value> ... } )
# ( flags = [ ( ifexists ) ( nofail ) ] )
# ( condition = [ { <key> = <value> ... } ... ] )
#}
#
# Loads a module with the given parameters.
# If ifexists is given, the module is ignored when it is not found.
# If nofail is given, module initialization failures are ignored.
# If condition is given, the module is loaded only when the context
# properties all match the match rules.
#
# Uses realtime scheduling to boost the audio thread priorities. This uses
# RTKit if the user doesn't have permission to use regular realtime
# scheduling. You can also clamp utilisation values to improve scheduling
# on embedded and heterogeneous systems, e.g. Arm big.LITTLE devices.
{ name = libpipewire-module-rt
args = {
nice.level = -11
rt.prio = 88
#rt.time.soft = -1
#rt.time.hard = -1
#uclamp.min = 0
#uclamp.max = 1024
}
flags = [ ifexists nofail ]
}
# The native communication protocol.
{ name = libpipewire-module-protocol-native
args = {
# List of server Unix sockets, and optionally permissions
#sockets = [ { name = "pipewire-0" }, { name = "pipewire-0-manager" } ]
}
}
# The profile module. Allows application to access profiler
# and performance data. It provides an interface that is used
# by pw-top and pw-profiler.
{ name = libpipewire-module-profiler }
# Allows applications to create metadata objects. It creates
# a factory for Metadata objects.
{ name = libpipewire-module-metadata }
# Creates a factory for making devices that run in the
# context of the PipeWire server.
{ name = libpipewire-module-spa-device-factory }
# Creates a factory for making nodes that run in the
# context of the PipeWire server.
{ name = libpipewire-module-spa-node-factory }
# Allows creating nodes that run in the context of the
# client. Is used by all clients that want to provide
# data to PipeWire.
{ name = libpipewire-module-client-node }
# Allows creating devices that run in the context of the
# client. Is used by the session manager.
{ name = libpipewire-module-client-device }
# The portal module monitors the PID of the portal process
# and tags connections with the same PID as portal
# connections.
{ name = libpipewire-module-portal
flags = [ ifexists nofail ]
}
# The access module can perform access checks and block
# new clients.
{ name = libpipewire-module-access
args = {
# Socket-specific access permissions
#access.socket = { pipewire-0 = "default", pipewire-0-manager = "unrestricted" }
# Deprecated legacy mode (not socket-based),
# for now enabled by default if access.socket is not specified
#access.legacy = true
}
condition = [ { module.access = true } ]
}
# Makes a factory for wrapping nodes in an adapter with a
# converter and resampler.
{ name = libpipewire-module-adapter }
# Makes a factory for creating links between ports.
{ name = libpipewire-module-link-factory }
# Provides factories to make session manager objects.
{ name = libpipewire-module-session-manager }
# Use libcanberra to play X11 Bell
{ name = libpipewire-module-x11-bell
args = {
#sink.name = "@DEFAULT_SINK@"
#sample.name = "bell-window-system"
#x11.display = null
#x11.xauthority = null
}
flags = [ ifexists nofail ]
condition = [ { module.x11.bell = true } ]
}
{ name = libpipewire-module-jackdbus-detect
args = {
#jack.library = libjack.so.0
#jack.server = null
#jack.client-name = PipeWire
#jack.connect = true
#tunnel.mode = duplex # source|sink|duplex
source.props = {
#audio.channels = 2
#midi.ports = 1
#audio.position = [ FL FR ]
# extra sink properties
}
sink.props = {
#audio.channels = 2
#midi.ports = 1
#audio.position = [ FL FR ]
# extra sink properties
}
}
flags = [ ifexists nofail ]
condition = [ { module.jackdbus-detect = true } ]
}
]
context.objects = [
#{ factory = <factory-name>
# ( args = { <key> = <value> ... } )
# ( flags = [ ( nofail ) ] )
# ( condition = [ { <key> = <value> ... } ... ] )
#}
#
# Creates an object from a PipeWire factory with the given parameters.
# If nofail is given, errors are ignored (and no object is created).
# If condition is given, the object is created only when the context properties
# all match the match rules.
#
#{ factory = spa-node-factory args = { factory.name = videotestsrc node.name = videotestsrc node.description = videotestsrc "Spa:Pod:Object:Param:Props:patternType" = 1 } }
#{ factory = spa-device-factory args = { factory.name = api.jack.device foo=bar } flags = [ nofail ] }
#{ factory = spa-device-factory args = { factory.name = api.alsa.enum.udev } }
#{ factory = spa-node-factory args = { factory.name = api.alsa.seq.bridge node.name = Internal-MIDI-Bridge } }
#{ factory = adapter args = { factory.name = audiotestsrc node.name = my-test node.description = audiotestsrc } }
#{ factory = spa-node-factory args = { factory.name = api.vulkan.compute.source node.name = my-compute-source } }
# A default dummy driver. This handles nodes marked with the "node.always-process"
# property when no other driver is currently active. JACK clients need this.
{ factory = spa-node-factory
args = {
factory.name = support.node.driver
node.name = Dummy-Driver
node.group = pipewire.dummy
node.sync-group = sync.dummy
priority.driver = 200000
#clock.id = monotonic # realtime | tai | monotonic-raw | boottime
#clock.name = "clock.system.monotonic"
}
}
{ factory = spa-node-factory
args = {
factory.name = support.node.driver
node.name = Freewheel-Driver
priority.driver = 190000
node.group = pipewire.freewheel
node.sync-group = sync.dummy
node.freewheel = true
#freewheel.wait = 10
}
}
# This creates a new Source node. It will have input ports
# that you can link, to provide audio for this source.
#{ factory = adapter
# args = {
# factory.name = support.null-audio-sink
# node.name = "my-mic"
# node.description = "Microphone"
# media.class = "Audio/Source/Virtual"
# audio.position = "FL,FR"
# monitor.passthrough = true
# }
#}
# This creates a single PCM source device for the given
# alsa device path hw:0. You can change source to sink
# to make a sink in the same way.
#{ factory = adapter
# args = {
# factory.name = api.alsa.pcm.source
# node.name = "alsa-source"
# node.description = "PCM Source"
# media.class = "Audio/Source"
# api.alsa.path = "hw:0"
# api.alsa.period-size = 1024
# api.alsa.headroom = 0
# api.alsa.disable-mmap = false
# api.alsa.disable-batch = false
# audio.format = "S16LE"
# audio.rate = 48000
# audio.channels = 2
# audio.position = "FL,FR"
# }
#}
# Use the metadata factory to create metadata and some default values.
#{ factory = metadata
# args = {
# metadata.name = my-metadata
# metadata.values = [
# { key = default.audio.sink value = { name = somesink } }
# { key = default.audio.source value = { name = somesource } }
# ]
# }
#}
]
context.exec = [
#{ path = <program-name>
# ( args = "<arguments>" | [ <arg1> <arg2> ... ] )
# ( condition = [ { <key> = <value> ... } ... ] )
#}
#
# Execute the given program with arguments.
# If condition is given, the program is executed only when the context
# properties all match the match rules.
#
# You can optionally start the session manager here,
# but it is better to start it as a systemd service.
# Run the session manager with -h for options.
#
#{ path = "/usr/bin/pipewire-media-session" args = ""
# condition = [ { exec.session-manager = null } { exec.session-manager = true } ] }
#
# You can optionally start the pulseaudio-server here as well
# but it is better to start it as a systemd service.
# It can be interesting to start another daemon here that listens
# on another address with the -a option (eg. -a tcp:4713).
#
#{ path = "/usr/bin/pipewire" args = [ "-c" "pipewire-pulse.conf" ]
# condition = [ { exec.pipewire-pulse = null } { exec.pipewire-pulse = true } ] }
]
View File

Before

Width:  |  Height:  |  Size: 3.1 MiB

After

Width:  |  Height:  |  Size: 3.1 MiB

View File

Before

Width:  |  Height:  |  Size: 3.0 MiB

After

Width:  |  Height:  |  Size: 3.0 MiB

View File

Before

Width:  |  Height:  |  Size: 3.1 MiB

After

Width:  |  Height:  |  Size: 3.1 MiB

Executable → Regular
+26 -54
View File
@@ -14,56 +14,40 @@ set $mod Mod1
#set $up k #set $up k
#set $right l #set $right l
# Your preferred terminal emulator # Your preferred terminal emulator
set $term alacritty set $term xfce4-terminal
# Your preferred application launcher # Your preferred application launcher
# Note: pass the final command to swaymsg so that the resulting window can be opened # Note: pass the final command to swaymsg so that the resulting window can be opened
# on the original workspace that the command was run on. # on the original workspace that the command was run on.
#set $menu wofi --show drun #set $menu wofi --show drun
set $menu rofi -show drun set $menu rofi -show drun
# Font for window titles.
font pango:DejaVu Sans Mono 8
### Output configuration ### Output configuration
# #
set $wallpaper_dir /media/sync/images/wallpapers # Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/)
set $screenlock '~/.config/sway/scripts/lock-now $wallpaper_dir' set $bg /data/sync/images/wallpapers/0002.png
set $screenlock 'swaylock -i $bg'
set $images $(xdg-user-dir PICTURES)/$(date +'%s_grim.png')
# #
exec --no-startup-id ~/.config/sway/scripts/wallpaper-rotate $wallpaper_dir exec --no-startup-id swaybg -m fill -i $bg
# Example configuration: # Example configuration:
# #
#output HDMI-A-1 resolution 1920x1080@120hz position 1920,0 #output HDMI-A-1 resolution 1920x1080@120hz position 1920,0
# #
# You can get the names of your outputs by running: swaymsg -t get_outputs # You can get the names of your outputs by running: swaymsg -t get_outputs
# adaptive_sync on the desktop makes sway stutter/flicker; 120Hz avoids AMD
# VRAM clock flicker at high refresh (see README).
output DP-1 mode 1920x1080@240Hz adaptive_sync off allow_tearing yes
#output DP-1 mode 1920x1080@240Hz adaptive_sync on allow_tearing yes
### Idle configuration ### Idle configuration
# #
# Import the compositor socket into the systemd --user environment. Without
# this, systemd-managed services (and dbus-activated apps like portals) can't
# reach the compositor at all - this is why swayidle silently failed to run
# after being restarted via systemd earlier.
exec --no-startup-id systemctl --user import-environment WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP DISPLAY
exec --no-startup-id hash dbus-update-activation-environment 2>/dev/null && dbus-update-activation-environment --systemd WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP DISPLAY
# gamemoded keeps the env it started with (e.g. from an i3 session); restart it
# so its swaymsg hooks (~/.config/gamemode.ini) can reach this sway.
exec --no-startup-id systemctl --user import-environment SWAYSOCK && systemctl --user try-restart gamemoded
#
# Example configuration: # Example configuration:
# #
exec swayidle -w \ exec swayidle -w \
timeout 300 $screenlock \ timeout 900 $screenlock \
timeout 900 'swaymsg "output * power off"' resume 'swaymsg "output * power on"' \ timeout 1800 'swaymsg "output * power off"' resume 'swaymsg "output * power on"' \
before-sleep $screenlock before-sleep $screenlock
# #
# This will lock your screen after 300 seconds (5 min) of inactivity, then # This will lock your screen after 300 seconds of inactivity, then turn off
# turn off your displays after 900 seconds (15 min), and turn your screens # your displays after another 300 seconds, and turn your screens back on when
# back on when resumed. It will also lock your screen before your computer # resumed. It will also lock your screen before your computer goes to sleep.
# goes to sleep.
### Input configuration ### Input configuration
input "type:touchpad" { input "type:touchpad" {
@@ -86,10 +70,7 @@ exec swayidle -w \
input "2:7:SynPS/2_Synaptics_TouchPad" { input "2:7:SynPS/2_Synaptics_TouchPad" {
events disabled_on_external_mouse events disabled_on_external_mouse
} }
input "type:pointer" { input "5426:156:Razer_Razer_DeathAdder_V2_X_HyperSpeed" {
accel_profile "flat" # no mouse acceleration for all pointers
}
input "5426:156:Razer_Razer_DeathAdder_V2_X_HyperSpeed_Mouse" {
accel_profile "flat" # disable mouse acceleration (enabled by default; to set it manually, use "adaptive" instead of "flat") accel_profile "flat" # disable mouse acceleration (enabled by default; to set it manually, use "adaptive" instead of "flat")
pointer_accel 0.5 # set mouse sensitivity (between -1 and 1) pointer_accel 0.5 # set mouse sensitivity (between -1 and 1)
} }
@@ -136,8 +117,8 @@ bindsym $mod+Shift+comma exec playerctl previous
bindsym $mod+Shift+period exec playerctl next bindsym $mod+Shift+period exec playerctl next
bindsym $mod+Shift+slash exec playerctl play-pause bindsym $mod+Shift+slash exec playerctl play-pause
bindsym Print exec --no-startup-id bash -c 'f="$(xdg-user-dir PICTURES)/$(date +%s_grim.png)" && grim -g "$(slurp)" "$f" && wl-copy < "$f" && notify-send "Screenshot saved" "$f"' bindsym Print exec grim -g "$(slurp)" - | wl-copy
bindsym $mod+Print exec --no-startup-id bash -c 'f="$(xdg-user-dir PICTURES)/$(date +%s_grim.png)" && grim "$f" && wl-copy < "$f" && notify-send "Screenshot saved" "$f"' bindsym $mod+Print exec grim -o $images
### Key bindings ### Key bindings
# #
# Basics: # Basics:
@@ -151,19 +132,16 @@ bindsym $mod+Shift+q kill
# Start your launcher # Start your launcher
bindsym $mod+d exec $menu bindsym $mod+d exec $menu
# #
bindsym $mod+l exec ~/.config/sway/scripts/lock-now $wallpaper_dir bindsym $mod+l exec $screenlock
bindsym $mod+Shift+o exec ~/.config/sway/scripts/lock-now $wallpaper_dir && systemctl suspend
# Drag floating windows by holding down $mod and left mouse button. # Drag floating windows by holding down $mod and left mouse button.
# Resize them with right mouse button + $mod. # Resize them with right mouse button + $mod.
# Despite the name, also works for non-floating windows. # Despite the name, also works for non-floating windows.
# Change normal to inverse to use left mouse button for resizing and right # Change normal to inverse to use left mouse button for resizing and right
# mouse button for dragging. # mouse button for dragging.
floating_modifier $mod floating_modifier $mod normal
# Reload the configuration file # Reload the configuration file
bindsym $mod+Shift+c reload bindsym $mod+Shift+c reload
# restart sway in place (preserves your layout/session, can be used to upgrade sway)
bindsym $mod+Shift+r restart
# Exit sway (logs you out of your Wayland session) # Exit sway (logs you out of your Wayland session)
#bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit' #bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit'
@@ -219,10 +197,10 @@ bindsym $mod+Shift+0 move container to workspace number 10
# Layout stuff: # Layout stuff:
# #
# You can "split" the current object of your focus with # You can "split" the current object of your focus with
# $mod+h or $mod+v, for horizontal and vertical splits # $mod+b or $mod+v, for horizontal and vertical splits
# respectively. # respectively.
bindsym $mod+h split h bindsym $mod+b splith
bindsym $mod+v split v bindsym $mod+v splitv
# Switch the current container between different layout styles # Switch the current container between different layout styles
bindsym $mod+s layout stacking bindsym $mod+s layout stacking
@@ -230,7 +208,7 @@ bindsym $mod+w layout tabbed
bindsym $mod+e layout toggle split bindsym $mod+e layout toggle split
# Make the current focus fullscreen # Make the current focus fullscreen
bindsym $mod+Shift+space fullscreen toggle bindsym $mod+Shift+space fullscreen
# Toggle the current focus between tiling and floating mode # Toggle the current focus between tiling and floating mode
bindsym $mod+f floating toggle bindsym $mod+f floating toggle
@@ -281,21 +259,15 @@ mode "resize" {
} }
bindsym $mod+r mode "resize" bindsym $mod+r mode "resize"
# Status bar is provided by waybar (started above); no built-in sway bar. #
# Status Bar:
# class border bground text indicator child_border #
client.focused #3A7CA5 #3A7CA5 #E2EBF0 #0D1B27 #3A7CA5 # Read `man 5 sway-bar` for more information about this section.
client.placeholder #0D1B27 #0D1B27 #BDD5E4 #0D1B27 #0D1B27 bar {
client.unfocused #0D1B27 #152535 #6A8DA0 #0D1B27 #152535 }
client.focused_inactive #1A3347 #1A3347 #6A8DA0 #1A3347 #1A3347
for_window [class="^.*"] border pixel 1 for_window [class="^.*"] border pixel 1
# Don't lock or blank the screen while a fullscreen window (game, video,
# presentation) is focused - ties into the same idle protocol swayidle uses.
for_window [app_id="^.*"] inhibit_idle fullscreen
for_window [class="^.*"] inhibit_idle fullscreen
#floating #floating
for_window [app_id="signal"] floating enable for_window [app_id="signal"] floating enable
for_window [app_id="fluffychat"] floating enable for_window [app_id="fluffychat"] floating enable
Executable → Regular
View File
-8
View File
@@ -1,8 +0,0 @@
#!/bin/bash
wall_dir="${1:?wallpaper directory required}"
img=$(find "$wall_dir" -type f \( -iname "*.jpg" -o -iname "*.jpeg" -o -iname "*.png" \) | shuf -n1)
swaymsg -q output DP-1 adaptive_sync off # lock screen redraws rarely: fixed 240 Hz
swaylock -f ${img:+-i "$img"}
# once unlocked, turn VRR back on if a game (gamemode) is still running
( while pgrep -x swaylock >/dev/null; do sleep 1; done
gamemoded -s | grep -q 'is active' && swaymsg -q output DP-1 adaptive_sync on ) &
-48
View File
@@ -1,48 +0,0 @@
#!/bin/bash
wall_dir="${1:?wallpaper directory required}"
interval="${2:-1800}"
pick_wall() {
find "$wall_dir" -type f \( -iname "*.jpg" -o -iname "*.jpeg" -o -iname "*.png" \) | shuf -n1
}
set_wall() {
[ -n "$1" ] || return
pkill -x swaybg
swaybg -m fill -i "$1" &
}
has_fullscreen() {
python3 - <<'EOF'
import json, subprocess, sys
def is_fullscreen(node):
if node.get('window') and node.get('fullscreen_mode', 0) > 0: return True
return any(is_fullscreen(c) for c in node.get('nodes', []) + node.get('floating_nodes', []))
def find_ws(node, name):
if node.get('type') == 'workspace' and node.get('name') == name: return node
for c in node.get('nodes', []) + node.get('floating_nodes', []):
r = find_ws(c, name)
if r: return r
try:
wss = json.loads(subprocess.check_output(['swaymsg', '-t', 'get_workspaces'], stderr=subprocess.DEVNULL))
tree = json.loads(subprocess.check_output(['swaymsg', '-t', 'get_tree'], stderr=subprocess.DEVNULL))
for ws in wss:
if ws.get('visible'):
node = find_ws(tree, ws['name'])
if node and is_fullscreen(node):
sys.exit(0)
except Exception:
pass
sys.exit(1)
EOF
}
# Initial wallpaper
set_wall "$(pick_wall)"
while sleep "$interval"; do
has_fullscreen || set_wall "$(pick_wall)"
done
Executable → Regular
+2 -1
View File
@@ -1,4 +1,5 @@
# Background image is picked at lock time by scripts/lock-now (-i flag) # Set a background image
image=/data/sync/images/wallpapers/0002.png
# Set the scaling mode for the image # Set the scaling mode for the image
scaling=fill scaling=fill
Executable → Regular
-1
View File
@@ -23,7 +23,6 @@
"clock": { "clock": {
// "timezone": "America/New_York", // "timezone": "America/New_York",
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>", "tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
"format": "{:%Y-%m-%d %H:%M}",
"format-alt": "{:%Y-%m-%d %H:%M}" "format-alt": "{:%Y-%m-%d %H:%M}"
}, },
"bluetooth": { "bluetooth": {
Executable → Regular
View File
+26
View File
@@ -0,0 +1,26 @@
local wezterm = require 'wezterm'
local config = wezterm.config_builder()
-- Font
config.font = wezterm.font '0xProto Nerd Font'
config.font_size = 14
-- Appearance
config.color_scheme = 'Gruvbox Material (Gogh)'
config.enable_tab_bar = false
config.window_padding = {
left = 4, right = 4, top = 4, bottom = 4,
}
-- IME (set to whatever you use)
config.use_ime = true
-- config.xim_im_name = 'fcitx' -- uncomment and adjust if needed
-- Scrollback
config.scrollback_lines = 10000
-- OSC 52 — on by default, but explicit is fine
config.enable_kitty_keyboard = false -- avoid surprising keybinds
return config
-5
View File
@@ -1,5 +0,0 @@
Section "Device"
Identifier "AMD"
Driver "amdgpu"
Option "VariableRefresh" "true"
EndSection
Executable → Regular
-1
View File
@@ -1,2 +1 @@
set selection-clipboard clipboard set selection-clipboard clipboard
set guioptions "sh"