update
This commit is contained in:
@@ -15,6 +15,16 @@ language-servers = ["ruff"]
|
||||
name = "rust"
|
||||
formatter = { command = "rustfmt" }
|
||||
|
||||
[[language]]
|
||||
name = "json"
|
||||
auto-format = false
|
||||
formatter = { command = "prettier", args = ["--parser", "json"] }
|
||||
|
||||
[[language]]
|
||||
name = "yaml"
|
||||
auto-format = false
|
||||
formatter = { command = "prettier", args = ["--parser", "yaml"] }
|
||||
|
||||
[language-server.ruff]
|
||||
command = "ruff"
|
||||
args = ["server"]
|
||||
|
||||
@@ -16,8 +16,9 @@ spawn-at-startup "sunshine"
|
||||
// Idle
|
||||
spawn-at-startup "hypridle"
|
||||
|
||||
// QuickShell
|
||||
// Desktop
|
||||
spawn-at-startup "quickshell"
|
||||
spawn-at-startup "parra" "daemon"
|
||||
|
||||
// Vicinae
|
||||
spawn-at-startup "vicinae" "server"
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
@define-color insensitive_unfocused_fg_color_breeze #999fb9;
|
||||
@define-color insensitive_unfocused_selected_bg_color_breeze #1a1a28;
|
||||
@define-color insensitive_unfocused_selected_fg_color_breeze #999fb9;
|
||||
@define-color link_color_breeze #f5c2e7;
|
||||
@define-color link_color_breeze #89b4fa;
|
||||
@define-color link_visited_color_breeze #cba6f7;
|
||||
@define-color success_color_backdrop_breeze #728396;
|
||||
@define-color success_color_breeze #a6e3a1;
|
||||
@@ -27,17 +27,17 @@
|
||||
@define-color theme_button_background_backdrop_insensitive_breeze #2b2c3d;
|
||||
@define-color theme_button_background_insensitive_breeze #2b2c3d;
|
||||
@define-color theme_button_background_normal_breeze #313244;
|
||||
@define-color theme_button_decoration_focus_backdrop_breeze #847d96;
|
||||
@define-color theme_button_decoration_focus_backdrop_insensitive_breeze #b591b0;
|
||||
@define-color theme_button_decoration_focus_breeze #f5c2e7;
|
||||
@define-color theme_button_decoration_focus_insensitive_breeze #b591b0;
|
||||
@define-color theme_button_decoration_hover_backdrop_breeze #33344c;
|
||||
@define-color theme_button_decoration_hover_backdrop_insensitive_breeze #393b4d;
|
||||
@define-color theme_button_decoration_hover_breeze #45475a;
|
||||
@define-color theme_button_decoration_hover_insensitive_breeze #393b4d;
|
||||
@define-color theme_button_decoration_focus_backdrop_breeze #6773a7;
|
||||
@define-color theme_button_decoration_focus_backdrop_insensitive_breeze #6987bd;
|
||||
@define-color theme_button_decoration_focus_breeze #89b4fa;
|
||||
@define-color theme_button_decoration_focus_insensitive_breeze #6987bd;
|
||||
@define-color theme_button_decoration_hover_backdrop_breeze #6773a7;
|
||||
@define-color theme_button_decoration_hover_backdrop_insensitive_breeze #6987bd;
|
||||
@define-color theme_button_decoration_hover_breeze #89b4fa;
|
||||
@define-color theme_button_decoration_hover_insensitive_breeze #6987bd;
|
||||
@define-color theme_button_foreground_active_backdrop_breeze #1e1e2e;
|
||||
@define-color theme_button_foreground_active_backdrop_insensitive_breeze #999fb9;
|
||||
@define-color theme_button_foreground_active_breeze #11111b;
|
||||
@define-color theme_button_foreground_active_breeze #000000;
|
||||
@define-color theme_button_foreground_active_insensitive_breeze #999fb9;
|
||||
@define-color theme_button_foreground_backdrop_breeze #808194;
|
||||
@define-color theme_button_foreground_backdrop_insensitive_breeze #999fb9;
|
||||
@@ -51,9 +51,9 @@
|
||||
@define-color theme_header_foreground_breeze #cdd6f4;
|
||||
@define-color theme_header_foreground_insensitive_backdrop_breeze #808194;
|
||||
@define-color theme_header_foreground_insensitive_breeze #808194;
|
||||
@define-color theme_hovering_selected_bg_color_breeze #45475a;
|
||||
@define-color theme_selected_bg_color_breeze #f5c2e7;
|
||||
@define-color theme_selected_fg_color_breeze #11111b;
|
||||
@define-color theme_hovering_selected_bg_color_breeze #89b4fa;
|
||||
@define-color theme_selected_bg_color_breeze #6887bc;
|
||||
@define-color theme_selected_fg_color_breeze #000000;
|
||||
@define-color theme_text_color_breeze #cdd6f4;
|
||||
@define-color theme_titlebar_background_backdrop_breeze #1e1e2e;
|
||||
@define-color theme_titlebar_background_breeze #181825;
|
||||
@@ -65,14 +65,14 @@
|
||||
@define-color theme_unfocused_base_color_breeze #1e1e2e;
|
||||
@define-color theme_unfocused_bg_color_breeze #1e1e2e;
|
||||
@define-color theme_unfocused_fg_color_breeze #808194;
|
||||
@define-color theme_unfocused_selected_bg_color_alt_breeze #847d96;
|
||||
@define-color theme_unfocused_selected_bg_color_breeze #847d96;
|
||||
@define-color theme_unfocused_selected_bg_color_alt_breeze #555f8b;
|
||||
@define-color theme_unfocused_selected_bg_color_breeze #555f8b;
|
||||
@define-color theme_unfocused_selected_fg_color_breeze #1e1e2e;
|
||||
@define-color theme_unfocused_text_color_breeze #808194;
|
||||
@define-color theme_unfocused_view_bg_color_breeze #1e1e2e;
|
||||
@define-color theme_unfocused_view_text_color_breeze #999fb9;
|
||||
@define-color theme_view_active_decoration_color_breeze #45475a;
|
||||
@define-color theme_view_hover_decoration_color_breeze #45475a;
|
||||
@define-color theme_view_active_decoration_color_breeze #89b4fa;
|
||||
@define-color theme_view_hover_decoration_color_breeze #89b4fa;
|
||||
@define-color tooltip_background_breeze #1e1e2e;
|
||||
@define-color tooltip_border_breeze #414356;
|
||||
@define-color tooltip_text_breeze #cdd6f4;
|
||||
|
||||
@@ -1,17 +1,26 @@
|
||||
[Settings]
|
||||
gtk-theme-name=catppuccin-mocha-blue-standard+default
|
||||
gtk-icon-theme-name=Papirus
|
||||
gtk-font-name=Sarasa UI SC 10
|
||||
gtk-application-prefer-dark-theme=true
|
||||
gtk-button-images=true
|
||||
gtk-cursor-blink=true
|
||||
gtk-cursor-blink-time=1000
|
||||
gtk-cursor-theme-name=Bibata-Modern-Ice
|
||||
gtk-cursor-theme-size=24
|
||||
gtk-toolbar-style=GTK_TOOLBAR_ICONS
|
||||
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR
|
||||
gtk-button-images=0
|
||||
gtk-menu-images=0
|
||||
gtk-decoration-layout=icon:minimize,maximize,close
|
||||
gtk-enable-animations=true
|
||||
gtk-enable-event-sounds=1
|
||||
gtk-enable-input-feedback-sounds=0
|
||||
gtk-font-name=Sarasa UI SC, 10
|
||||
gtk-icon-theme-name=Papirus
|
||||
gtk-menu-images=true
|
||||
gtk-modules=colorreload-gtk-module:appmenu-gtk-module
|
||||
gtk-primary-button-warps-slider=true
|
||||
gtk-shell-shows-menubar=1
|
||||
gtk-sound-theme-name=ocean
|
||||
gtk-theme-name=catppuccin-mocha-blue-standard+default
|
||||
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR
|
||||
gtk-toolbar-style=3
|
||||
gtk-xft-antialias=1
|
||||
gtk-xft-dpi=122880
|
||||
gtk-xft-hinting=1
|
||||
gtk-xft-hintstyle=hintslight
|
||||
gtk-xft-rgba=rgb
|
||||
gtk-application-prefer-dark-theme=1
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
@define-color insensitive_unfocused_fg_color_breeze #999fb9;
|
||||
@define-color insensitive_unfocused_selected_bg_color_breeze #1a1a28;
|
||||
@define-color insensitive_unfocused_selected_fg_color_breeze #999fb9;
|
||||
@define-color link_color_breeze #f5c2e7;
|
||||
@define-color link_color_breeze #89b4fa;
|
||||
@define-color link_visited_color_breeze #cba6f7;
|
||||
@define-color success_color_backdrop_breeze #728396;
|
||||
@define-color success_color_breeze #a6e3a1;
|
||||
@@ -27,17 +27,17 @@
|
||||
@define-color theme_button_background_backdrop_insensitive_breeze #2b2c3d;
|
||||
@define-color theme_button_background_insensitive_breeze #2b2c3d;
|
||||
@define-color theme_button_background_normal_breeze #313244;
|
||||
@define-color theme_button_decoration_focus_backdrop_breeze #847d96;
|
||||
@define-color theme_button_decoration_focus_backdrop_insensitive_breeze #b591b0;
|
||||
@define-color theme_button_decoration_focus_breeze #f5c2e7;
|
||||
@define-color theme_button_decoration_focus_insensitive_breeze #b591b0;
|
||||
@define-color theme_button_decoration_hover_backdrop_breeze #33344c;
|
||||
@define-color theme_button_decoration_hover_backdrop_insensitive_breeze #393b4d;
|
||||
@define-color theme_button_decoration_hover_breeze #45475a;
|
||||
@define-color theme_button_decoration_hover_insensitive_breeze #393b4d;
|
||||
@define-color theme_button_decoration_focus_backdrop_breeze #6773a7;
|
||||
@define-color theme_button_decoration_focus_backdrop_insensitive_breeze #6987bd;
|
||||
@define-color theme_button_decoration_focus_breeze #89b4fa;
|
||||
@define-color theme_button_decoration_focus_insensitive_breeze #6987bd;
|
||||
@define-color theme_button_decoration_hover_backdrop_breeze #6773a7;
|
||||
@define-color theme_button_decoration_hover_backdrop_insensitive_breeze #6987bd;
|
||||
@define-color theme_button_decoration_hover_breeze #89b4fa;
|
||||
@define-color theme_button_decoration_hover_insensitive_breeze #6987bd;
|
||||
@define-color theme_button_foreground_active_backdrop_breeze #1e1e2e;
|
||||
@define-color theme_button_foreground_active_backdrop_insensitive_breeze #999fb9;
|
||||
@define-color theme_button_foreground_active_breeze #11111b;
|
||||
@define-color theme_button_foreground_active_breeze #000000;
|
||||
@define-color theme_button_foreground_active_insensitive_breeze #999fb9;
|
||||
@define-color theme_button_foreground_backdrop_breeze #808194;
|
||||
@define-color theme_button_foreground_backdrop_insensitive_breeze #999fb9;
|
||||
@@ -51,9 +51,9 @@
|
||||
@define-color theme_header_foreground_breeze #cdd6f4;
|
||||
@define-color theme_header_foreground_insensitive_backdrop_breeze #808194;
|
||||
@define-color theme_header_foreground_insensitive_breeze #808194;
|
||||
@define-color theme_hovering_selected_bg_color_breeze #45475a;
|
||||
@define-color theme_selected_bg_color_breeze #f5c2e7;
|
||||
@define-color theme_selected_fg_color_breeze #11111b;
|
||||
@define-color theme_hovering_selected_bg_color_breeze #89b4fa;
|
||||
@define-color theme_selected_bg_color_breeze #6887bc;
|
||||
@define-color theme_selected_fg_color_breeze #000000;
|
||||
@define-color theme_text_color_breeze #cdd6f4;
|
||||
@define-color theme_titlebar_background_backdrop_breeze #1e1e2e;
|
||||
@define-color theme_titlebar_background_breeze #181825;
|
||||
@@ -65,14 +65,14 @@
|
||||
@define-color theme_unfocused_base_color_breeze #1e1e2e;
|
||||
@define-color theme_unfocused_bg_color_breeze #1e1e2e;
|
||||
@define-color theme_unfocused_fg_color_breeze #808194;
|
||||
@define-color theme_unfocused_selected_bg_color_alt_breeze #847d96;
|
||||
@define-color theme_unfocused_selected_bg_color_breeze #847d96;
|
||||
@define-color theme_unfocused_selected_bg_color_alt_breeze #555f8b;
|
||||
@define-color theme_unfocused_selected_bg_color_breeze #555f8b;
|
||||
@define-color theme_unfocused_selected_fg_color_breeze #1e1e2e;
|
||||
@define-color theme_unfocused_text_color_breeze #808194;
|
||||
@define-color theme_unfocused_view_bg_color_breeze #1e1e2e;
|
||||
@define-color theme_unfocused_view_text_color_breeze #999fb9;
|
||||
@define-color theme_view_active_decoration_color_breeze #45475a;
|
||||
@define-color theme_view_hover_decoration_color_breeze #45475a;
|
||||
@define-color theme_view_active_decoration_color_breeze #89b4fa;
|
||||
@define-color theme_view_hover_decoration_color_breeze #89b4fa;
|
||||
@define-color tooltip_background_breeze #1e1e2e;
|
||||
@define-color tooltip_border_breeze #414356;
|
||||
@define-color tooltip_text_breeze #cdd6f4;
|
||||
|
||||
@@ -1,7 +1,14 @@
|
||||
[Settings]
|
||||
gtk-theme-name=catppuccin-mocha-blue-standard+default
|
||||
gtk-icon-theme-name=Papirus
|
||||
gtk-font-name=Sarasa UI SC 10
|
||||
gtk-application-prefer-dark-theme=true
|
||||
gtk-cursor-blink=true
|
||||
gtk-cursor-blink-time=1000
|
||||
gtk-cursor-theme-name=Bibata-Modern-Ice
|
||||
gtk-cursor-theme-size=24
|
||||
gtk-application-prefer-dark-theme=1
|
||||
gtk-decoration-layout=icon:minimize,maximize,close
|
||||
gtk-enable-animations=true
|
||||
gtk-font-name=Sarasa UI SC, 10
|
||||
gtk-icon-theme-name=Papirus
|
||||
gtk-primary-button-warps-slider=true
|
||||
gtk-sound-theme-name=ocean
|
||||
gtk-theme-name=catppuccin-mocha-blue-standard+default
|
||||
gtk-xft-dpi=122880
|
||||
|
||||
@@ -45,9 +45,9 @@ ShellRoot {
|
||||
id: notification
|
||||
}
|
||||
|
||||
Background {
|
||||
id: background
|
||||
}
|
||||
// Background {
|
||||
// id: background
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env bash
|
||||
#!/hint/bash
|
||||
|
||||
# Description:
|
||||
# Select which GPU to use for rendering by Hyprland and Niri.
|
||||
@@ -12,8 +12,11 @@ niri_config_file="$HOME/.config/niri/config/misc.kdl"
|
||||
prefer_order=(nvidia intel)
|
||||
|
||||
# Get vendor and path of each GPU
|
||||
default_card_path="$(find /dev/dri/card* 2>/dev/null | head -n 1)"
|
||||
default_render_path="$(find /dev/dri/renderD* 2>/dev/null | head -n 1)"
|
||||
# NOTE: use 'find' instead of globs. This file is sourced by both bash and zsh,
|
||||
# and zsh's NOMATCH aborts the rest of the file on an unmatched glob
|
||||
# (e.g. a machine with no /dev/dri/by-path), leaving nothing exported.
|
||||
default_card_path="$(find /dev/dri -maxdepth 1 -name 'card*' 2>/dev/null | sort | head -n 1)"
|
||||
default_render_path="$(find /dev/dri -maxdepth 1 -name 'renderD*' 2>/dev/null | sort | head -n 1)"
|
||||
[[ -z "$default_card_path" ]] && default_card_path="/dev/dri/card0"
|
||||
[[ -z "$default_render_path" ]] && default_render_path="/dev/dri/renderD128"
|
||||
intel_card_path=""
|
||||
@@ -23,7 +26,7 @@ intel_render_path=""
|
||||
nvidia_render_path=""
|
||||
amd_render_path=""
|
||||
|
||||
for link in /dev/dri/by-path/*-card; do
|
||||
for link in $(find /dev/dri/by-path -maxdepth 1 -name '*-card' 2>/dev/null | sort); do
|
||||
[[ -e "$link" ]] || continue
|
||||
card="$(readlink -f "$link")"
|
||||
vfile="/sys/class/drm/$(basename "$card")/device/vendor"
|
||||
@@ -36,7 +39,7 @@ for link in /dev/dri/by-path/*-card; do
|
||||
esac
|
||||
done
|
||||
|
||||
for link in /dev/dri/by-path/*-render; do
|
||||
for link in $(find /dev/dri/by-path -maxdepth 1 -name '*-render' 2>/dev/null | sort); do
|
||||
[[ -e "$link" ]] || continue
|
||||
render="$(readlink -f "$link")"
|
||||
vfile="/sys/class/drm/$(basename "$render")/device/vendor"
|
||||
@@ -108,3 +111,5 @@ function update_niri_config() {
|
||||
}
|
||||
|
||||
update_niri_config "$niri_config_file" "$primary_render_device"
|
||||
|
||||
unset -f update_niri_config
|
||||
|
||||
@@ -2,6 +2,59 @@
|
||||
|
||||
# Login shell only — runs once per session
|
||||
|
||||
append_path() {
|
||||
[[ -z "$1" ]] && return
|
||||
[[ -d "$1" ]] || return
|
||||
case ":$PATH:" in
|
||||
*:"$1":*) ;;
|
||||
*)
|
||||
PATH="${PATH:+$PATH:}$1"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
prepend_path() {
|
||||
[[ -z "$1" ]] && return
|
||||
[[ -d "$1" ]] || return
|
||||
case ":$PATH:" in
|
||||
*:"$1":*) ;;
|
||||
*)
|
||||
PATH="$1${PATH:+:$PATH}"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# .profile shared between shells
|
||||
|
||||
[[ -f "$HOME/.profile" ]] && . "$HOME/.profile"
|
||||
|
||||
# XDG, better than not set
|
||||
|
||||
export XDG_CONFIG_HOME=${XDG_CONFIG_HOME:-$HOME/.config}
|
||||
export XDG_DATA_HOME=${XDG_DATA_HOME:-$HOME/.local/share}
|
||||
export XDG_STATE_HOME=${XDG_STATE_HOME:-$HOME/.local/state}
|
||||
export XDG_CACHE_HOME=${XDG_CACHE_HOME:-$HOME/.cache}
|
||||
|
||||
# Locale, better than not set
|
||||
|
||||
if [[ -z "$LANG" ]]; then
|
||||
export LANG="en_US.UTF-8"
|
||||
fi
|
||||
|
||||
# OCaml env
|
||||
|
||||
(( $+commands[opam] )) && eval "$(opam env)"
|
||||
|
||||
# Other paths
|
||||
|
||||
[[ -f "$HOME/.cargo/env" ]] && source "$HOME/.cargo/env"
|
||||
prepend_path "$HOME/.local/share/fnm/aliases/default/bin" # 'fnm env' is eval'ed in .zshrc
|
||||
prepend_path "$HOME/.cargo/bin"
|
||||
prepend_path "$HOME/go/bin"
|
||||
prepend_path "$HOME/.local/bin"
|
||||
prepend_path "$HOME/.local/scripts"
|
||||
prepend_path "$HOME/.local/share/fnm"
|
||||
export PATH
|
||||
|
||||
# GPG agent for SSH
|
||||
|
||||
if (( $+commands[gpgconf] )) && (( $+commands[gpg-connect-agent] )) &&
|
||||
|
||||
@@ -1,57 +0,0 @@
|
||||
#!/hint/zsh
|
||||
|
||||
append_path() {
|
||||
[[ -z "$1" ]] && return
|
||||
[[ -d "$1" ]] || return
|
||||
case ":$PATH:" in
|
||||
*:"$1":*) ;;
|
||||
*)
|
||||
PATH="${PATH:+$PATH:}$1"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
prepend_path() {
|
||||
[[ -z "$1" ]] && return
|
||||
[[ -d "$1" ]] || return
|
||||
case ":$PATH:" in
|
||||
*:"$1":*) ;;
|
||||
*)
|
||||
PATH="$1${PATH:+:$PATH}"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# XDG, better than not set
|
||||
|
||||
export XDG_CONFIG_HOME=${XDG_CONFIG_HOME:-$HOME/.config}
|
||||
export XDG_DATA_HOME=${XDG_DATA_HOME:-$HOME/.local/share}
|
||||
export XDG_STATE_HOME=${XDG_STATE_HOME:-$HOME/.local/state}
|
||||
export XDG_CACHE_HOME=${XDG_CACHE_HOME:-$HOME/.cache}
|
||||
|
||||
# Locale, better than not set
|
||||
|
||||
if [[ -z "$LANG" ]]; then
|
||||
export LANG="en_US.UTF-8"
|
||||
fi
|
||||
|
||||
# Somewhat expensive
|
||||
|
||||
if [[ -z "$UY_ENV_DONE" ]]; then
|
||||
[[ -f "$HOME/.profile" ]] && . "$HOME/.profile"
|
||||
(( $+commands[opam] )) && eval "$(opam env)"
|
||||
export UY_ENV_DONE=1
|
||||
fi
|
||||
|
||||
# Paths
|
||||
|
||||
[[ -f "$HOME/.cargo/env" ]] && source "$HOME/.cargo/env"
|
||||
prepend_path "$HOME/.local/share/fnm/aliases/default/bin" # 'fnm env' is eval'ed in .zshrc
|
||||
prepend_path "$HOME/.cargo/bin"
|
||||
prepend_path "$HOME/go/bin"
|
||||
prepend_path "$HOME/.local/bin"
|
||||
prepend_path "$HOME/.local/scripts"
|
||||
prepend_path "$HOME/.local/share/fnm"
|
||||
export PATH
|
||||
|
||||
unfunction append_path
|
||||
unfunction prepend_path
|
||||
@@ -1,31 +1,27 @@
|
||||
{
|
||||
"$schema": "https://raw.githubusercontent.com/Uyanide/WallReel/refs/heads/master/config.schema.json",
|
||||
"wallpaper": {
|
||||
"dirs": [
|
||||
{
|
||||
"path": "~/Pictures/backgrounds"
|
||||
}
|
||||
],
|
||||
"excludes": [
|
||||
"nao-stars-crop-adjust-flop.jpg",
|
||||
"miku-gate.jpg",
|
||||
"\\.md$"
|
||||
]
|
||||
},
|
||||
"action": {
|
||||
"onSelected": "qs ipc call background set '{{ path }}'; change-colortheme -c '{{ colorHex }}'",
|
||||
"onPreview": "exit 0; qs ipc call background preview '{{ path }}'; change-colortheme -c '{{ colorHex }}' quickshell niri",
|
||||
"quitOnSelected": true,
|
||||
"saveState": [
|
||||
{
|
||||
"key": "flavor",
|
||||
"fallback": "#89b4fa",
|
||||
"command": "qs ipc call colors get mPrimary"
|
||||
}
|
||||
],
|
||||
"onRestore": "exit 0; qs ipc call background preview ''; change-colortheme -c '{{ flavor }}' quickshell niri"
|
||||
},
|
||||
"cache": {
|
||||
"maxImageEntries": 300
|
||||
}
|
||||
"$schema": "https://raw.githubusercontent.com/Uyanide/WallReel/refs/heads/master/config.schema.json",
|
||||
"wallpaper": {
|
||||
"dirs": [
|
||||
{
|
||||
"path": "~/Pictures/backgrounds"
|
||||
}
|
||||
],
|
||||
"excludes": ["nao-stars-crop-adjust-flop.jpg", "miku-gate.jpg", "\\.md$"]
|
||||
},
|
||||
"action": {
|
||||
"onSelected": "parra set '{{ path }}'; change-colortheme -c '{{ colorHex }}'",
|
||||
"onPreview": "parra set --no-save '{{ path }}'; change-colortheme -c '{{ colorHex }}' quickshell niri",
|
||||
"onRestore": "parra restore; change-colortheme -c '{{ flavor }}' quickshell niri",
|
||||
"quitOnSelected": true,
|
||||
"saveState": [
|
||||
{
|
||||
"key": "flavor",
|
||||
"fallback": "#89b4fa",
|
||||
"command": "qs ipc call colors get mPrimary"
|
||||
}
|
||||
]
|
||||
},
|
||||
"cache": {
|
||||
"maxImageEntries": 300
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
// "on-click-right": "fuzzel -l 0 -p '>> ' | xargs -r sh -c",
|
||||
// "on-click": "fuzzel",
|
||||
// "on-click-middle": "pkill -9 fuzzel",
|
||||
"on-click": "eww open main --toggle",
|
||||
// "on-click": "eww open main --toggle",
|
||||
"on-click-right": "pkill rofi || rofi -show drun",
|
||||
"min-length": 2,
|
||||
"max-length": 2
|
||||
@@ -71,7 +71,6 @@
|
||||
"group/monitors": {
|
||||
"modules": [
|
||||
"network#speed",
|
||||
"custom/publicip",
|
||||
"temperature",
|
||||
"memory",
|
||||
"cpu",
|
||||
@@ -94,16 +93,6 @@
|
||||
"tooltip-format-disconnected": " Disconnected",
|
||||
"min-length": 20
|
||||
},
|
||||
"custom/publicip": {
|
||||
"interval": 30,
|
||||
"return-type": "json",
|
||||
"format": " {text}",
|
||||
"tooltip-format": "{alt}",
|
||||
"max-length": 6,
|
||||
"min-length": 6,
|
||||
"exec": "$HOME/.config/waybar/modules/publicip.sh",
|
||||
"on-click": "rm -f $HOME/.config/waybar/modules/publicip.cache && sleep 0.1"
|
||||
},
|
||||
"temperature": {
|
||||
"interval": 5,
|
||||
"thermal-zone": 6,
|
||||
|
||||
@@ -1,62 +0,0 @@
|
||||
#!/usr/bin/env bash
|
||||
# shellcheck disable=SC1091,SC1090
|
||||
|
||||
# Entries in publicip.conf:
|
||||
# IP_QUERY_URL: URL to query public IP of the system.
|
||||
# return: JSON object with "ip" field.
|
||||
# note: This URL will be queried with short intervals (60s for example),
|
||||
# therefore it may not be a good idea to use a public API with
|
||||
# a limited number of calls.
|
||||
# IP_INFO_URL: URL to query IP location.
|
||||
# placeholder: <ip>
|
||||
# return: JSON object with "country_code" field.
|
||||
# note: This URL will only be quetried when public IP changes or when "force" is given as parameter.
|
||||
|
||||
path="$(dirname "$(readlink -f "$0")")"
|
||||
cache_file="$path/publicip.cache"
|
||||
config_file="$path/publicip.conf"
|
||||
time_log="$path/publicip.log"
|
||||
|
||||
[ -f "$config_file" ] || exit 1
|
||||
. "$config_file"
|
||||
[ -z "$IP_QUERY_URL" ] && exit 1
|
||||
[ -z "$IP_INFO_URL" ] && exit 1
|
||||
[ "$1" == "force" ] && rm -f "$cache_file"
|
||||
[ -f "$cache_file" ] && . "$cache_file"
|
||||
|
||||
# Try to check network connectivity before querying
|
||||
if ! ping -c 1 -W 2 1.1.1.1 >/dev/null 2>&1; then
|
||||
# No network, return cached values if available
|
||||
[ -z "$CACHED_IP" ] && CACHED_IP="N/A"
|
||||
[ -z "$CACHED_CODE" ] && CACHED_CODE="N/A"
|
||||
|
||||
echo "$(date +%Y-%m-%dT%H:%M:%S) - Waiting for network" >>"$time_log"
|
||||
|
||||
jq -n --unbuffered --compact-output \
|
||||
--arg ip "$CACHED_IP" \
|
||||
--arg country "$CACHED_CODE" \
|
||||
'{alt: $ip, text: $country}'
|
||||
exit 0
|
||||
fi
|
||||
|
||||
ip_current=$(curl -s -L -4 "$IP_QUERY_URL" | jq -r '.ip')
|
||||
[ -z "$ip_current" ] && exit 1
|
||||
|
||||
if [ "$ip_current" != "$CACHED_IP" ]; then
|
||||
echo "$(date +%Y-%m-%dT%H:%M:%S) - IP changed: $CACHED_IP -> $ip_current" >>"$time_log"
|
||||
CACHED_IP="$ip_current"
|
||||
|
||||
ip_info_url=${IP_INFO_URL//<ip>/$ip_current}
|
||||
CACHED_CODE=$(curl -s -L "$ip_info_url" | jq -r '.country_code')
|
||||
[ -z "$CACHED_CODE" ] && CACHED_CODE="N/A"
|
||||
|
||||
echo "CACHED_IP=$CACHED_IP" >"$cache_file"
|
||||
echo "CACHED_CODE=$CACHED_CODE" >>"$cache_file"
|
||||
notify-send "New Public IP detected" "New IP: $ip_current\nCountry: $CACHED_CODE"
|
||||
fi
|
||||
|
||||
jq -n --unbuffered --compact-output \
|
||||
--arg ip "$CACHED_IP" \
|
||||
--arg country "$CACHED_CODE" \
|
||||
'{alt: $ip, text: $country}'
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
# Terminate already running bar instances
|
||||
killall -q waybar
|
||||
|
||||
# Wait until the processes have been shut down
|
||||
while pgrep -x waybar -u "$USER" >/dev/null; do sleep 1; done
|
||||
|
||||
# Launch main
|
||||
waybar &
|
||||
+9
-6
@@ -162,9 +162,7 @@ cuda
|
||||
curl
|
||||
cython
|
||||
deno
|
||||
device-manager-linux-git
|
||||
devtools
|
||||
digital
|
||||
direnv
|
||||
discord
|
||||
dnsmasq
|
||||
@@ -179,7 +177,6 @@ dwarfs
|
||||
ed
|
||||
efibootmgr
|
||||
element-desktop
|
||||
elisa
|
||||
ethtool
|
||||
euphonica-git
|
||||
eww
|
||||
@@ -256,8 +253,13 @@ hwinfo
|
||||
hyperfine
|
||||
hyperv
|
||||
hypridle
|
||||
hyprland
|
||||
hyprland-protocols
|
||||
hyprlax-bin
|
||||
hyprlock
|
||||
hyprpicker
|
||||
hyprshot
|
||||
hyprshutdown
|
||||
hyprutils
|
||||
imagemagick
|
||||
inetutils
|
||||
@@ -291,7 +293,6 @@ kpeople
|
||||
kplotting
|
||||
krdc
|
||||
ktexttemplate
|
||||
kvantum
|
||||
lazygit
|
||||
lib32-nvidia-utils
|
||||
lib32-opencl-nvidia
|
||||
@@ -348,6 +349,7 @@ networkmanager-openvpn
|
||||
nfs-utils
|
||||
niri
|
||||
nmap
|
||||
nodejs-dummy
|
||||
nordvpn-bin
|
||||
noto-fonts-cjk
|
||||
ntfsprogs
|
||||
@@ -469,7 +471,6 @@ sunshine
|
||||
sushi
|
||||
svt-av1-hdr-git
|
||||
sysbench
|
||||
systemc2.3.4
|
||||
tailscale
|
||||
tcpdump
|
||||
telegram-desktop
|
||||
@@ -523,6 +524,7 @@ unrar
|
||||
upx
|
||||
usbip
|
||||
uv
|
||||
uwsm
|
||||
valgrind
|
||||
vapoursynth-plugin-vship-cuda-git
|
||||
ventoy-bin
|
||||
@@ -530,7 +532,6 @@ vesktop-bin
|
||||
vicinae
|
||||
vim
|
||||
visual-studio-code-bin
|
||||
vk-hdr-layer-kwin6-git
|
||||
vlc
|
||||
voicefox
|
||||
vulkan-extra-layers
|
||||
@@ -544,6 +545,7 @@ vulkan-swrast
|
||||
vulkan-validation-layers
|
||||
vvenc
|
||||
wallreel
|
||||
waybar
|
||||
waydroid
|
||||
waydroid-helper
|
||||
waypaper
|
||||
@@ -569,6 +571,7 @@ x86_energy_perf_policy
|
||||
xclip
|
||||
xdg-desktop-portal-gnome
|
||||
xdg-desktop-portal-gtk
|
||||
xdg-desktop-portal-hyprland
|
||||
xmake
|
||||
xone-dkms
|
||||
xorg-bdftopcf
|
||||
|
||||
Reference in New Issue
Block a user