adding cursor theme support

This commit is contained in:
Adam Laughlin 2019-01-04 19:18:30 -05:00
parent 6c966b05ae
commit e64b4d29f9

View file

@ -64,6 +64,7 @@ print_info() {
info "WM Theme" wm_theme
info "Theme" theme
info "Icons" icons
info "Cursor" cursor
info "Terminal" term
info "Terminal Font" term_font
info "CPU" cpu
@ -2594,6 +2595,18 @@ get_style() {
kde_font_size="${kde_font_size/,*}"
kde_theme="${kde_theme/,*} ${kde_theme/*,} ${kde_font_size}"
fi
if [[ "$kde" == "cursorTheme" ]]; then
if [[ -f "${kde_config_dir}/kcminputrc" ]]; then
kde_config_file="${kde_config_dir}/kcminputrc"
kde_theme="$(grep "cursorTheme" "$kde_config_file")"
kde_theme="${kde_theme/*=}"
elif [[ -f "${kde_config_dir}/startupconfig" ]]; then
kde_config_file="${kde_config_dir}/startupconfig"
kde_theme="$(grep "cursortheme" "$kde_config_file")"
kde_theme="${kde_theme/*=}"
fi
fi
kde_theme="$kde_theme [KDE], "
else
err "Theme: KDE config files not found, skipping."
@ -2733,6 +2746,17 @@ get_font() {
font="$theme"
}
get_cursor() {
name="gtk-cursor-theme-name"
gsettings="cursor-theme"
gconf="cursor_theme"
xfconf="/Gtk/CursorThemeName"
kde="cursorTheme"
get_style
cursor="$theme"
}
get_term() {
# If function was run, stop here.
((term_run == 1)) && return