From dc6c3cda993f004d0d1b349c3567c9323fb09369 Mon Sep 17 00:00:00 2001 From: Alex Selimov Date: Mon, 6 Oct 2025 20:02:46 -0400 Subject: [PATCH] Improve swap_mode command --- bin/emojis | 2 +- bin/swap_mode.sh | 31 +++++++++++++++++++++++++++++++ config/ghostty/config | 2 +- home/.profile | 5 ++++- home/.xprofile | 2 +- home/.zshrc | 9 +++++++-- 6 files changed, 45 insertions(+), 6 deletions(-) diff --git a/bin/emojis b/bin/emojis index c0d58b7..008a130 100755 --- a/bin/emojis +++ b/bin/emojis @@ -7,7 +7,7 @@ set -e -dmenu="dmenu -theme-str 'window {width: 25%;}' -i -p Emoji" +dmenu="dmenu -theme-str 'window {width: 50%;}' -i -p Emoji" case "$1" in "list") data=$(sed '0,/^__DATA__$/d' "$0") diff --git a/bin/swap_mode.sh b/bin/swap_mode.sh index 9e23766..2debbd4 100755 --- a/bin/swap_mode.sh +++ b/bin/swap_mode.sh @@ -2,9 +2,11 @@ NVIM_CONF="${HOME}/.config/nvim/init.lua" GHOSTTY_CONF="${HOME}/.config/ghostty/config" +DUNST_CONF="${HOME}/.config/dunst/dunstrc" [ -f "$NVIM_CONF" ] || { echo "Missing $NVIM_CONF"; exit 1; } [ -f "$GHOSTTY_CONF" ] || { echo "Missing $GHOSTTY_CONF"; exit 1; } +[ -f "$DUNST_CONF" ] || { echo "Missing $DUNST_CONF"; exit 1; } set_light_mode() { sed -E -i 's/^([[:space:]]*theme[[:space:]]*=[[:space:]]*)zenwritten-dark/\1zenwritten-light/' "$GHOSTTY_CONF" @@ -64,18 +66,47 @@ if [ "$(uname)" != "Darwin" ]; then # GTK Theme gsettings set org.gnome.desktop.interface gtk-theme '' gsettings set org.gnome.desktop.interface gtk-theme 'WhiteSur-Dark' + gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark' + sed -i -e 's@Net/ThemeName.*@Net/ThemeName "WhiteSur-Dark"@' ~/.xsettingsd + # Rofi theme sed -i -e "s/light.rasi/dark.rasi/" $HOME/.config/rofi/config.rasi + # Swap dunst urgency_low background and foreground + sed -E -i '/^\[urgency_low\]/,/^\[.*\]/ { + s/^([[:space:]]*background[[:space:]]*=[[:space:]]*).*/\1"#3d3839"/ + s/^([[:space:]]*foreground[[:space:]]*=[[:space:]]*).*/\1"#8e8e8e"/ + }' "$DUNST_CONF" + + # Swap dunst urgency_normal background and foreground + sed -E -i '/^\[urgency_normal\]/,/^\[.*\]/ { + s/^([[:space:]]*background[[:space:]]*=[[:space:]]*).*/\1"#3d3839"/ + s/^([[:space:]]*foreground[[:space:]]*=[[:space:]]*).*/\1"#BBBBBB"/ + }' "$DUNST_CONF" else echo "Swapping to light mode" # GTK Theme gsettings set org.gnome.desktop.interface gtk-theme '' gsettings set org.gnome.desktop.interface gtk-theme 'WhiteSur-Light' + gsettings set org.gnome.desktop.interface color-scheme 'default' + sed -i -e 's@Net/ThemeName.*@Net/ThemeName "WhiteSur-Light"@' ~/.xsettingsd + # Swap dunst urgency_low background and foreground + sed -E -i '/^\[urgency_low\]/,/^\[.*\]/ { + s/^([[:space:]]*background[[:space:]]*=[[:space:]]*).*/\1"#8e8e8e"/ + s/^([[:space:]]*foreground[[:space:]]*=[[:space:]]*).*/\1"#3d3839"/ + }' "$DUNST_CONF" + + # Swap dunst urgency_normal background and foreground + sed -E -i '/^\[urgency_normal\]/,/^\[.*\]/ { + s/^([[:space:]]*background[[:space:]]*=[[:space:]]*).*/\1"#BBBBBB"/ + s/^([[:space:]]*foreground[[:space:]]*=[[:space:]]*).*/\1"#191919"/ + }' "$DUNST_CONF" + # Rofi theme sed -i -e "s/dark.rasi/light.rasi/" $HOME/.config/rofi/config.rasi fi + killall dunst killall -HUP xsettingsd fi diff --git a/config/ghostty/config b/config/ghostty/config index 7815010..7384a2b 100644 --- a/config/ghostty/config +++ b/config/ghostty/config @@ -1,7 +1,7 @@ # --- Basics font-family = "IosevkaTermSlab Nerd Font Propo" font-style = "Regular" -font-size = 12 +font-size = 11 background-opacity = 1.0 window-decoration = none confirm-close-surface = false diff --git a/home/.profile b/home/.profile index f0b0284..37c2c11 100644 --- a/home/.profile +++ b/home/.profile @@ -2,5 +2,8 @@ [ -f "/home/aselimov/.ghcup/env" ] && . "/home/aselimov/.ghcup/env" # ghcup-env -export PATH="$PATH:/usr/local/cuda-12.8/bin:$HOME/bin" +export PATH="$PATH:/usr/local/cuda-12.8/bin:$HOME/bin:$HOME/.local/bin" export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/cuda-12.8/lib64" + +export ANTHROPIC_BASE_URL=https://api.z.ai/api/anthropic +export ANTHROPIC_AUTH_TOKEN="$(pass list zai_token)" diff --git a/home/.xprofile b/home/.xprofile index f0b0284..54c686a 100755 --- a/home/.xprofile +++ b/home/.xprofile @@ -2,5 +2,5 @@ [ -f "/home/aselimov/.ghcup/env" ] && . "/home/aselimov/.ghcup/env" # ghcup-env -export PATH="$PATH:/usr/local/cuda-12.8/bin:$HOME/bin" +export PATH="$PATH:/usr/local/cuda-12.8/bin:$HOME/bin:$HOME/.local/bin" export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/cuda-12.8/lib64" diff --git a/home/.zshrc b/home/.zshrc index 7552697..941c636 100644 --- a/home/.zshrc +++ b/home/.zshrc @@ -16,6 +16,8 @@ setopt HIST_IGNORE_SPACE # Don't save commands starting with space # Environment Variables #============================================================================== +source ~/.profile + export OMPI_MCA_rmaps_base_oversubscribe=1 export CLICOLOR=1 export LSCOLORS=ExGxBxDxCxEgEdxbxgxcxd @@ -106,10 +108,13 @@ gemini() { unset -f nvm node npm gemini load_nvm gemini "$@" - - } +claude() { + unset -f claude + npm 2>&1 1>/dev/null + claude "$@" +} # ghcup [ -f "/home/aselimov/.ghcup/env" ] && . "/home/aselimov/.ghcup/env" # ghcup-env