mirror of
https://github.com/harivansh-afk/nix.git
synced 2026-04-15 07:04:47 +00:00
wallpaper theme (#68)
This commit is contained in:
parent
ed449d7fef
commit
6c2068b0d5
5 changed files with 11 additions and 0 deletions
BIN
assets/wallpapers/topography-dark.jpg
Normal file
BIN
assets/wallpapers/topography-dark.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 343 KiB |
BIN
assets/wallpapers/topography-light.jpg
Normal file
BIN
assets/wallpapers/topography-light.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 324 KiB |
|
|
@ -13,6 +13,10 @@ let
|
||||||
aquaNeutral = "#689d6a";
|
aquaNeutral = "#689d6a";
|
||||||
gray = "#928374";
|
gray = "#928374";
|
||||||
};
|
};
|
||||||
|
wallpapers = {
|
||||||
|
dark = ../assets/wallpapers/topography-dark.jpg;
|
||||||
|
light = ../assets/wallpapers/topography-light.jpg;
|
||||||
|
};
|
||||||
paths = {
|
paths = {
|
||||||
stateDir = "${config.xdg.stateHome}/theme";
|
stateDir = "${config.xdg.stateHome}/theme";
|
||||||
stateFile = "${config.xdg.stateHome}/theme/current";
|
stateFile = "${config.xdg.stateHome}/theme/current";
|
||||||
|
|
@ -263,5 +267,6 @@ in
|
||||||
renderTmux
|
renderTmux
|
||||||
renderZshHighlights
|
renderZshHighlights
|
||||||
themes
|
themes
|
||||||
|
wallpapers
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -102,6 +102,8 @@ let
|
||||||
"@TMUX_DARK_FILE@" = "${tmuxConfigs.dark}";
|
"@TMUX_DARK_FILE@" = "${tmuxConfigs.dark}";
|
||||||
"@TMUX_LIGHT_FILE@" = "${tmuxConfigs.light}";
|
"@TMUX_LIGHT_FILE@" = "${tmuxConfigs.light}";
|
||||||
"@TMUX_CONFIG@" = "${config.xdg.configHome}/tmux/tmux.conf";
|
"@TMUX_CONFIG@" = "${config.xdg.configHome}/tmux/tmux.conf";
|
||||||
|
"@WALLPAPER_DARK_FILE@" = "${theme.wallpapers.dark}";
|
||||||
|
"@WALLPAPER_LIGHT_FILE@" = "${theme.wallpapers.light}";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -26,12 +26,14 @@ link_mode_assets() {
|
||||||
fzf_target="@FZF_DARK_FILE@"
|
fzf_target="@FZF_DARK_FILE@"
|
||||||
ghostty_target="@GHOSTTY_DARK_FILE@"
|
ghostty_target="@GHOSTTY_DARK_FILE@"
|
||||||
tmux_target="@TMUX_DARK_FILE@"
|
tmux_target="@TMUX_DARK_FILE@"
|
||||||
|
wallpaper="@WALLPAPER_DARK_FILE@"
|
||||||
apple_dark_mode=true
|
apple_dark_mode=true
|
||||||
;;
|
;;
|
||||||
light)
|
light)
|
||||||
fzf_target="@FZF_LIGHT_FILE@"
|
fzf_target="@FZF_LIGHT_FILE@"
|
||||||
ghostty_target="@GHOSTTY_LIGHT_FILE@"
|
ghostty_target="@GHOSTTY_LIGHT_FILE@"
|
||||||
tmux_target="@TMUX_LIGHT_FILE@"
|
tmux_target="@TMUX_LIGHT_FILE@"
|
||||||
|
wallpaper="@WALLPAPER_LIGHT_FILE@"
|
||||||
apple_dark_mode=false
|
apple_dark_mode=false
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
|
@ -53,6 +55,8 @@ link_mode_assets() {
|
||||||
if [[ "$(uname -s)" == "Darwin" ]] && command -v osascript >/dev/null 2>&1; then
|
if [[ "$(uname -s)" == "Darwin" ]] && command -v osascript >/dev/null 2>&1; then
|
||||||
osascript -e "tell application \"System Events\" to tell appearance preferences to set dark mode to ${apple_dark_mode}" >/dev/null 2>&1 || true
|
osascript -e "tell application \"System Events\" to tell appearance preferences to set dark mode to ${apple_dark_mode}" >/dev/null 2>&1 || true
|
||||||
|
|
||||||
|
osascript -e "tell application \"System Events\" to tell every desktop to set picture to \"${wallpaper}\"" >/dev/null 2>&1 || true
|
||||||
|
|
||||||
osascript <<'EOF' >/dev/null 2>&1 || true
|
osascript <<'EOF' >/dev/null 2>&1 || true
|
||||||
tell application "System Events"
|
tell application "System Events"
|
||||||
if not (exists process "Ghostty") then
|
if not (exists process "Ghostty") then
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue