This commit is contained in:
2026-03-02 14:00:15 +01:00
parent d3076e7d99
commit ec2bc1b1e0
12 changed files with 74 additions and 51 deletions
+1 -1
View File
@@ -79,7 +79,7 @@ This setup is currently only adapted for Niri.
## Wallpaper & Colortheme
- [wallpaper-carousel](https://github.com/Uyanide/Wallpaper_Carousel): an Image Carousel implemented with Qt Widgets to browse and set wallpapers from.
- [WallReel](https://github.com/Uyanide/WallReel): an Image Carousel implemented with QtQuick to browse and set wallpapers from.
- [wallpaper-daemon](./config/scripts/.local/scripts/wallpaper-daemon): automatic blur (only works in niri).
- [change-wallpaper](./config/scripts/.local/scripts/change-wallpaper): script that changes wallpaper with a few extra features.
- [change-colortheme](./config/scripts/.local/scripts/change-colortheme): script that extract colors from the current wallpaper and generate a catppuccin color scheme accordingly.
+1 -1
View File
@@ -19,7 +19,7 @@ binds {
Mod+Shift+Return { spawn "wezterm"; }
Mod+T { spawn "kitty"; }
Mod+Return { spawn "kitty"; }
Mod+Shift+W { spawn "wallpaper-carousel"; }
Mod+Shift+W { spawn "wallreel"; }
Mod+O { spawn-sh "pkill -x -n pwvucontrol || pwvucontrol"; }
// Quickshell
+1 -1
View File
@@ -1,7 +1,7 @@
screenshot-path "~/Pictures/Screenshots/niri_screenshot_%Y-%m-%d_%H-%M-%S.png"
debug {
render-drm-device "/dev/dri/renderD129"
render-drm-device "/dev/dri/renderD128"
}
// gestures {
+1 -5
View File
@@ -1,5 +1 @@
environment {
__NV_PRIME_RENDER_OFFLOAD "1"
__VK_LAYER_NV_optimus "NVIDIA_only"
__GLX_VENDOR_LIBRARY_NAME "nvidia"
}
@@ -6,9 +6,9 @@ pragma Singleton
Singleton {
id: root
readonly property string primary: "Sour Gummy Light"
readonly property string primary: "LXGW WenKai"
readonly property string nerd: "Meslo LGM Nerd Font Mono"
readonly property string sans: "Noto Sans"
readonly property string sans: "LXGW WenKai"
readonly property int small: Style.fontSizeS
readonly property int medium: Style.fontSizeM
readonly property int large: Style.fontSizeL
@@ -9,13 +9,13 @@ Singleton {
readonly property string recordingDir: CacheService.recordingDir
property bool isRecording: false
property bool isStopping: false
readonly property string codec: "av1_nvenc"
readonly property string codec: "libx264"
readonly property string container: "mkv"
readonly property string pixelFormat: "p010le"
readonly property string pixelFormat: "yuv420p"
property string recordingDisplay: ""
readonly property int framerate: 60
readonly property var codecParams: Object.freeze([
"preset=p4", "rc=constqp", "qp=18",
"preset=ultrafast", "crf=15", "tune=zerolatency",
"color_range=tv"
])
readonly property var filterArgs: ""
@@ -331,15 +331,15 @@ def main():
for script in SCRIPTS[app]:
tasks.append(executor.submit(run_script, script, script_args))
subprocess.run(
[
"notify-send",
"-a",
"change-colortheme",
"Colortheme Changed",
f"Palette: {palette_name}\nFlavor: {flavor}\nApplied to {success_count} apps",
]
)
# subprocess.run(
# [
# "notify-send",
# "-a",
# "change-colortheme",
# "Colortheme Changed",
# f"Palette: {palette_name}\nFlavor: {flavor}\nApplied to {success_count} apps",
# ]
# )
if __name__ == "__main__":
+15 -6
View File
@@ -19,7 +19,7 @@ exec {LOCK_FD}>/tmp/"$(basename "$0")".lock
flock -n "$LOCK_FD" || {
echo "Another instance is running. Exiting."
notify-send -a "change-wallpaper" "Error" "Another instance is running. Exiting."
# notify-send -a "change-wallpaper" "Error" "Another instance is running. Exiting."
exit 1
}
@@ -120,7 +120,7 @@ blurred_cache_image="$blur_cache_dir/${hash}.${wallpaper_ext}"
if [ "$XDG_CURRENT_DESKTOP" = "niri" ]; then
swww img -n backdrop "$blurred_image" --transition-type fade --transition-duration 2 >/dev/null 2>/dev/null
fi
notify-send -a "change-wallpaper" "Blurred Wallpaper Applied" "$blurred_image" -i "$blurred_image"
# notify-send -a "change-wallpaper" "Blurred Wallpaper Applied" "$blurred_image" -i "$blurred_image"
}
### Check if cached blurred image exists
@@ -166,19 +166,28 @@ blurred_cache_image="$blur_cache_dir/${hash}.${wallpaper_ext}"
# Apply wallpaper
skip_colortheme=0
if [ "${4-}" = "--skip-colortheme" ]; then
skip_colortheme=1
fi
if [ "$XDG_CURRENT_DESKTOP" = "Hyprland" ]; then
swww img -n background "$wallpaper_image" --transition-type fade --transition-duration 2 >/dev/null 2>/dev/null
notify-send -a "change-wallpaper" "Wallpaper Changed" "$image" -i "$wallpaper_image"
# notify-send -a "change-wallpaper" "Wallpaper Changed" "$image" -i "$wallpaper_image"
change-colortheme -i "$wallpaper_image" || exit 1
if [ "$skip_colortheme" = 0 ]; then
change-colortheme -i "$wallpaper_image" || exit 1
fi
elif [ "$XDG_CURRENT_DESKTOP" = "niri" ]; then
### Handled in wallpaper-daemon
# swww img -n background "$wallpaper_image" --transition-type fade --transition-duration 2 > /dev/null 2> /dev/null
notify-send -a "change-wallpaper" "Wallpaper Changed" "$image" -i "$wallpaper_image"
# notify-send -a "change-wallpaper" "Wallpaper Changed" "$image" -i "$wallpaper_image"
change-colortheme -i "$wallpaper_image" || exit 1
if [ "$skip_colortheme" = 0 ]; then
change-colortheme -i "$wallpaper_image" || exit 1
fi
else
echo "Unsupported desktop environment: $XDG_CURRENT_DESKTOP"
exit 1
+1 -1
View File
@@ -9,7 +9,7 @@
# Constants
niri_config_file="$HOME/.config/niri/config/misc.kdl"
prefer_order=(nvidia intel)
prefer_order=(intel nvidia)
# Get vendor and path of each GPU
default_card_path="$(find /dev/dri/card* 2>/dev/null | head -n 1)"
@@ -1,22 +0,0 @@
{
"wallpaper": {
"dirs": [
"~/Pictures/backgrounds",
"/media/Beta/壁纸/库/"
],
"excludes": [
"~/Pictures/backgrounds/nao-stars-crop-adjust-flop.jpg",
"~/Pictures/backgrounds/miku-gate.jpg"
]
},
"action": {
"confirm": "change-wallpaper \"%1\" 2560 1600"
},
"style": {
"no_loading_screen": false
},
"sort": {
"type": "date",
"reverse": true
}
}
@@ -0,0 +1,39 @@
{
"$schema": "https://raw.githubusercontent.com/Uyanide/WallReel/refs/heads/master/config.schema.json",
"wallpaper": {
"dirs": [
{
"path": "~/Pictures/backgrounds"
},
{
"path": "/media/Beta/壁纸/库"
}
],
"excludes": [
"nao-stars-crop-adjust-flop.jpg",
"miku-gate.jpg",
"\\.md$"
]
},
"action": {
"onSelected": "change-wallpaper '{{ path }}' 2560 1440 --skip-colortheme; change-colortheme -c '{{ colorHex }}'",
"onPreview": "change-colortheme -c '{{ colorHex }}' niri quickshell; swww img -n background \"{{ path }}\" --transition-type fade --transition-duration 0.5",
"quitOnSelected": true,
"saveState": [
{
"key": "flavor",
"fallback": "#89b4fa",
"command": "cat ~/.config/posh_theme.omp.json | jq -r .blocks[0].segments[0].foreground"
},
{
"key": "wallpaper",
"fallback": "$HOME/Pictures/backgrounds/miku-space.jpg",
"command": "find ~/.local/share/wallpaper/current -type f | head -n 1"
}
],
"onRestore": "change-colortheme -c '{{ flavor }}' niri quickshell; swww img -n background \"{{ wallpaper }}\" --transition-type fade --transition-duration 0.5"
},
"cache": {
"maxImageEntries": 300
}
}
+1
View File
@@ -13,6 +13,7 @@
- Sour Gummy (from [Google Fonts](https://fonts.google.com/specimen/Sour+Gummy))
- Font Awesome 6 Free (extracted from an AUR package which no longer exists)
- `extra/ttf-meslo-nerd`
- `archlinuxcn/ttf-lxgw-wenkai`
### Font configuration