commit fc7aa6f0e3ed87971bba96bf91c9825e3ce324ce
parent b5524e74053066339180df6aa851b3e93f6dad3c
Author: Oscar Benedito <oscar@oscarbenedito.com>
Date:   Wed, 22 Dec 2021 21:20:29 +0100

Remove Xresources and dwmblocks scripts

This will now be tracked in the repositories of the appropriate
programs.

Diffstat:
D.config/Xresources | 57---------------------------------------------------------
D.local/bin/dwmblocks/dwmb-backlight | 3---
D.local/bin/dwmblocks/dwmb-backups | 26--------------------------
D.local/bin/dwmblocks/dwmb-battery2 | 93-------------------------------------------------------------------------------
D.local/bin/dwmblocks/dwmb-date | 3---
D.local/bin/dwmblocks/dwmb-disk | 4----
D.local/bin/dwmblocks/dwmb-internet | 4----
D.local/bin/dwmblocks/dwmb-torrents | 13-------------
D.local/bin/dwmblocks/dwmb-updates | 7-------
D.local/bin/dwmblocks/dwmb-volume | 27---------------------------
10 files changed, 0 insertions(+), 237 deletions(-)

diff --git a/.config/Xresources b/.config/Xresources @@ -1,57 +0,0 @@ -! vim: filetype=xdefaults - -Xft.dpi: 192 - -! application colors -#define _black #282c34 -#define _red #e06c75 -#define _green #98c379 -#define _yellow #e5c07b -#define _blue #61afef -#define _purple #c678dd -#define _cyan #56b6c2 -#define _white #d3d7de - -! window manager colors -#define _background #000000 -#define _foreground #eeeeee -#define _inactive #444444 -#define _primary #285577 -#define _secondary #a8c138 -#define _error #CC3333 - - -dmenu.background: _background -dmenu.foreground: _foreground -dmenu.selbackground: _primary -dmenu.selforeground: _foreground - -dwm.normbgcolor: _background -dwm.normfgcolor: _foreground -dwm.normbordercolor: _inactive -dwm.selbgcolor: _primary -dwm.selfgcolor: _foreground -dwm.selbordercolor: _secondary - -slock.color0: _background -slock.color4: _primary -slock.color1: _error - -st.color0: _black -st.color8: _black -st.color1: _red -st.color9: _red -st.color2: _green -st.color10: _green -st.color3: _yellow -st.color11: _yellow -st.color4: _blue -st.color12: _blue -st.color5: _purple -st.color13: _purple -st.color6: _cyan -st.color14: _cyan -st.color7: _white -st.color15: _white -st.background: _white -st.foreground: _black diff --git a/.local/bin/dwmblocks/dwmb-backlight b/.local/bin/dwmblocks/dwmb-backlight @@ -1,3 +0,0 @@ -#!/bin/sh - -echo " $(xbacklight -get)%" | sed "s/\.[0-9]*//g" diff --git a/.local/bin/dwmblocks/dwmb-backups b/.local/bin/dwmblocks/dwmb-backups @@ -1,26 +0,0 @@ -#!/bin/sh - -outfile="/home/oscar/.local/share/backups" - -if [ ! -f "$outfile" ]; then - lastdate="0" - lasterr="0" -else - tmp="$(cat "$outfile")" - lastdate="${tmp%% *}" - lasterr="${tmp##* }" -fi - -if [ "$(date --date="12 hours ago" +%s)" -ge "$lastdate" ]; then - echo "" - restic-daily > /dev/null & - exit 0 -else - if [ "$lasterr" = "0" ]; then - exit 0 - elif [ "$lasterr" = "2" ] && [ "$lastdate" -ge "$(date --date="20 mins ago" +%s)" ]; then - echo "" - else - echo "" - fi -fi diff --git a/.local/bin/dwmblocks/dwmb-battery2 b/.local/bin/dwmblocks/dwmb-battery2 @@ -1,93 +0,0 @@ -#!/usr/bin/env python3 -# -# Copyright (C) 2016 James Murphy -# Licensed under the GPL version 2 only -# -# A battery indicator blocklet script for i3blocks - -import re -from subprocess import check_output - -status = check_output(['acpi'], universal_newlines=True) - -if not status: - # stands for no battery found - fulltext = "\uf00d \uf240" - percentleft = 100 -else: - # if there is more than one battery in one laptop, the percentage left is - # available for each battery separately, although state and remaining - # time for overall block is shown in the status of the first battery - batteries = status.split("\n") - state_batteries=[] - commasplitstatus_batteries=[] - percentleft_batteries=[] - time = "" - for battery in batteries: - if battery!='': - state_batteries.append(battery.split(": ")[1].split(", ")[0]) - commasplitstatus = battery.split(", ") - if not time: - time = commasplitstatus[-1].strip() - # check if it matches a time - time = re.match(r"(\d+):(\d+)", time) - if time: - time = ":".join(time.groups()) - timeleft = " ({})".format(time) - else: - timeleft = "" - - p = int(commasplitstatus[1].rstrip("%\n")) - if p>0: - percentleft_batteries.append(p) - commasplitstatus_batteries.append(commasplitstatus) - state = state_batteries[0] - commasplitstatus = commasplitstatus_batteries[0] - if percentleft_batteries: - percentleft = int(sum(percentleft_batteries)/len(percentleft_batteries)) - else: - percentleft = 0 - - # stands for charging - FA_LIGHTNING = "\uf0e7" - - # stands for plugged in - FA_PLUG = "\uf1e6" - - # stands for using battery - FA_BATTERY_0 = "\uf244" # 0/4 - FA_BATTERY_1 = "\uf243" # 1/4 - FA_BATTERY_2 = "\uf242" # 2/4 - FA_BATTERY_3 = "\uf241" # 3/4 - FA_BATTERY_4 = "\uf240" # 4/4 - - # stands for unknown status of battery - FA_QUESTION = "\uf128" - - - if state == "Discharging": - if percentleft <= 10: - fulltext = FA_BATTERY_0 + " " - elif percentleft < 35: - fulltext = FA_BATTERY_1 + " " - elif percentleft < 65: - fulltext = FA_BATTERY_2 + " " - elif percentleft < 90: - fulltext = FA_BATTERY_3 + " " - else: - fulltext = FA_BATTERY_4 + " " - elif state == "Full": - fulltext = FA_PLUG + " " - timeleft = "" - elif state == "Unknown": - fulltext = FA_BATTERY_0 + " " + FA_QUESTION + " " - timeleft = "" - else: - fulltext = FA_LIGHTNING + " " - - fulltext += str(percentleft) + "%" + timeleft - -print(fulltext) -print(fulltext) -if percentleft < 10: - exit(33) diff --git a/.local/bin/dwmblocks/dwmb-date b/.local/bin/dwmblocks/dwmb-date @@ -1,3 +0,0 @@ -#!/bin/sh - -date +"%a %d %b, %H:%M" diff --git a/.local/bin/dwmblocks/dwmb-disk b/.local/bin/dwmblocks/dwmb-disk @@ -1,4 +0,0 @@ -#!/bin/sh - -#echo -n " "; df -h -l --output='used' "$HOME" | grep -E -o '[0-9\.]+G' -echo -n " "; df -h -l --output='avail' "$HOME" | tail -n 1 | cut -d" " -f 3 diff --git a/.local/bin/dwmblocks/dwmb-internet b/.local/bin/dwmblocks/dwmb-internet @@ -1,4 +0,0 @@ -#!/bin/sh - -[ "$(cat /sys/class/net/w*/operstate 2>/dev/null)" = "up" ] && \ - printf "%s\n" "$(awk '/^\s*w/ { print "", int($3 * 100 / 70) "%" }' /proc/net/wireless)" diff --git a/.local/bin/dwmblocks/dwmb-torrents b/.local/bin/dwmblocks/dwmb-torrents @@ -1,13 +0,0 @@ -#!/bin/sh - -transmission-remote -l | grep "%\|n/a" | - sed " # The letters are for sorting and will not appear. - s/.*Idle.*/B /; - s/.*Queued.*/C /; - s/.*Stopped.*/D /; - s/.*Uploading.*/E /; - s/.*Seeding.*/F /; - s/.*100%.*/G /; - s/.*%.*/A /; - s/.*Downloading.*/A /" | - sort -h | uniq -c | awk '{print $3, $1}' | paste -sd ' ' - diff --git a/.local/bin/dwmblocks/dwmb-updates b/.local/bin/dwmblocks/dwmb-updates @@ -1,7 +0,0 @@ -#!/bin/sh - -UPDATES="$(checkupdates | wc -l)" -if [ "0" != "$UPDATES" ]; then - echo " $UPDATES" - sudo checkupdates -d >/dev/null 2>&1 & -fi diff --git a/.local/bin/dwmblocks/dwmb-volume b/.local/bin/dwmblocks/dwmb-volume @@ -1,27 +0,0 @@ -#!/usr/bin/env bash -# Displays the default device, volume, and mute status for i3blocks - - -AUDIO_HIGH_SYMBOL="" -AUDIO_MED_SYMBOL="" -AUDIO_LOW_SYMBOL="" -AUDIO_MUTED_SYMBOL="" - -AMIXER=$(amixer get Master | tail -n 1) # get last line of amixer output - -# show either volume or mute -if [[ $AMIXER =~ "[on]" ]]; then # check if channel is muted by checking if line contains the word "on" - IFS=' ' read -ra args <<< "$AMIXER" # split string - - VOL="${args[4]:1:-2}" # get 4th argument (the volume) from the string we just split and remove the first and last argument (square brackets) and the % at the end - - if [ "$VOL" -le "0" ]; then - echo "$AUDIO_LOW_SYMBOL" - elif [ "$VOL" -le "50" ]; then - echo "$AUDIO_MED_SYMBOL $VOL%" - else - echo "$AUDIO_HIGH_SYMBOL $VOL%" - fi -else - echo "$AUDIO_MUTED_SYMBOL" -fi