dot

packages and services management
Log | Files | Refs | README

commit ba3994f61a896bd3a8852402b8e018d52c6c46ca
parent e410fff3a0ea591277a3dc0f27235ad963355913
Author: josuah <mail@josuah.net>
Date:   Fri, 18 Nov 2016 16:53:16 +0100

Small fixes

Diffstat:
M.profile | 17++++++++++++-----
M.xinitrc | 7++++---
MREADME | 48++++++++++++++++++++++++------------------------
Mbin/build | 2+-
Mbin/status | 13++++++++-----
Mbuild/dmenu | 10++++------
Mdvtm/config.h | 14+++++++-------
7 files changed, 60 insertions(+), 51 deletions(-)

diff --git a/.profile b/.profile @@ -26,15 +26,21 @@ export PAGER="less -R" export MANPAGER="$PAGER" export DVTM_EDITOR="$PAGER" -PS1='$( +export PS1='$( [ $? -eq 0 ] && color=2 || color=1 + # cursor shape + printf "\033[?6c" + + # status line printf "\n%$(stty size | cut -d " " -f 2)s\r%s" \ "$(status)" "$(status path "$PWD")" - printf "\033[1;3%sm\n ─── \033[0m" "$color" + + # prompt character + printf "\033[1;3%sm\n ─── \[\033[0m\]" "$color" )' -PS2=' > ' -PS3=' > ' +export PS2=' > ' +export PS3=' > ' alias l='ls -lhF --color' @@ -150,7 +156,8 @@ remove_prefix() light() { printf '%s\n' "$1" | sudo tee "$( - sudo find -L /sys/class/backlight/ -maxdepth 2 -name brightness + sudo find -L /sys/class/backlight -maxdepth 2 -name brightness | + head -n 1 )" } diff --git a/.xinitrc b/.xinitrc @@ -5,8 +5,9 @@ setxkbmap -layout us -option compose:ralt -variant dvorak while xsetroot -name "$(status)" do sleep 4 -done & -nm-applet & -st +done & + +nm-applet & +st & exec dwm diff --git a/README b/README @@ -25,30 +25,30 @@ DIRECTORY STRUCTURE """ Config/ Root of the Config repo, to put anywhere - | - `- vim/ - | `- .vimrc Linked as ~/.vimrc - | `- .vim/vimrc Linked in ~/.vim/vimrc - | - `- git - | `- config/config Linked in ~/.config/git/config. - | `- config/ignore Linked in ~/.config/git/ignore. - | - `- dwm/ - | `- config.h Resource to compile dwm (not linked). - | `- dwm-pertag-6.1.diff Patch automatically applied while installing. - | - `- ... - | - `- build/ Script used to download and install programs. - | `- dwm.sh - | `- libcurses.sh - | `- ... - | - `- SCRIPTS/ - `- build.sh Package manager using build/* recipes. - `- link.sh Script linking the dotfiles. - `- ... Other tools for data and configurations... + │ + ├─ vim/ + │ ├─ .vimrc Linked as ~/.vimrc + │ └─ .vim/vimrc Linked in ~/.vim/vimrc + │ + ├─ git + │ ├─ config/config Linked in ~/.config/git/config. + │ └─ config/ignore Linked in ~/.config/git/ignore. + │ + ├─ dwm/ + │ ├─ config.h Resource to compile dwm (not linked). + │ └─ dwm-pertag-6.1.diff Patch automatically applied while installing. + │ + ├─ ... + │ + ├─ build/ Script used to download and install programs. + │ ├─ dwm.sh + │ ├─ libcurses.sh + │ └─ ... + │ + └─ SCRIPTS/ + ├─ build.sh Package manager using build/* recipes. + ├─ link.sh Script linking the dotfiles. + └─ ... Other tools for data and configurations... """ As you can see, in each program's directory, you can use "config" diff --git a/bin/build b/bin/build @@ -12,7 +12,7 @@ help() { printf '%s\n' " -Usage: ${0##*-} COMMAND PACKAGE +Usage: ${0##*/} COMMAND PACKAGE COMMAND d[ownload] Download PACKAGE's sources diff --git a/bin/status b/bin/status @@ -1,3 +1,4 @@ +#!/bin/sh # | | # ,--- |-- ,--. |-- , , ,--- # `--. | ,--| | | | `--. @@ -23,7 +24,9 @@ status_path() [ -z "${pwd##$HOME*}" ] && printf ~%s "${pwd#$HOME}" || printf %s "$pwd" - cd "$pwd" && git rev-parse &>/dev/null || return 0 + cd "$pwd" + + git rev-parse 2> /dev/null || return 0 git status --porcelain -b | awk ' /^## / { @@ -57,7 +60,7 @@ status_path() m == 1 { m = 0; } END { - printf(" \033[1m%s", branch); + printf(" \033[1m%s\033[0m", branch); if (untracked + conflicts + changed + staged + behind + ahead \ == 0) { @@ -67,8 +70,8 @@ status_path() if (conflicts) printf " \033[31m!\033[0m%d", conflicts; if (changed ) printf " \033[32m+\033[0m%d", changed ; if (staged ) printf " \033[34m*\033[0m%d", staged ; - if (behind ) printf " \033[35m↓\033[0m%d", behind ; - if (ahead ) printf " \033[35m↑\033[0m%d", ahead ; + if (behind ) printf " \033[31m↓\033[0m%d", behind ; + if (ahead ) printf " \033[36m↑\033[0m%d", ahead ; } }' } @@ -128,7 +131,7 @@ status_battery() if [ -f "$battery" ] then IFS='' read -r battery < "$battery" - printf 'bat %d%%' "$battery" + printf '%d%%' "$battery" fi } diff --git a/build/dmenu b/build/dmenu @@ -4,11 +4,10 @@ tar=http://dl.suckless.org/tools/dmenu-4.6.tar.gz build() { - cp -f "$CONFIG/$1/config.mk" . - cp -f "$CONFIG/$1/config.h" . - cc stest.c -o stest cp stest "$PREFIX/bin/stest" - make + + sed -i '/^FREETYPEINC = \$/ s/^/#/' config.mk + make PREFIX="$PREFIX" install clean -}- \ No newline at end of file +} diff --git a/dvtm/config.h b/dvtm/config.h @@ -105,13 +105,13 @@ static KeyBinding bindings[] = { { { MOD, 'J', }, { focusnextnm, { NULL } } }, { { MOD, 'K', }, { focusprevnm, { NULL } } }, { { MOD, 'k', }, { focusprev, { NULL } } }, - { { MOD, 'f', }, { setlayout, { " │├┤f " } } }, - { { MOD, 'g', }, { setlayout, { " ├┼┤g " } } }, - { { MOD, 'b', }, { setlayout, { " ├┬┤b " } } }, - { { MOD, 'u', }, { setlayout, { " ├┴┤u " } } }, - { { MOD, 'n', }, { setlayout, { " ├─┤n " } } }, - { { MOD, 'o', }, { setlayout, { " │@│o " } } }, - { { MOD, 'm', }, { setlayout, { " │ │m " } } }, + { { MOD, 'f', }, { setlayout, { " │├┤f " } } }, + { { MOD, 'g', }, { setlayout, { " ├┼┤g " } } }, + { { MOD, 'b', }, { setlayout, { " ├┬┤b " } } }, + { { MOD, 'u', }, { setlayout, { " ├┴┤u " } } }, + { { MOD, 'n', }, { setlayout, { " ├─┤n " } } }, + { { MOD, 'o', }, { setlayout, { " │@│o " } } }, + { { MOD, 'm', }, { setlayout, { " │ │m " } } }, { { MOD, ' ', }, { setlayout, { NULL } } }, { { MOD, 'i', }, { incnmaster, { "+1" } } }, { { MOD, 'd', }, { incnmaster, { "-1" } } },