summaryrefslogtreecommitdiff
path: root/zsh/.zsh/functions
blob: 7c2b49a611263d6e22f56fdd7e111e901669656c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/zsh

function colo {

    # Change colors for current session
    $HOME/bin/recolor < ~/.Xresources/$1

    # Load Xresources file for future sessions
    xrdb -I$HOME ~/.Xresources/$1

    # Change environment variable
    export COLORSCHEME=$1

    # Change default environment variable for future sessions
    sed -i --follow-symlinks "s/^export COLORSCHEME=.*$/export COLORSCHEME=$1/g" ~/.zsh/tmp
}