Skip to content

Installation and Configuration

ctx edited this page Aug 6, 2017 · 18 revisions

Dependencies

Installation and Configuration

  1. Optain the source. On archlinux you can use the aur.

  2. Choose S_LIB_FOLDER:

    • Use make install to install the core files to /usr/lib/ws-session, config files to /etc/xdg/ws-session/ and the default wrappers to /etc/xdg/ws-session/bin.
    • Export S_LIB_FOLDER="/path/to/source", if you don't install to /usr/lib/ws-session.
  3. Choose S_CONFIG_FOLDER

    • Copy the template ws-session.rc to $HOME/.ws-session.rc.
    • If you have set XDG_CONFIG_HOME as environment variable you can copy it to $XDG_CONFIG_HOME/ws-session/ws-session.rc.
    • Adjust your ws-session.rc to your liking.
  4. Choose S_DATA_FOLDER

    • If your env contains XDG_DATA_HOME you could use $XDG_DATA_HOME/ws-session
    • Any folder could be used e.g. $HOME/.ws-session/sessions
  5. ws-app is a wrapper to start all programs in app/. You have to link it to your $PATH for all the apps you want to use e.g: ln -s /usr/bin/ws-app $HOME/bin/vim;ln -s /usr/bin/ws-app $HOME/bin/zathura;...

  6. Put your own versions of $S_LIB_FOLDER/{app,wm}/* to $S_CONFIG_FOLDER/{app,wm}/* if you have new ones or if you want to change the default behaviour of an app or a wm.

  7. Configure your applications. In this example (zsh) there is a dedicated shell history and dirstack for every session and man, htop, mutt and tig will be restored:

sessionpath="$(ws-session -p 2>/dev/null)"
sessionpath=${sessionpath:-$HOME/.}
if ! [[ $sessionpath == "$HOME/." ]];then
  setopt complete_aliases
  alias man='ws-cmd man'
  alias htop='ws-cmd htop'
  alias mutt='ws-cmd mutt'
  alias ncmpcpp='ws-cmd ncmpcpp'
  alias tig='ws-cmd tig'
fi
export HISTFILE="${sessionpath}zsh_history"
export DIRSTACKFILE="${sessionpath}zdirs"
unset sessionpath
Clone this wiki locally