]> ruderich.org/simon Gitweb - config/dotfiles.git/blob - shell/shell/functions
herbstluftwm/autostart: add bindings to run programs and select windows
[config/dotfiles.git] / shell / shell / functions
1 # Shell functions useful to all shells.
2
3 # Copyright (C) 2011-2014  Simon Ruderich
4 #
5 # This file is free software: you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation, either version 3 of the License, or
8 # (at your option) any later version.
9 #
10 # This file is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 # GNU General Public License for more details.
14 #
15 # You should have received a copy of the GNU General Public License
16 # along with this file.  If not, see <http://www.gnu.org/licenses/>.
17
18
19 # Source $1 if it exists. And $1.local if it exists as well.
20 source_config() {
21     if test -f "$1"; then
22         . "$1"
23     fi
24
25     if test -f "$1.local"; then
26         . "$1.local"
27     fi
28 }
29
30 # vim: ft=sh