dev: automated commit - 2025-09-06 17:51:28

This commit is contained in:
Mariano Z. 2025-09-06 17:51:28 -03:00
parent c84dfa059e
commit b18f0b1edf
13 changed files with 560 additions and 116 deletions

View file

@ -507,16 +507,26 @@ function cb {
return 1
fi
export GTK_THEME=HighContrast
export GDK_THEME=HighContrast
export QT_STYLE_OVERRIDE=HighContrast
export XDG_CURRENT_DESKTOP=GNOME
# Reset GTK configuration
unset GTK2_RC_FILES
unset GTK_RC_FILES
exec /usr/bin/codeblocks "$@"
# Store original values
local original_gtk_theme="$GTK_THEME"
local original_gdk_theme="$GDK_THEME"
local original_qt_style="$QT_STYLE_OVERRIDE"
local original_xdg_desktop="$XDG_CURRENT_DESKTOP"
# Set high contrast theme temporarily
GTK_THEME=HighContrast \
GDK_THEME=HighContrast \
QT_STYLE_OVERRIDE=HighContrast \
XDG_CURRENT_DESKTOP=GNOME \
GTK2_RC_FILES="" \
GTK_RC_FILES="" \
/usr/bin/codeblocks "$@"
# Restore original values
export GTK_THEME="$original_gtk_theme"
export GDK_THEME="$original_gdk_theme"
export QT_STYLE_OVERRIDE="$original_qt_style"
export XDG_CURRENT_DESKTOP="$original_xdg_desktop"
}
@ -627,5 +637,79 @@ alias pport='ppid'
# Node.js cleanup alias
alias unChonk="echo 'Starting the great node_modules purge...' && find . -name 'node_modules' -type d -prune -exec sh -c 'echo \"Deleting {}\" && rm -rf \"{}\"' \;"
# Font management
alias fm='font-manager'
alias fml='font-manager list'
alias fms='font-manager status'
alias fmc='font-manager clean'
alias fma='font-manager all'
# Advanced font management function
function font-switch() {
# Show help if requested
if [[ "$1" == "-h" || "$1" == "--help" ]]; then
echo "Usage: font-switch [font-name]"
echo "Quickly switch between font sets"
echo "Example: font-switch jetbrains-mono"
return 0
fi
if [[ -z "$1" ]]; then
echo "Available fonts:"
font-manager list
return 0
fi
local font_name="$1"
# Check if font exists
if ! font-manager list | grep -q "$font_name"; then
echo "Error: Font '$font_name' not found" >&2
echo "Available fonts:" >&2
font-manager list >&2
return 1
fi
echo "Switching to $font_name fonts..."
font-manager clean
font-manager extract "$font_name"
# Reload terminal if in kitty
if [[ "$TERM" == "xterm-kitty" ]] && command -v kitty >/dev/null 2>&1; then
echo "Reloading kitty configuration..."
kitty @ set-colors --all ~/.config/kitty/kitty.conf
fi
echo "Font switch complete!"
}
# Font preview function
function font-preview() {
# Show help if requested
if [[ "$1" == "-h" || "$1" == "--help" ]]; then
echo "Usage: font-preview [font-name]"
echo "Preview fonts in terminal"
echo "Example: font-preview jetbrains-mono"
return 0
fi
if [[ -z "$1" ]]; then
echo "Error: Font name required" >&2
echo "Usage: font-preview [font-name]" >&2
return 1
fi
local font_name="$1"
local preview_text="The quick brown fox jumps over the lazy dog
ABCDEFGHIJKLMNOPQRSTUVWXYZ
abcdefghijklmnopqrstuvwxyz
0123456789
!@#$%^&*()_+-=[]{}|;':\",./<>?"
echo "Previewing font: $font_name"
echo "----------------------------------------"
echo "$preview_text" | font-manager extract "$font_name" && echo "$preview_text"
}