From 0795297c929cf80408a74c1889ace7d412d055fd Mon Sep 17 00:00:00 2001 From: xyz Date: Sun, 11 Apr 2021 02:43:48 -0700 Subject: debug startx, set dwm status bar --- .bashrc | 9 +++++---- .xinitrc | 3 ++- programs/my_scripts/set_dwm_status_bar.sh | 4 ++++ 3 files changed, 11 insertions(+), 5 deletions(-) create mode 100755 programs/my_scripts/set_dwm_status_bar.sh diff --git a/.bashrc b/.bashrc index 9af00866..ce0e1b12 100644 --- a/.bashrc +++ b/.bashrc @@ -8,10 +8,6 @@ alias ls='ls -lah --color=auto' PS1='[\u@\h \W]\$ ' -if [ -z "${DISPLAY}" ] && [ "${XDG_VTNR}" -eq 1 ]; then - exec startx -fi - alias cfgc='/usr/bin/git --git-dir=$HOME/.mycfg_cross_platform/ --work-tree=$HOME' alias cfgl='/usr/bin/git --git-dir=$HOME/.mycfg_local/ --work-tree=$HOME' @@ -22,3 +18,8 @@ export XDG_DATA_HOME="$HOME/.local/share" export SSH_AUTH_SOCK="XDG_RUNTIME_DIR/ssh-agent.socket" export MANPAGER='nvim +Man!' + +# startx when login, should be put after environmental variables so .xinitrc can use $XDG_CONFIG_HOME +if [ -z "${DISPLAY}" ] && [ "${XDG_VTNR}" -eq 1 ]; then + exec startx +fi diff --git a/.xinitrc b/.xinitrc index e32ec2bf..8f1c8ffd 100644 --- a/.xinitrc +++ b/.xinitrc @@ -32,6 +32,7 @@ if [ -d /etc/X11/xinit/xinitrc.d ] ; then unset f fi -xwallpaper --maximize $HOME/.config/wallpaper.png +$HOME/programs/my_scripts/set_dwm_status_bar.sh & +xwallpaper --maximize $XDG_CONFIG_HOME/wallpaper.png redshift & exec dwm diff --git a/programs/my_scripts/set_dwm_status_bar.sh b/programs/my_scripts/set_dwm_status_bar.sh new file mode 100755 index 00000000..0fc801db --- /dev/null +++ b/programs/my_scripts/set_dwm_status_bar.sh @@ -0,0 +1,4 @@ +while true; do + xsetroot -name "$(date "+%H:%M:%S %m/%d/%Y") | $(cat /sys/class/power_supply/BAT1/capacity)%" + sleep 1 +done -- cgit v1.2.3-70-g09d2