├── bars ├── .gitignore ├── gonzalo │ ├── .cwmrc │ ├── .xsession │ └── termbar └── vetelko │ ├── .cwmrc │ ├── .xsession │ └── termbar ├── readme.md └── screenshot.png /bars/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vetelko/termbar/67f2e424385b3b5815c6a39133d42e973347e52b/bars/.gitignore -------------------------------------------------------------------------------- /bars/gonzalo/.cwmrc: -------------------------------------------------------------------------------- 1 | # Autogroups for windows. 2 | autogroup 0 xconsole,XConsole 3 | autogroup 3 "firefox,firefox-bin" 4 | 5 | # Add missing keybindings. 6 | bind-key M-1 group-only-1 7 | bind-key M-2 group-only-2 8 | bind-key M-3 group-only-3 9 | bind-key M-4 group-only-4 10 | bind-key M-5 group-only-5 11 | bind-key M-6 group-only-6 12 | bind-key M-7 group-only-7 13 | bind-key M-8 group-only-8 14 | bind-key M-9 group-only-9 15 | bind-key MS-1 window-movetogroup-1 16 | bind-key MS-2 window-movetogroup-2 17 | bind-key MS-3 window-movetogroup-3 18 | bind-key MS-4 window-movetogroup-4 19 | bind-key MS-5 window-movetogroup-5 20 | bind-key MS-6 window-movetogroup-6 21 | bind-key MS-7 window-movetogroup-7 22 | bind-key MS-8 window-movetogroup-8 23 | bind-key MS-9 window-movetogroup-9 24 | 25 | bind-key MS-space window-htile 26 | bind-key M-space window-vtile 27 | 28 | bind-key C-Up pointer-move-up 29 | bind-key C-Down pointer-move-down 30 | bind-key C-Right pointer-move-right 31 | bind-key C-Left pointer-move-left 32 | 33 | bind-key CS-Up pointer-move-up-bigbind-key 34 | bind-key CS-Down pointer-move-down-big 35 | bind-key CS-Right pointer-move-right-big 36 | bind-key CS-Left pointer-move-left-big 37 | 38 | bind-key MS-l lock 39 | bind-key MS-r restart 40 | bind-key MS-q quit 41 | bind-key MS-Return terminal 42 | bind-key MS-p menu-exec 43 | 44 | ## Windows 45 | borderwidth 3 46 | color activeborder '#202060' 47 | color font '#000000' 48 | color selfont '#e9ffe9' 49 | color inactiveborder 'rgb:31/31/31' 50 | color menubg '#494949' 51 | color menufg '#202060' 52 | 53 | fontname "dejavu sans mono:size=7" 54 | gap 26 0 0 0 55 | 56 | ignore "xconsole" 57 | ignore "termbar" 58 | 59 | autogroup 0 "termbar,termbar" 60 | 61 | command firefox firefox 62 | command xterm xterm 63 | 64 | moveamount 4 65 | snapdist 25 66 | sticky yes 67 | -------------------------------------------------------------------------------- /bars/gonzalo/.xsession: -------------------------------------------------------------------------------- 1 | xterm -geometry 320x1+0+0 -fa "mono:size=14" -bg "black" \ 2 | -fg grey -fs 11 -name termbar -class termbar \ 3 | -T termbar -e ~/code/termbar & 4 | -------------------------------------------------------------------------------- /bars/gonzalo/termbar: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | while true; do 4 | CPU_SPEED=$(sysctl hw.cpuspeed | cut -d "=" -f 2 | cut -d "." -f 1) 5 | CPU_TEMP=$(sysctl hw.sensors.cpu0.temp0 | cut -d "=" -f 2 | cut -d "." -f 1) 6 | RAM=$(top | grep Memory | awk {'print $3'}) 7 | BAT_STATUS=$(sysctl hw.sensors.acpiac0.indicator0 | cut -d "=" -f 2 | cut -d "." -f 1) 8 | BAT=$(apm -l) 9 | DATE=$(date) 10 | NWID=$(ifconfig | grep ieee | awk {'print $3'}) 11 | IP=$(dig +short myip.opendns.com @resolver1.opendns.com) 12 | echo -en " $USER | $DATE | CPU: $CPU_SPEED - $CPU_TEMP° | Ram: $RAM | Bat: $BAT - \ 13 | $BAT_STATUS | Nwid: $NWID | Public IP: $IP\r" 14 | sleep 1 15 | done 16 | -------------------------------------------------------------------------------- /bars/vetelko/.cwmrc: -------------------------------------------------------------------------------- 1 | unbind-key all 2 | unbind-mouse all 3 | 4 | fontname "Sans:pixelsize=30" 5 | moveamount 10 6 | snapdist 9 # use lower number than moveamount 7 | 8 | ignore pany 9 | ignore termbar 10 | 11 | # t b l r 12 | gap 18 0 0 0 13 | sticky yes 14 | 15 | autogroup 0 "pany,Pany" 16 | autogroup 0 "termbar,termbar" 17 | 18 | wm Fvwm /usr/X11R6/bin/fvwm 19 | 20 | borderwidth 1 21 | color activeborder "#555555" 22 | color inactiveborder "#333333" 23 | color font "#000000" 24 | color selfont "#ffffff" 25 | color menubg "#87ceeb" 26 | 27 | 28 | bind-key 4-Return "st-white -g 100x20 -e ksh -l" 29 | bind-key 4S-Return "st -g 100x20 -e ksh -l" 30 | bind-key 4-t "st -g 100x20 -e note" 31 | bind-key 4-p "scrot -s" 32 | bind-key 4-d menu-exec 33 | bind-key 4-g menu-group 34 | bind-key 4-w menu-window 35 | bind-key 4-s menu-ssh 36 | bind-key 4-c menu-cmd 37 | bind-key 4-q menu-exec-wm 38 | 39 | bind-key 4-a window-menu-label 40 | 41 | bind-key 4-f window-maximize # window-fullscreen 42 | bind-key 4-v window-vtile 43 | bind-key 4-x window-htile 44 | 45 | bind-key 4S-V window-vmaximize 46 | bind-key 4S-H window-hmaximize 47 | 48 | bind-key 4-r window-raise 49 | bind-key 4-l window-lower 50 | 51 | bind-key 4C-h window-move-left 52 | bind-key 4C-j window-move-down 53 | bind-key 4C-l window-move-right 54 | bind-key 4C-k window-move-up 55 | 56 | #bind-key M-Tab window-cycle-ingroup 57 | bind-key 4-n window-cycle-ingroup 58 | bind-key 4-Tab window-cycle 59 | 60 | bind-key 4-1 group-only-1 61 | bind-key 4-2 group-only-2 62 | bind-key 4-3 group-only-3 63 | bind-key 4-4 group-only-4 64 | bind-key 4S-1 window-movetogroup-1 65 | bind-key 4S-2 window-movetogroup-2 66 | bind-key 4S-3 window-movetogroup-3 67 | bind-key 4S-4 window-movetogroup-4 68 | 69 | bind-key 4-F12 "zzz" 70 | bind-key 4S-R restart 71 | bind-key 4S-Q window-delete # as kill 72 | bind-key 4S-E quit 73 | 74 | bind-mouse 4-1 window-raise 75 | bind-mouse 4-2 window-resize 76 | bind-mouse 4-3 window-move 77 | bind-mouse 4-4 group-cycle 78 | bind-mouse 4-5 group-rcycle 79 | 80 | -------------------------------------------------------------------------------- /bars/vetelko/.xsession: -------------------------------------------------------------------------------- 1 | # ... 2 | # set xterm geometry and other props according to your needs 3 | 4 | xterm -geometry 320x1+0+0 -fa Consolas -fs 11 -name termbar -class termbar -T termbar -e termbar & 5 | 6 | # ... 7 | -------------------------------------------------------------------------------- /bars/vetelko/termbar: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # This is example. Content of the termbar is up to you. 4 | # Please share your setup. :) 5 | 6 | # Some people like colors 7 | red='\033[0;31m' 8 | rst='\033[0m' 9 | 10 | while true; do 11 | DATE=$(date +"%A, %B %d - %H:%M") 12 | 13 | # Random lines from my openbsd and related cheatsheet 14 | # I want to remember 15 | MEMO=$(sort -R /home/"$USER"/work/openbsd/memoize | head -n1) 16 | 17 | # Don't exit WM while something important is running on workspaces 18 | NVI=$(pgrep -u "$USER" nvi$ | wc -l | tr -d ' ') 19 | TERMS=$(pgrep -u "$USER" st$ | wc -l | tr -d ' ') 20 | SSHS=$(pgrep -u "$USER" ssh$ | wc -l | tr -d ' ') 21 | 22 | # - 23 | CPU=$(sysctl -n hw.sensors.cpu0.temp0 | cut -d. -f1) 24 | 25 | printf " ${red}cwm${rst} %-239s nvis: %s terms: %s sshs: %s cpu: %s° %s\\r" \ 26 | "$MEMO" "$NVI" "$TERMS" "$SSHS" "$CPU" "$DATE" 27 | 28 | sleep 5 29 | done 30 | 31 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | Termbar is a terminal window in the role of status bar. **If you like Termbar idea** please share your scripts with me via pull 2 | requests, pastebins, issues ... Thanks. 3 | 4 | This idea came from assumption that you are using some kind of panel or 5 | bar in your WM and that many window managers **are able to**: 6 | 7 | * create a gap between screen edge and window border 8 | * ignore particular window 9 | * show particular window on all workspaces (sticky windows) 10 | 11 | Requirements: 12 | 13 | * terminal window 14 | * program with output to terminal 15 | 16 | On the following image is Termbar (xterm) showing some info useful for 17 | me e.g number of ssh sessions running. It is very simple example, the 18 | possibilities are endless, you can output anything into Termbar. 19 | 20 | Termbar window is ignored by cwm(1), it is ignored while switching 21 | between windows, it has no border, it is not covered by other windows if 22 | you maximize them. 23 | 24 | [View raw image](https://raw.githubusercontent.com/vetelko/termbar/master/screenshot.png) 25 | 26 | ![Image of Termbar running in cwm](./screenshot.png "Termbar running in cwm") 27 | -------------------------------------------------------------------------------- /screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vetelko/termbar/67f2e424385b3b5815c6a39133d42e973347e52b/screenshot.png --------------------------------------------------------------------------------