From 6075dcef09a8871939dafbc29476bef2ed28c7a1 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Sun, 4 May 2014 17:06:12 +0200 Subject: [PATCH] replace Xdefaults with Xresources --- .gitignore | 2 +- Xdefaults.in => Xresources.in | 0 setup.sh | 14 +++++++------- xinitrc | 5 ++++- 4 files changed, 12 insertions(+), 9 deletions(-) rename Xdefaults.in => Xresources.in (100%) diff --git a/.gitignore b/.gitignore index e7794fe..91efa70 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ # Generated with m4 or awk. -/Xdefaults +/Xresources # Generated by Xmonad. /xmonad/xmonad.errors /xmonad/xmonad.hi diff --git a/Xdefaults.in b/Xresources.in similarity index 100% rename from Xdefaults.in rename to Xresources.in diff --git a/setup.sh b/setup.sh index 9e330d1..368fa0b 100755 --- a/setup.sh +++ b/setup.sh @@ -37,7 +37,7 @@ if installed X; then # Prevent code duplication. Term* rules are for all terminals; XTerm rules # are for XTerm and UXTerm. At the moment XTerm, UXTerm and Rxvt are # supported. - generate Xdefaults .in perl -ne \ + generate Xresources .in perl -ne \ 'if (/^Term/) { s/^Term//; print "XTerm", $_; @@ -50,14 +50,14 @@ if installed X; then } else { print $_; }' - # Xdefaults uses ! as comment instead of #. - sed_i 's/^#/!/' Xdefaults + # Xresources uses ! as comment instead of #. + sed_i 's/^#/!/' Xresources # Use urxvt's pseudo-transparency if compton is not available. Better than # nothing. if ! installed compton; then - echo 'Xdefaults: no compton found, enabling pseudo-transparency' - sed_i 's/^Rxvt\*background/!&/' Xdefaults - sed_i 's/^!NO_COMPTON //' Xdefaults + echo 'Xresources: no compton found, enabling pseudo-transparency' + sed_i 's/^Rxvt\*background/!&/' Xresources + sed_i 's/^!NO_COMPTON //' Xresources fi if test ! "x`os`" = xdarwin; then @@ -72,7 +72,7 @@ if installed X; then link xinitrc.local ~/.xinitrc.local fi link xmodmaprc ~/.xmodmaprc - link Xdefaults ~/.Xdefaults + link Xresources ~/.Xresources link XCompose ~/.XCompose fi diff --git a/xinitrc b/xinitrc index 858cbaa..c4dd1c2 100755 --- a/xinitrc +++ b/xinitrc @@ -108,6 +108,9 @@ xmodmap -e 'keycode 94 = grave asciitilde' # Disable annoying audio bell. Thanks to Sebastian Rachuj. xset b off +# Load settings for programs. Xdefaults is deprecated. +xrdb ~/.Xresources + # Change the background if available. if test -f "$HOME/.background" && test -n "$set_background"; then if installed hsetroot; then @@ -144,7 +147,7 @@ elif test -n "$screen_lock_force"; then error "'xautolock' not found. Auto lock won't work!" fi -# Use compton to get transparent windows. See ~/.Xdefaults for configuration +# Use compton to get transparent windows. See ~/.Xresources for configuration # of urxvt. if installed compton; then compton & -- 2.45.2