dot

packages and services management
Log | Files | Refs | README

commit 8967b380a07fcf6a58c3822761b1f72c75f5b9c7
parent db08d3a5f4590b1e51f53108fef9ffb3ab314d85
Author: Josuah Demangeon⠠⠵ <mail@josuah.net>
Date:   Wed, 15 Mar 2017 19:09:43 +0100

vertical screen setup

Diffstat:
M.config/dwm/config.h | 2+-
M.profile | 2+-
Abin/scr-rotate | 15+++++++++++++++
Mbin/status | 6+++---
Dbin/tty-rotate | 8--------
5 files changed, 20 insertions(+), 13 deletions(-)

diff --git a/.config/dwm/config.h b/.config/dwm/config.h @@ -17,7 +17,7 @@ static const int showbar = 1; /* 0 means no bar */ static const int topbar = 1; /* 0 means bottom bar */ /* tagging */ -static const char *tags[] = { "1", "2", "3 web", "4 doc", "5 media" }; +static const char *tags[] = { "1", "2", "3 ○", "4 ▤", "5 ♫" }; static const Rule rules[] = { /* xprop(1): diff --git a/.profile b/.profile @@ -40,7 +40,7 @@ PS1='$( printf "\033[?6c" printf "\033]0;%s\007" "$(git-pwd)" # terminal name - printf "\n%s%1s%1s• " "$host" "$git" "$error" + printf "\n%s%1s• " "$host" "$git$error" )' PS2=': ' PS3=': ' diff --git a/bin/scr-rotate b/bin/scr-rotate @@ -0,0 +1,15 @@ +# rotate the screen in TTY or GUI + +if [ "$DISPLAY" ] +then + xrandr --output "$( + xrandr -q | grep -w connected | cut -d ' ' -f 1 + )" --rotate "$1" +else + case "$1" in + ( u | up ) printf 0 ;; + ( r | right ) printf 1 ;; + ( d | down ) printf 2 ;; + ( l | left ) printf 3 ;; + esac | sudo tee /sys/class/graphics/fbcon/rotate_all > /dev/null +fi diff --git a/bin/status b/bin/status @@ -2,7 +2,7 @@ SEPARATOR=' ' -START=' ' +START=' ' STOP=' ' @@ -24,7 +24,7 @@ status_mail() status_date() { - date +'%Y-%m-%d %H:%M' + date +'%m/%d %H:%M' } @@ -32,7 +32,7 @@ status_cpu() { read -r latest_1 latest_5 latest_15 trailing < /proc/loadavg - printf '%s %s %s' "$latest_1" "$latest_5" "$latest_15" + printf '%s' "$latest_1" # "$latest_5" "$latest_15" } diff --git a/bin/tty-rotate b/bin/tty-rotate @@ -1,8 +0,0 @@ -# rotate the screen while in TTY - -case "$1" in -( u | up ) printf 0 ;; -( r | right ) printf 1 ;; -( d | down ) printf 2 ;; -( l | left ) printf 3 ;; -esac | sudo tee /sys/class/graphics/fbcon/rotate_all > /dev/null