performancetriada.blogg.se

Mailspring config.json location
Mailspring config.json location






If then MAILSPRING_CONFIG_FILE= ~/snap/mailspring/common/config.json fi MAILSPRING_CONFIG_FILE= ~/.config/Mailspring/config.json # Warning: This abruptly kills the Mailspring process and restarts it in the background # If not installed or if no theme provided, does nothing (does NOT throw an error) # Changes the Mailspring theme to the provided string if a Mailspring config can be found (indicating it is installed) Log "Wallpaper argument is empty, no changes made " 0 0 1 Log "Wallpaper is already $1, no changes made " 0 0 1 Gsettings set picture-uri file:// " $1 " # This if statement allows the wallpaper change to work even when running from a cron jobĮxport DBUS_SESSION_BUS_ADDRESS= $(grep -z DBUS_SESSION_BUS_ADDRESS /proc/ $PID/environ | tr '\0 ' '\n ' | cut -d= -f2- ) # If the argument is empty, does nothing (does NOT throw an error)ĬURRENT_WALLPAPER= " $(gsettings get picture-uri | head -c -2 | tail -c +9 ) "

mailspring config.json location

# Changes the wallpaper to the one given in the argument (if not already set) Log "GTK universal dark preference is already $1, no changes made " 0 0 1 Log "GTK universal dark preference has been set to $1 " Sed -i "s/gtk-application-prefer-dark-theme=.*/gtk-application-prefer-dark-theme= $1/ " " $GTK_UNIVERSAL_PREF_FILE "

mailspring config.json location

|| || log " $GTK_UNIVERSAL_PREF_FILE is not valid " 1 1 # Ensure it is 0 or 1 if not, log the error and exit GTK_UNIVERSAL_PREF_IS_DARK= " $(cat " $GTK_UNIVERSAL_PREF_FILE " | grep -o ) " # Ensure the file exists (if not, create it)Įcho -e '\ngtk-application-prefer-dark-theme=1\n ' > " $GTK_UNIVERSAL_PREF_FILE " GTK_UNIVERSAL_PREF_FILE= ~/.config/gtk-3.0/settings.ini # The location of the universal GTK dark preference config file || || log "GTK universal dark preference can only be set to 0 or 1 " 1 1 # Ensure the provided argument is valid before making the change # Changes the universal GTK dark theme preference based on the provided argument (if they are different) # Echoes 1 if the system dark style is set, 0 otherwise # If $4 is 1, the message is treated as a debug log (only shown if the relevant configuration variable above is set)

MAILSPRING CONFIG.JSON LOCATION CODE

If $3 is 1, echoes a crash message to stderr and exits with code 1 If $2 is 1, redirects to stderr with ERROR prefix.

mailspring config.json location

# Echoes provided string with a date prefix. SHOW_DEBUG_MESSAGES=0 # If debug logs should be printed, set to 1 MAILSPRING_DARK_THEME= 'ui-dark ' # Leave empty to disable Mailspring theme switching on dark theme MAILSPRING_LIGHT_THEME= 'ui-light ' # Leave empty to disable Mailspring theme switching on light theme LIGHT_THEME_WALLPAPER= '/usr/share/backgrounds/odin.jpg ' # Leave empty to disable wallpaper switching on light themeĭARK_THEME_WALLPAPER= '/usr/share/backgrounds/odin-dark.jpg ' # Leave empty to disable wallpaper switching on dark theme # Note that system updates can reset the forced Flatpak theming, so running the script frequently (every few minutes) is recommended Use a cron job to run the script automatically on a desired schedule you can learn about cron by running `man crontab` in a terminal Change the configuration variables below as needed # It also supports changing themes for the Mailspring email app (both. # It also optionally changes the wallpaper based on the theme # This script forces the system theme to work with regular Debian packages as well as non-curated Flatpak apps # elementaryOS 6 has great dark themes, but they only apply to "curated" appcenter apps






Mailspring config.json location