diff --git a/README.md b/README.md index e6a4b42..d0da70a 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/config/niri/.config/niri/config/binds.kdl b/config/niri/.config/niri/config/binds.kdl index 030abef..27df1c4 100644 --- a/config/niri/.config/niri/config/binds.kdl +++ b/config/niri/.config/niri/config/binds.kdl @@ -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 diff --git a/config/niri/.config/niri/config/misc.kdl b/config/niri/.config/niri/config/misc.kdl index 8c18b91..db5af45 100644 --- a/config/niri/.config/niri/config/misc.kdl +++ b/config/niri/.config/niri/config/misc.kdl @@ -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 { diff --git a/config/niri/.config/niri/config/prime.kdl b/config/niri/.config/niri/config/prime.kdl index d6062de..8b13789 100644 --- a/config/niri/.config/niri/config/prime.kdl +++ b/config/niri/.config/niri/config/prime.kdl @@ -1,5 +1 @@ -environment { - __NV_PRIME_RENDER_OFFLOAD "1" - __VK_LAYER_NV_optimus "NVIDIA_only" - __GLX_VENDOR_LIBRARY_NAME "nvidia" -} + diff --git a/config/quickshell/.config/quickshell/Constants/Fonts.qml b/config/quickshell/.config/quickshell/Constants/Fonts.qml index fb882da..1499e83 100644 --- a/config/quickshell/.config/quickshell/Constants/Fonts.qml +++ b/config/quickshell/.config/quickshell/Constants/Fonts.qml @@ -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 diff --git a/config/quickshell/.config/quickshell/Services/RecordService.qml b/config/quickshell/.config/quickshell/Services/RecordService.qml index a90bc57..7f9ea03 100644 --- a/config/quickshell/.config/quickshell/Services/RecordService.qml +++ b/config/quickshell/.config/quickshell/Services/RecordService.qml @@ -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: "" diff --git a/config/scripts/.local/scripts/change-colortheme b/config/scripts/.local/scripts/change-colortheme index f0a09f8..3c7a970 100755 --- a/config/scripts/.local/scripts/change-colortheme +++ b/config/scripts/.local/scripts/change-colortheme @@ -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__": diff --git a/config/scripts/.local/scripts/change-wallpaper b/config/scripts/.local/scripts/change-wallpaper index ee64a79..19e55ac 100755 --- a/config/scripts/.local/scripts/change-wallpaper +++ b/config/scripts/.local/scripts/change-wallpaper @@ -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 diff --git a/config/scripts/.local/snippets/set_display b/config/scripts/.local/snippets/set_display index a0f46de..9a2ea66 100644 --- a/config/scripts/.local/snippets/set_display +++ b/config/scripts/.local/snippets/set_display @@ -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)" diff --git a/config/wallpaper/.config/wallpaper-carousel/config.json b/config/wallpaper/.config/wallpaper-carousel/config.json deleted file mode 100644 index a602775..0000000 --- a/config/wallpaper/.config/wallpaper-carousel/config.json +++ /dev/null @@ -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 - } -} diff --git a/config/wallpaper/.config/wallreel/config.json b/config/wallpaper/.config/wallreel/config.json new file mode 100644 index 0000000..bdc19c0 --- /dev/null +++ b/config/wallpaper/.config/wallreel/config.json @@ -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 + } +} diff --git a/memo/fontconfig.md b/memo/fontconfig.md index e2d446b..4b709a1 100644 --- a/memo/fontconfig.md +++ b/memo/fontconfig.md @@ -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