From 62890e057dc3fd1fdf4aec189b69451909f0160c Mon Sep 17 00:00:00 2001 From: Rodolphe Breard Date: Mon, 9 Feb 2015 21:47:17 +0100 Subject: [PATCH] checking the existence of some commands --- .xinitrc | 9 +++++---- .zshrc | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.xinitrc b/.xinitrc index 8f82752..003ca54 100755 --- a/.xinitrc +++ b/.xinitrc @@ -1,13 +1,14 @@ [ -f /etc/xprofile ] && . /etc/xprofile [ -f ~/.xprofile ] && . ~/.xprofile [ -f ~/.Xresources ] && xrdb -merge ~/.Xresources -/usr/bin/xcompmgr & -/usr/bin/xscreensaver -no-splash & -eval $(/usr/bin/gpg-agent --daemon --enable-ssh-support --write-env-file "${HOME}/.gpg-agent-info") + +hash xcompmgr 2>/dev/null && xcompmgr & +hash xscreensaver 2>/dev/null && xscreensaver -no-splash & +hash gpg-agent 2>/dev/null && eval $(gpg-agent --daemon --enable-ssh-support --write-env-file "${HOME}/.gpg-agent-info") DEFAULT_SESSION=awesome case "$1" in - default|awesome|"") + awesome|default|"") exec awesome ;; qtile) diff --git a/.zshrc b/.zshrc index 79d8b6e..7da9ca2 100644 --- a/.zshrc +++ b/.zshrc @@ -51,6 +51,6 @@ alias grep='grep -n --color=auto' alias j='jobs' alias ne='emacs' alias df='df -h' -alias top='TERM=screen-256color htop' alias weechat='TERM=screen-256color weechat' alias lock='xscreensaver-command --lock' +hash htop 2>/dev/null && alias top='TERM=screen-256color htop'