From 8d996cb069e3534ec4fe8b78b32547d631c4c805 Mon Sep 17 00:00:00 2001 From: Marc Vertes Date: Fri, 24 Mar 2023 16:27:39 +0000 Subject: update --- .Xresources | 5 ++++- .bashrc | 8 ++++---- .fvwm2rc | 5 +++-- bin/status2 | 27 +++++++++++++++++++++++++++ 4 files changed, 38 insertions(+), 7 deletions(-) create mode 100755 bin/status2 diff --git a/.Xresources b/.Xresources index 45d9f2d..8bbba51 100644 --- a/.Xresources +++ b/.Xresources @@ -24,8 +24,11 @@ URxvt.keysym.C-Next: font-size:decrease xterm*termName: xterm-256color xterm*internalBorder: 4 xterm*VT100.Translations: #override \ + F11: fullscreen(toggle) \n\ Ctrl minus: smaller-vt-font() \n\ - Ctrl equal: larger-vt-font() \n + Ctrl equal: larger-vt-font() \n\ + Shift Ctrl C: copy-selection(CLIPBOARD) \n\ + Shift Ctrl V: insert-selection(CLIPBOARD) \n ! Ctrl Next: smaller-vt-font() \n\ ! Ctrl Prior: larger-vt-font() \n ! Meta minus: smaller-vt-font() \n\ diff --git a/.bashrc b/.bashrc index adafe27..0024146 100644 --- a/.bashrc +++ b/.bashrc @@ -146,7 +146,7 @@ meteo() { eval "$(direnv hook bash)" #export GITHUB_TOKEN=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 -set -o vi -bind -m vi-command ".":insert-last-argument -bind -m vi-command 'Control-l: clear-screen' -bind -m vi-insert 'Control-l: clear-screen' +#set -o vi +#bind -m vi-command ".":insert-last-argument +#bind -m vi-command 'Control-l: clear-screen' +#bind -m vi-insert 'Control-l: clear-screen' diff --git a/.fvwm2rc b/.fvwm2rc index 1973ff7..3c7322d 100644 --- a/.fvwm2rc +++ b/.fvwm2rc @@ -42,8 +42,9 @@ Style "gkrellm" NoTitle, Sticky, WindowListSkip, CirculateSkip # AddToFunc "StartFunction" -+ "I" Module FvwmPager 0 0 -+ "I" Exec dunst ++ I Module FvwmPager 0 0 ++ I Exec status2 +#+ "I" Exec dunst #+ "I" Exec xsetroot -solid rgb:3/4/5 #+ "I" Exec setxkbmap fr #+ "I" Exec synclient VertScrollDelta=-114 diff --git a/bin/status2 b/bin/status2 new file mode 100755 index 0000000..f73bc87 --- /dev/null +++ b/bin/status2 @@ -0,0 +1,27 @@ +#!/bin/sh + +ip() { + while read -r w1 w2 w3; do + [ $w1 = /32 ] && [ $w2 = host ] && [ $ip != 127.0.0.1 ] && break + ip=$w2 + done < /proc/net/fib_trie +} + +power() { + while read -r line; do + case $line in POWER_SUPPLY_CAPACITY*) power=${line#*=}% && break;; esac + done < /sys/class/power_supply/macsmc-battery/uevent +} + +status() { + power + ip + sound="$(pamixer --get-volume-human)" + clock="$(date +'%a %d %b %H:%M')" +} + +while true; do + status && echo "$ip , power $power , sound $sound , $clock" + sleep 17 +done | +root-tail -g '800x24-80-0' -fn '-Sony-*-*-*-*-*-24-*-*-*-*-*-*-*' --color grey70 - -- cgit v1.2.3