Move Xresources to comply to XDG

Moved Xresources to XDG compliant directory. Will make future styler
settings easier.
This commit is contained in:
Marty Oehme 2020-01-31 00:13:06 +01:00
parent edfb305ef3
commit 6ed90134a3
8 changed files with 22 additions and 102 deletions

View file

@ -0,0 +1,11 @@
! ~/.Xresources
! Setting up commonly changed vars
#define myfontsize 11
#define myfont Iosevka Mono
#define myOpacity 90
! Font settings
#include "Xresources.d/fonts"
! Colorscheme

View file

@ -0,0 +1,7 @@
Xft.antialias: 1
Xft.autohint: 0
Xft.dpi: 92
Xft.hinting: true
Xft.hintstyle: hintslight
Xft.lcdfilter: lcddefault
Xft.rgba: rgb

View file

@ -1,48 +0,0 @@
! +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
! title Nord XResources +
! project nord-xresources +
! version 0.1.0 +
! repository https://github.com/arcticicestudio/nord-xresources +
! author Arctic Ice Studio +
! email development@arcticicestudio.com +
! copyright Copyright (C) 2016 +
! +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#define nord0 #2E3440
#define nord1 #3B4252
#define nord2 #434C5E
#define nord3 #4C566A
#define nord4 #D8DEE9
#define nord5 #E5E9F0
#define nord6 #ECEFF4
#define nord7 #8FBCBB
#define nord8 #88C0D0
#define nord9 #81A1C1
#define nord10 #5E81AC
#define nord11 #BF616A
#define nord12 #D08770
#define nord13 #EBCB8B
#define nord14 #A3BE8C
#define nord15 #B48EAD
*.foreground: nord4
*.background: [myOpacity]nord0
*.cursorColor: nord4
*fading: 0
*fadeColor: nord3
*.color0: nord1
*.color1: nord11
*.color2: nord14
*.color3: nord13
*.color4: nord9
*.color5: nord15
*.color6: nord8
*.color7: nord5
*.color8: nord3
*.color9: nord11
*.color10: nord14
*.color11: nord13
*.color12: nord9
*.color13: nord15
*.color14: nord7
*.color15: nord6

View file

@ -1,37 +0,0 @@
!Font
URxvt.font: xft:myfont:size=myfontsize,style=medium
URxvt.boldFont: xft:myfont:size=myfontsize,style=bold
URxvt.italicFont: xft:myfont:size=myfontsize,style=italic
URxvt.boldItalicFont: xft:myfont:size=myfontsize,style=bold,italic
URxvt.letterSpace: -1
!UI
URxvt.scrollBar: false
URxvt.borderless: true
URxvt.saveLines: 20000
URxvt.dynamicColors: true
URxvt.fading: 25
!Sane utility defaults
URxvt.loginShell: true
URxvt.scrollTtyKeypress: true
URxvt.scrollTtyOutput: false
URxvt.scrollWithBuffer: false
URxvt.skipScroll: true
!Extensions
!Tabbing disabled by default (TMUX used for tabbed terminals)
!to enable tabbing comment the bottom line and uncomment the one above.
!URxvt.perl-ext-common: default,matcher,tabbed
URxvt.perl-ext-common: default,matcher
! Link Clicking
URxvt.url-launcher: /usr/bin/xdg-open
URxvt.matcher.button: 1
URxvt.matcher.rend.0: Uline Bold fg5
!Tab Styling
URxvt.tabbed.tabbar-fg: 2
URxvt.tabbed.tabbar-bg: 0
URxvt.tabbed.tab-fg: 3
URxvt.tabbed.tab-bg: 0

View file

@ -0,0 +1,82 @@
#!/bin/sh
userresources=$XDG_CONFIG_HOME/xresources/Xresources
usermodmap=$XDG_CONFIG_HOME/xresources/Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap
# merge in defaults and keymaps
if [ -f $sysresources ]; then
xrdb -merge $sysresources
fi
if [ -f $sysmodmap ]; then
xmodmap $sysmodmap
fi
if [ -f "$userresources" ]; then
xrdb -merge "$userresources"
fi
if [ -f "$usermodmap" ]; then
xmodmap "$usermodmap"
fi
# start some nice programs
if [ -d /etc/X11/xinit/xinitrc.d ]; then
for f in /etc/X11/xinit/xinitrc.d/?*.sh; do
[ -x "$f" ] && . "$f"
done
unset f
fi
# Remaps Capslock key to control.
# (only works for x environment - I haven't needed it for non-x yet)
setxkbmap -option ctrl:nocaps
# sets default to EURkey layout, with possibility to switch to german
# sets german layout to be default for the only pc I have with a german keyboard
if [ "$HOST" = "marty-desk" ] || [ "$HOSTNAME" = "marty-desk" ]; then
setxkbmap -layout de,eu
else
setxkbmap -layout eu,de
fi
# allows switching layouts with alt+space
setxkbmap -option grp:alt_shift_toggle
# Makes Capslock behave as escape - when ONLY capslock is pressed and released
# this only works when we already substitute a ctrl for caps with the lines above,
# otherwise control itself will act as escape.
# Needs xcape package installed. https://github.com/alols/xcape
# set a timeout of 500ms, if pressed longer it will ignore esc
type xcape >/dev/null 2>&1 && xcape -e 'Control_L=Escape' -t 500
# if unclutter exists start it
type unclutter >/dev/null 2>&1 && unclutter &
# if picom exists then we can start it as our compositor
type picom >/dev/null 2>&1 && picom &
# same deal with flashfocus as our active window indicator
type flashfocus >/dev/null 2>&1 && flashfocus -l never &
# if redshift is installed run it
type redshift >/dev/null 2>&1 && redshift &
# if sxhkd - the key-binding daemon is installed, start it up
type sxhkd >/dev/null 2>&1 && sxhkd &
# if greenclip - a clipboard manager, integrated with rofi, is installed, start it up
type greenclip >/dev/null 2>&1 && greenclip daemon &
# if pywal is installed,
# -R restores the last colorscheme that was in use.
type wal >/dev/null 2>&1 && wal -R &
# if nextcloud-client exists, start it up
type nextcloud >/dev/null 2>&1 && nextcloud --background &
# additional config options for Touchpad devices ONLY
if [ $(dmesg | grep -c "Touchpad") -gt 0 ]; then
# enable touch tapping for XPS13 touchpad - for different devices get the touchpad name with xinput list-prop <TAB>
xinput set-prop "DLL075B:01 06CB:76AF Touchpad" "libinput Tapping Enabled" 1
fi
type i3 >/dev/null 2>&1 && exec i3