view bin/setup-X.sh @ 912:5d9c08d2a090 default tip

nvm
author Jeff Hammel <k0scist@gmail.com>
date Wed, 01 May 2024 14:39:53 -0700
parents 17316de10c6a
children
line wrap: on
line source

#!/bin/bash

### daemons
# nm-applet: network manager
# gkrellm: system monitor
# diodon: clipboard manager
# arbtt-capture: arbitrary time tracker
# x-tile: window tiling
# To add: qamixer (well, some mixer); gnome-activity journal
for i in nm-applet gkrellm diodon arbtt-capture x-tile
do
    if which ${i}
    then
        if ! pidof -x ${i}
        then
            echo "not running: $i"
            ${i} &
        fi
    fi
done

# TODO: add workspace specific programs

# ssh-add
if [[ `ssh-add -l` != *id_?sa* ]]
then
 GUI_SSH_ASKPASS=/usr/bin/ksshaskpass
 if [[ -e "${GUI_SSH_ASKPASS}" ]]
 then
   SSH_ASKPASS=${GUI_SSH_ASKPASS} ssh-add
 elif [[ -n "$PS1" ]]
 then
             # http://www.cyberciti.biz/faq/linux-unix-bash-check-interactive-shell/

   echo "not running ssh-add: PS1 not found"
 else
   ssh-add # interactive terminal
 fi
fi

if type xautolock
then
    xautolock -time 5 -locker 'i3lock -n -c 000000'
fi