update
This commit is contained in:
@@ -79,7 +79,7 @@ This setup is currently only adapted for Niri.
|
|||||||
|
|
||||||
## Wallpaper & Colortheme
|
## 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).
|
- [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-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.
|
- [change-colortheme](./config/scripts/.local/scripts/change-colortheme): script that extract colors from the current wallpaper and generate a catppuccin color scheme accordingly.
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ binds {
|
|||||||
Mod+Shift+Return { spawn "wezterm"; }
|
Mod+Shift+Return { spawn "wezterm"; }
|
||||||
Mod+T { spawn "kitty"; }
|
Mod+T { spawn "kitty"; }
|
||||||
Mod+Return { 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"; }
|
Mod+O { spawn-sh "pkill -x -n pwvucontrol || pwvucontrol"; }
|
||||||
|
|
||||||
// Quickshell
|
// Quickshell
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
screenshot-path "~/Pictures/Screenshots/niri_screenshot_%Y-%m-%d_%H-%M-%S.png"
|
screenshot-path "~/Pictures/Screenshots/niri_screenshot_%Y-%m-%d_%H-%M-%S.png"
|
||||||
|
|
||||||
debug {
|
debug {
|
||||||
render-drm-device "/dev/dri/renderD129"
|
render-drm-device "/dev/dri/renderD128"
|
||||||
}
|
}
|
||||||
|
|
||||||
// gestures {
|
// gestures {
|
||||||
|
|||||||
@@ -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 {
|
Singleton {
|
||||||
id: root
|
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 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 small: Style.fontSizeS
|
||||||
readonly property int medium: Style.fontSizeM
|
readonly property int medium: Style.fontSizeM
|
||||||
readonly property int large: Style.fontSizeL
|
readonly property int large: Style.fontSizeL
|
||||||
|
|||||||
@@ -9,13 +9,13 @@ Singleton {
|
|||||||
readonly property string recordingDir: CacheService.recordingDir
|
readonly property string recordingDir: CacheService.recordingDir
|
||||||
property bool isRecording: false
|
property bool isRecording: false
|
||||||
property bool isStopping: false
|
property bool isStopping: false
|
||||||
readonly property string codec: "av1_nvenc"
|
readonly property string codec: "libx264"
|
||||||
readonly property string container: "mkv"
|
readonly property string container: "mkv"
|
||||||
readonly property string pixelFormat: "p010le"
|
readonly property string pixelFormat: "yuv420p"
|
||||||
property string recordingDisplay: ""
|
property string recordingDisplay: ""
|
||||||
readonly property int framerate: 60
|
readonly property int framerate: 60
|
||||||
readonly property var codecParams: Object.freeze([
|
readonly property var codecParams: Object.freeze([
|
||||||
"preset=p4", "rc=constqp", "qp=18",
|
"preset=ultrafast", "crf=15", "tune=zerolatency",
|
||||||
"color_range=tv"
|
"color_range=tv"
|
||||||
])
|
])
|
||||||
readonly property var filterArgs: ""
|
readonly property var filterArgs: ""
|
||||||
|
|||||||
@@ -331,15 +331,15 @@ def main():
|
|||||||
for script in SCRIPTS[app]:
|
for script in SCRIPTS[app]:
|
||||||
tasks.append(executor.submit(run_script, script, script_args))
|
tasks.append(executor.submit(run_script, script, script_args))
|
||||||
|
|
||||||
subprocess.run(
|
# subprocess.run(
|
||||||
[
|
# [
|
||||||
"notify-send",
|
# "notify-send",
|
||||||
"-a",
|
# "-a",
|
||||||
"change-colortheme",
|
# "change-colortheme",
|
||||||
"Colortheme Changed",
|
# "Colortheme Changed",
|
||||||
f"Palette: {palette_name}\nFlavor: {flavor}\nApplied to {success_count} apps",
|
# f"Palette: {palette_name}\nFlavor: {flavor}\nApplied to {success_count} apps",
|
||||||
]
|
# ]
|
||||||
)
|
# )
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ exec {LOCK_FD}>/tmp/"$(basename "$0")".lock
|
|||||||
|
|
||||||
flock -n "$LOCK_FD" || {
|
flock -n "$LOCK_FD" || {
|
||||||
echo "Another instance is running. Exiting."
|
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
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -120,7 +120,7 @@ blurred_cache_image="$blur_cache_dir/${hash}.${wallpaper_ext}"
|
|||||||
if [ "$XDG_CURRENT_DESKTOP" = "niri" ]; then
|
if [ "$XDG_CURRENT_DESKTOP" = "niri" ]; then
|
||||||
swww img -n backdrop "$blurred_image" --transition-type fade --transition-duration 2 >/dev/null 2>/dev/null
|
swww img -n backdrop "$blurred_image" --transition-type fade --transition-duration 2 >/dev/null 2>/dev/null
|
||||||
fi
|
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
|
### Check if cached blurred image exists
|
||||||
@@ -166,19 +166,28 @@ blurred_cache_image="$blur_cache_dir/${hash}.${wallpaper_ext}"
|
|||||||
|
|
||||||
# Apply wallpaper
|
# Apply wallpaper
|
||||||
|
|
||||||
|
skip_colortheme=0
|
||||||
|
if [ "${4-}" = "--skip-colortheme" ]; then
|
||||||
|
skip_colortheme=1
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$XDG_CURRENT_DESKTOP" = "Hyprland" ]; then
|
if [ "$XDG_CURRENT_DESKTOP" = "Hyprland" ]; then
|
||||||
swww img -n background "$wallpaper_image" --transition-type fade --transition-duration 2 >/dev/null 2>/dev/null
|
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
|
elif [ "$XDG_CURRENT_DESKTOP" = "niri" ]; then
|
||||||
### Handled in wallpaper-daemon
|
### Handled in wallpaper-daemon
|
||||||
# swww img -n background "$wallpaper_image" --transition-type fade --transition-duration 2 > /dev/null 2> /dev/null
|
# 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
|
else
|
||||||
echo "Unsupported desktop environment: $XDG_CURRENT_DESKTOP"
|
echo "Unsupported desktop environment: $XDG_CURRENT_DESKTOP"
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
# Constants
|
# Constants
|
||||||
niri_config_file="$HOME/.config/niri/config/misc.kdl"
|
niri_config_file="$HOME/.config/niri/config/misc.kdl"
|
||||||
prefer_order=(nvidia intel)
|
prefer_order=(intel nvidia)
|
||||||
|
|
||||||
# Get vendor and path of each GPU
|
# Get vendor and path of each GPU
|
||||||
default_card_path="$(find /dev/dri/card* 2>/dev/null | head -n 1)"
|
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
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -13,6 +13,7 @@
|
|||||||
- Sour Gummy (from [Google Fonts](https://fonts.google.com/specimen/Sour+Gummy))
|
- 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)
|
- Font Awesome 6 Free (extracted from an AUR package which no longer exists)
|
||||||
- `extra/ttf-meslo-nerd`
|
- `extra/ttf-meslo-nerd`
|
||||||
|
- `archlinuxcn/ttf-lxgw-wenkai`
|
||||||
|
|
||||||
### Font configuration
|
### Font configuration
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user