This one set the tag, just like in dwm, printing the name of a function "tag#", with # being a tag number, to a named pipe (a FIFO), that dvtm reads for automation.
The functions must be declared in the config.h with something like:
Then, I set alias for most used software, to open them in dedicated tag immediately: [url=github.com/sshbio/dot/raw/master/.profile].profile
Code:
alias vis='tag 2 vis $VISUAL'
alias web='tag 3 web $BROWSER'
alias man='tag 3 man man'
alias irc='tag 4 irc irc'
alias mail='tag 4 mail mail'
alias vol='tag 5 volume "alsamixer -c 1"'
alias grex='tag 6 grex ssh josuahdemangeon@grex.org'
Finally, whenever I return from the program to the shell, I tag it automatically to the "shell" tag by calling the <code>tag</code> function in my PS1:
Code:
export PS1='$(tag 1 "${PWD/$HOME/~}" "")> '
PS: DVTM has to be started with the -c option to set the name of the named pipe to listen from:
Code:
dvtm -c <whatever fifo>
Compilation. I have a few projects I prefer to compile myself, like if I want to change one of the files (like the config.h), apply a patch (like for dwm, st, or if I made my own patch, edited the source).
Then I can keep my few "custom" software up to date, without having to download .tar.gz > extract > compile each software the way it needs to > install it in my custom $PREFIX.
The way it is implemented is quite dumb:
Code:
source config dir
|_ one dir per project
| |_ at least the build.sh script
| |_ eventually other resources, used by the build.sh script, like config.h, or patches
|_ one default build script, as for most software, this just works:
build()
{
for patch in $(find "$DOT/src/$1" -name '*.diff')
do patch -p1 < "$patch"
done
make
make prefix="$PREFIX" PREFIX="$PREFIX" install clean
return 0
}
Each build.sh script has:
- One commented line with a description.
- One <code>tar</code> variable with an url to a .tar.gz archive to the source.
- Eventually a <code>build()</code> function, if the default one does not work.