From c495598bdcf38aa7fd2edc2903a42e70ad879ca9 Mon Sep 17 00:00:00 2001 From: tslil Date: Sun, 5 Apr 2026 09:42:24 +0100 Subject: cleanup --- bar | 24 ------------------------ dwm_status | 19 ------------------- fp | 62 ------------------------------------------------------------- newmail | 24 ------------------------ oi.py | 36 ----------------------------------- run | 8 -------- sc | 14 -------------- sw | 16 ---------------- unlock_keys | 9 --------- wls | 47 ---------------------------------------------- 10 files changed, 259 deletions(-) delete mode 100755 bar delete mode 100755 dwm_status delete mode 100755 fp delete mode 100755 newmail delete mode 100755 oi.py delete mode 100755 run delete mode 100755 sc delete mode 100755 sw delete mode 100755 unlock_keys delete mode 100755 wls diff --git a/bar b/bar deleted file mode 100755 index 5ae2dc2..0000000 --- a/bar +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh - -PRIMARY="FF8C00FF" -SECONDARY="070707FF" - -while true; do - # time="$(TZ=America/Chicago date +'%Z %H:%M') |" - time="$(TZ=Europe/Amsterdam date +'%Z %H:%M %Y/%m/%d')" - temp="CPU $(sensors k10temp-pci-00c3 | grep Tctl | cut -d: -f2 | tr -d ' +')" - wlp1s0="$(nmcli connection | grep wlp1s0 | cut -d\ -f1)" - if [ -z "$wlp1s0" ]; then wlp1s0="DN"; fi - nmcli connection | grep wireguard | grep -vq '\--' && vpn="VPN UP" || vpn="VPN DN" - wifi="WLS $wlp1s0" - bat="BAT $(battery)" - echo "all status $vpn | $wifi | $bat | $temp | $time" - sleep 30s -done | sandbar -bottom\ - -tags 8 F U H . V L O M\ - -font 'PxPlus IBM VGA 9x16:size=24'\ - -vertical-padding 4\ - -hide-vacant-tags\ - -active-bg-color $PRIMARY -active-fg-color $SECONDARY\ - -inactive-bg-color $SECONDARY -inactive-fg-color $PRIMARY\ - -title-fg-color $SECONDARY -title-bg-color $PRIMARY diff --git a/dwm_status b/dwm_status deleted file mode 100755 index 75e1833..0000000 --- a/dwm_status +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh - -n=0 -while [ -n "$(pgrep 'somebar$')" ]; do - time="$(TZ=PST8PDT date +'%Z %H:%M')" - time="$time | $(TZ=America/Chicago date +'%Z %H:%M')" - time="$time | $(TZ=America/New_York date +'%Z %H:%M')" - time="$time | $(TZ=UTC date +'%Z %H:%M')" - time="$time | $(TZ=Europe/London date +'%Z %H:%M')" - time="$time | $(TZ=Europe/Amsterdam date +'%Z %H:%M:%S %Y/%m/%d')" - if [ "$(( n % 5 ))" = "0" ]; then - temp="CPU $(sensors k10temp-pci-00c3 | grep Tctl | cut -d: -f2 | tr -d ' +')" - #temp="CPU $(( $(cat /sys/class/thermal/thermal_zone0/temp) / 1000))C" - fi - # xsetroot -name "$temp | $time" - somebar -c "status $temp | $time" - n=$(( $n + 1 )) - sleep 1s -done diff --git a/fp b/fp deleted file mode 100755 index 78f7db2..0000000 --- a/fp +++ /dev/null @@ -1,62 +0,0 @@ -#!/bin/sh - -set -euo pipefail - -bwrap \ - --symlink usr/lib /lib \ - --symlink usr/lib64 /lib64 \ - --symlink usr/bin /bin \ - --symlink usr/bin /sbin \ - --ro-bind /usr/lib /usr/lib \ - --ro-bind /usr/lib64 /usr/lib64 \ - --ro-bind /usr/bin /usr/bin \ - --ro-bind /usr/lib/firefox /usr/lib/firefox \ - --ro-bind /usr/share/gtk-3.0 /usr/share/gtk-3.0 \ - --ro-bind /usr/share/fontconfig /usr/share/fontconfig \ - --ro-bind /usr/share/fonts /usr/share/fonts \ - --ro-bind /usr/share/X11/xkb /usr/share/X11/xkb \ - --ro-bind /usr/share/icons /usr/share/icons \ - --ro-bind /usr/share/libdrm /usr/share/libdr \ - --ro-bind /usr/share/icu /usr/share/icu \ - --ro-bind /usr/share/drirc.d /usr/share/drirc.d \ - --ro-bind /usr/share/glib-2.0 /usr/share/glib-2.0 \ - --ro-bind /usr/share/glvnd /usr/share/glvnd \ - --ro-bind /usr/share/mime /usr/share/mime \ - --ro-bind /etc/fonts /etc/fonts \ - --ro-bind /etc/localtime /etc/localtime \ - --ro-bind /etc/nsswitch.conf /etc/nsswitch.conf \ - --ro-bind-try /etc/resolv.conf /etc/resolv.conf \ - --ro-bind-try /etc/pipewire /etc/pipewire \ - --ro-bind-try /etc/pulse /etc/pulse \ - --ro-bind-try /etc/xdg /etc/xdg \ - --ro-bind /usr/share/ca-certificates /usr/share/ca-certificates \ - --ro-bind /etc/ssl /etc/ssl \ - --ro-bind /etc/ca-certificates /etc/ca-certificates \ - --tmpfs /run \ - --ro-bind /run/user/"$(id -u)"/wayland-0 /run/user/"$(id -u)"/wayland-0 \ - --ro-bind /run/user/"$(id -u)"/pipewire-0 /run/user/"$(id -u)"/pipewire-0 \ - --ro-bind /run/user/"$(id -u)"/pulse /run/user/"$(id -u)"/pulse \ - --dev /dev \ - --dev-bind /dev/dri /dev/dri \ - --ro-bind /sys/bus/pci /sys/bus/pci \ - --ro-bind /sys/dev/char /sys/dev/char \ - --ro-bind /sys/devices/pci0000:00 /sys/devices/pci0000:00 \ - --proc /proc \ - --tmpfs /tmp \ - --bind /home/tslil/.mozilla /home/tslil/.mozilla \ - --bind /home/tslil/store/downloads /home/tslil/Downloads \ - --unsetenv DBUS_SESSION_BUS_ADDRESS \ - --setenv HOME /home/tslil \ - --setenv GTK_THEME Adwaita:dark \ - --setenv MOZ_ENABLE_WAYLAND 1 \ - --setenv GBM_BACKEND nvidia-drm \ - --setenv __GLX_VENDOR_LIBRARY_NAME nvidia \ - --setenv LIBVA_DRIVER_NAME nvidia \ - --setenv WLR_RENDERER vulkan \ - --setenv PATH /usr/bin \ - --hostname RESTRICTED \ - --unshare-all \ - --share-net \ - --die-with-parent \ - --new-session \ - /usr/bin/firefox diff --git a/newmail b/newmail deleted file mode 100755 index d9d1620..0000000 --- a/newmail +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env sh - -servers="gmail posteo gwu" - -result= -regexp='s#^machine \(.*\) login \(.*\) password \(.*\) port \([0-9]*\)$#-u \2:"\3" imaps://\1:\4/INBOX#' -data=$(gpg --quiet --decrypt "$HOME"/.authinfo.gpg | grep 993) -for server in $servers; do - line=$(echo "$data" | grep "$server" | head -n 1) - num=$(curl -s --ssl-reqd $(echo "$line" | sed "$regexp") -X 'SEARCH UNSEEN' | grep SEARCH | wc -w) - if [ "$num" != "0" ]; then - if [ -z "$result" ]; then - result="$server: $num" - else - result="$result, $server: $num" - fi - fi -done; - -if [ -n "$result" ]; then - echo "$result" -else - true -fi; diff --git a/oi.py b/oi.py deleted file mode 100755 index 64dce16..0000000 --- a/oi.py +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/env python2 - -# Support offlineimap by retrieving login credentials and doing nametrans - -import re, os -from subprocess import check_output - -def get_pass_pass(account): - return check_output("pass " + account, shell=True).splitlines()[0] - -def get_authinfo_password(machine, login, port): - s = "machine %s login %s password ([^ ]*) port %s" % (machine, login, port) - p = re.compile(s) - authinfo = os.popen("gpg -q --no-tty -d ~/.authinfo.gpg").read() - return p.search(authinfo).group(1) - -def gmail_remote_to_local(folder): - new = re.sub('^\[Gmail\]/','',folder) - if folder == "INBOX": return folder - elif new == "Sent Mail": return "Sent" - elif new == "All Mail": return "All" - return new - -def gmail_local_to_remote(folder): - new = "[Gmail]/" + folder - if folder == "INBOX": return folder - elif folder in ["Sent", "All"]: return new + " Mail" - return new - -def jhu_remote_to_local(folder): - if folder == "Sent Items": return "Sent" - else: return folder - -def jhu_local_to_remote(folder): - if folder == "Sent": return "Sent Items" - else: return folder diff --git a/run b/run deleted file mode 100755 index af48baa..0000000 --- a/run +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -/usr/bin/bemenu-run -p 'run' -W 0.5 -l 8 -c --fn "PxPlus IBM VGA 9x16 24" \ - --hb '#FF8C00' --hf '#000000' \ - --fb '#666666' --ff '#FF8C00' \ - --tb '#FF8C00' --tf '#000000' \ - --ab '#666666' --af '#000000 '\ - --nb '#666666' --nf '#000000' diff --git a/sc b/sc deleted file mode 100755 index ba01945..0000000 --- a/sc +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env sh -# Quick hack to manage screen hotplugging - -reset_ratpoison="yes" -case "$1" in - "d") xrandr --nograb --output VGA-1 --off --output LVDS-1 --auto;; - "r") xrandr --nograb --output VGA-1 --auto --primary --output LVDS-1 --off;; - "c") xrandr --nograb --output VGA-1 --auto --output LVDS-1 --auto;; - "n") xrandr --nograb --output LVDS-1 --auto --above VGA-1 --output VGA-1 --auto;; - "s") xrandr --nograb --output LVDS-1 --auto --below VGA-1 --output VGA-1 --auto;; - "e") xrandr --nograb --output LVDS-1 --auto --right-of VGA-1 --output VGA-1 --auto;; - "w") xrandr --nograb --output LVDS-1 --auto --left-of VGA-1 --output VGA-1 --auto;; - *) xrandr --nograb; reset_ratpoison="" ;; -esac; diff --git a/sw b/sw deleted file mode 100755 index 53f0e05..0000000 --- a/sw +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -export XDG_SESSION_TYPE=wayland -export XDG_CURRENT_DESKTOP=sway -export XDG_SESSION_DESKTOP=sway - -#export QT_QPA_PLATFORM=wayland -#export QT_WAYLAND_DISABLE_WINDOWDECORATION=1 - -export WLR_RENDERER=vulkan -export WLR_NO_HARDWARE_CURSORS=1 - -dbus-update-activation-environment XDG_CURRENT_DESKTOP XDG_SESSION_DESKTOP XDG_SESSION_TYPE -systemctl --user import-environment XDG_CURRENT_DESKTOP XDG_SESSION_DESKTOP XDG_SESSION_TYPE -#systemctl --user restart xdg-desktop-portal - -/home/tslil/prog/wm/dwl/dwl -s /home/tslil/.config/dwl/dwl.sh diff --git a/unlock_keys b/unlock_keys deleted file mode 100755 index 091bc8a..0000000 --- a/unlock_keys +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -eval $(keychain --eval -q --systemd) - -KEY_FILES=$(ls $HOME/.ssh | grep -v '\(pub$\|^config$\|^known_hosts$\|^authorized_keys$\)') -badpass -k $KEY_FILES -sleep 1s -keychain -l -echo Done! diff --git a/wls b/wls deleted file mode 100755 index 5889f9b..0000000 --- a/wls +++ /dev/null @@ -1,47 +0,0 @@ -#!/usr/bin/env sh - -# Terribly written wireless network control script - -dev=wlp2s0 - -connect() { - sudo wpa_supplicant -B -i $dev -c "$1" - sleep 3s - sudo dhcpcd $dev -} - -dird="${HOME}/.config/wireless" - -sudo killall wpa_supplicant -sudo dhcpcd -k $dev -sudo ip link set $dev up - -ssids=$(sudo iw dev $dev scan | grep SSID | cut -d\ -f 2-) -for s in $ssids; do - if [ -f "$dird/$s" ]; then - echo -n "Connect to $s? [y]/* " - y=""; read -r y; - if [ -z "$y" ]; then - connect "$dird/$s" - exit 0; - fi; - fi; -done; - -ls "$dird" -echo -n "--> " -read -r ssid - -if [ ! -f "$dird/$ssid" ]; then - echo Creating new network profile, enter passphrase: - read -r pass - wpa_passphrase "$ssid" "$pass" > "$dird"/"$ssid" - echo -n "Edit file (y/[n])? " - read -r edit - if [ "$edit" = "y" ]; then - $EDITOR "$dird"/"$ssid" - fi; -fi; - -connect "$dird/$ssid" - -- cgit v1.2.3