dotfiles

*nix config files
git clone git://git.pyratebeard.net/dotfiles.git
Log | Files | Refs | README

commit 18bfe6e7f18d4feb221215b7bac927d920c75839
parent 08e65520a0acb154a500fcfe9aed192558389b7b
Author: pyratebeard <root@pyratebeard.net>
Date:   Tue, 14 Jul 2020 22:04:17 +0100

:fire: no longer needed

Diffstat:
Dbin/bin/check-battery.sh | 74--------------------------------------------------------------------------
Dbin/bin/tmux-status | 111-------------------------------------------------------------------------------
Dnewsboat/.newsboat/config.dreyfus | 43-------------------------------------------
3 files changed, 0 insertions(+), 228 deletions(-)

diff --git a/bin/bin/check-battery.sh b/bin/bin/check-battery.sh @@ -1,74 +0,0 @@ -#!/usr/bin/env bash - -BAT_NUM='0' -STATUS_FILE=/tmp/check-bat.tmp -BATTPERC=$(cat /sys/class/power_supply/BAT${BAT_NUM}/capacity) -BATTSTATUS=$(cat /sys/class/power_supply/BAT${BAT_NUM}/status) -LAST_STATUS='' -LAST_NOTIF_LEVEL=0 -NOTIF_LEVEL=0 - -if [ -e $STATUS_FILE ] ; then - . $STATUS_FILE -fi - -save_status() { - LAST_STATUS=$BATTSTATUS - echo "LAST_STATUS=${BATTSTATUS}" > $STATUS_FILE - echo "LAST_NOTIF_LEVEL=${NOTIF_LEVEL}" >> $STATUS_FILE -} - -notify() { - level=$1 - msg=$2 - DISPLAY=:0 /usr/bin/notify-send -t 3500 -u "$level" "POWER" "$msg" -} - -# Battery status changed -if [[ "$BATTSTATUS" != "$LAST_STATUS" ]] ; then - notify "normal" "battery is now $BATTSTATUS, Capacity: $BATTPERC" - save_status - exit -fi - -if [ "$BATTSTATUS" = Discharging ] && [ "$BATTPERC" -le 10 ]; then - NOTIF_LEVEL=10 - notify "critical" "battery is less than 10% - Connect charger, going to sleep in 10s" - sleep 10 - BATTSTATUS=$(cat /sys/class/power_supply/BAT${BAT_NUM}/status) - if [ "$BATTSTATUS" = Discharging ]; then - notify "critical" "going to suspend now" - sleep 3 - logger "Critical battery threshold, suspending" - systemctl suspend - else - notify "normal" "battery is now charging, cancelling suspend" - fi - save_status - exit -fi - -if [[ $BATTPERC -le 20 ]] ; then - NOTIF_LEVEL=20 - notify "critical" "battery $BATTSTATUS is less than 20%" - save_status -elif [[ $BATTPERC -le 30 ]] ; then - NOTIF_LEVEL=30 - if [ "$NOTIF_LEVEL" != "$LAST_NOTIF_LEVEL" ]; then - notify "normal" "battery $BATTSTATUS is at 30%" - save_status - fi -elif [[ $BATTPERC -le 50 ]] ; then - NOTIF_LEVEL=50 - if [ "$NOTIF_LEVEL" != "$LAST_NOTIF_LEVEL" ] ; then - notify "low" "battery $BATTSTATUS is at 50%" - save_status - fi -elif [[ $BATTPERC -le 60 ]] ; then - NOTIF_LEVEL=60 - if [ "$NOTIF_LEVEL" != "$LAST_NOTIF_LEVEL" ] ; then - notify "normal" "battery $BATTSTATUS is at 60%" - save_status - fi -fi - diff --git a/bin/bin/tmux-status b/bin/bin/tmux-status @@ -1,111 +0,0 @@ -#!/bin/sh -# ██ -# ░██ -# ██████ ██████████ ██ ██ ██ ██ -# ░░░██░ ░░██░░██░░██░██ ░██░░██ ██ -# ░██ ░██ ░██ ░██░██ ░██ ░░███ -# ░██ ░██ ░██ ░██░██ ░██ ██░██ -# ░░██ ███ ░██ ░██░░██████ ██ ░░██ -# ░░ ░░░ ░░ ░░ ░░░░░░ ░░ ░░ -# ██ ██ -# ░██ ░██ -# ██████ ██████ ██████ ██████ ██ ██ ██████ -# ██░░░░ ░░░██░ ░░░░░░██ ░░░██░ ░██ ░██ ██░░░░ -#░░█████ ░██ ███████ ░██ ░██ ░██░░█████ -# ░░░░░██ ░██ ██░░░░██ ░██ ░██ ░██ ░░░░░██ -# ██████ ░░██ ░░████████ ░░██ ░░██████ ██████ -#░░░░░░ ░░ ░░░░░░░░ ░░ ░░░░░░ ░░░░░░ -# -# ▓▓▓▓▓▓▓▓▓▓ -# ░▓ author ▓ xero <x@xero.nu> -# ░▓ code ▓ http://code.xero.nu/dotfiles -# ░▓ mirror ▓ http://git.io/.files -# ░▓▓▓▓▓▓▓▓▓▓ -# ░░░░░░░░░░ - -FULL=▓ -EMPTY=░ -EOL=▒ -SIZE=7 -C0="#000000" -C1="#222222" -C2="#1C596E" -C3="#B3291C" -C4="#3A3A3A" -C5="#efefef" -C6="#878787" -C7="#8787af" - -draw() -{ - perc=$1 - SIZE=$2 - inc=$(( perc * SIZE / 100 )) - out= - thiscolor= - for v in `seq 0 $(( SIZE - 1 ))`; do - test "$v" -le "$inc" \ - && out="${out}#[fg=$C1]${FULL}" \ - || out="${out}#[fg=$C1]${EMPTY}" - done - echo $out -} -temp() -{ - t=$(sensors | awk '/Core\ 0/ {gsub(/\+/,"",$3); gsub(/\..+/,"",$3) ; print $3}') - tc=$C0 - case 1 in - $((t <= 50))) - tc=$C2 - ;; - $((t >= 75))) - tc=$C3 - ;; - esac - echo "#[fg=$tc]$t°c" -} -bat() -{ - BATPATH=/sys/class/power_supply/BAT1 - STATUS=$BATPATH/status - BAT_FULL=$BATPATH/charge_full - BAT_NOW=$BATPATH/charge_now - bf=$(cat $BAT_FULL) - bn=$(cat $BAT_NOW) - stat=$(cat $STATUS) - case $stat in - Full) - st="=" - ;; - Discharging) - st="-" - ;; - Charging) - st="+" - ;; - esac - echo $st$(( 100 * $bn / $bf ))"%" -} -cpu() -{ - CPU_USE=$(grep 'cpu ' /proc/stat | awk '{usage=($2+$4)*100/($2+$4+$5)} END {print usage}') - printf "%.0f" $CPU_USE -} -ram() -{ - free | awk '/Mem:/ {print int($3/$2 * 100.0)}' -} -clock() -{ - mtime=$(date +'%H:%M') - myear=$(date +'%Y-%m-') - mday=$(date +'%d') - echo "#[fg=$C5]#[bg=$C4] $mtime #[fg=$C6]$myear#[fg=$C5]$mday #[fg=$C6]$EOL" -} -front() -{ - echo "#[bg=$C7]#[fg=$C1]▓░" -} -CPU_INFO=`cpu` -RAM_INFO=`ram` -echo `front` `bat` `draw $RAM_INFO 4` `temp` `draw $CPU_INFO 7` `clock` diff --git a/newsboat/.newsboat/config.dreyfus b/newsboat/.newsboat/config.dreyfus @@ -1,43 +0,0 @@ -# ░█▀█░█▀▀░█░█░█▀▀░█▀▄░█▀█░█▀█░▀█▀░░ -# ░█░█░█▀▀░█▄█░▀▀█░█▀▄░█░█░█▀█░░█░░░ -# ░▀░▀░▀▀▀░▀░▀░▀▀▀░▀▀░░▀▀▀░▀░▀░░▀░░░ -auto-reload yes - -browser w3m -save-path ~/tmp -notify-program notify-send -player mpv - -# interface -text-width 0 -max-items 20 - -# interface colours -color info blue black -color listfocus_unread color10 color0 -color listfocus color4 color0 - -# feed headers colours -highlight feedlist ".*-----.*" color12 default - -# article colours -highlight article "^Feed:.*" color7 default -highlight article "^Title:.*" color6 default -highlight article "^Author:.*" color4 default -highlight article "^Date:.*" color15 default -highlight article "^Link:.*" color10 default - -# key bindings -bind-key j down -bind-key k up -bind-key h quit -bind-key l open - -# macros -macro ; open-in-browser -macro m set browser "mpv %u" ; open-in-browser ; set browser w3m -macro r set browser "~/bin/newstuir %u" ; open-in-browser ; set browser w3m - -# podboat -download-path "~/lib/aud/podcasts/%h/%n" -max-downloads 3