diff options
Diffstat (limited to '')
| -rw-r--r-- | dot_local/bin/executable_Internet.m3u.sh (renamed from bin/executable_Internet.m3u.sh) | 0 | ||||
| -rwxr-xr-x | dot_local/bin/executable_copyright.awk (renamed from bin/executable_copyright.awk) | 0 | ||||
| -rwxr-xr-x | dot_local/bin/executable_do_blue.sh (renamed from bin/executable_do_blue.sh) | 0 | ||||
| -rwxr-xr-x | dot_local/bin/executable_do_dac.sh (renamed from bin/executable_do_dac.sh) | 0 | ||||
| -rwxr-xr-x | dot_local/bin/executable_do_speakers.sh (renamed from bin/executable_do_speakers.sh) | 0 | ||||
| -rwxr-xr-x | dot_local/bin/executable_icd (renamed from bin/executable_icd) | 0 | ||||
| -rwxr-xr-x | dot_local/bin/executable_lbdb-fetchaddr-wrapper (renamed from bin/executable_lbdb-fetchaddr-wrapper) | 0 | ||||
| -rw-r--r-- | dot_local/bin/executable_lfoot (renamed from bin/executable_lfoot) | 0 | ||||
| -rwxr-xr-x | dot_local/bin/executable_mailx-alias (renamed from bin/executable_mailx-alias) | 0 | ||||
| -rwxr-xr-x | dot_local/bin/executable_mice.sh (renamed from bin/executable_mice.sh) | 0 | ||||
| -rwxr-xr-x | dot_local/bin/executable_mpd_only.sh (renamed from bin/executable_mpd_only.sh) | 0 | ||||
| -rwxr-xr-x | dot_local/bin/executable_mpd_others.sh (renamed from bin/executable_mpd_others.sh) | 0 | ||||
| -rwxr-xr-x | dot_local/bin/executable_mutt-fetchbug (renamed from bin/executable_mutt-fetchbug) | 0 | ||||
| -rwxr-xr-x | dot_local/bin/executable_mutt_bgrun (renamed from bin/executable_mutt_bgrun) | 0 | ||||
| -rw-r--r-- | dot_local/bin/executable_mutt_oauth2.py (renamed from bin/executable_mutt_oauth2.py) | 0 | ||||
| -rwxr-xr-x | dot_local/bin/executable_ptmp (renamed from bin/executable_ptmp) | 0 | ||||
| -rw-r--r-- | dot_local/bin/executable_sbuild-experimental | 2 | ||||
| -rw-r--r-- | dot_local/bin/executable_set-ic7300-time.py | 86 | ||||
| -rwxr-xr-x | dot_local/bin/executable_startaudio (renamed from bin/executable_startaudio) | 0 | ||||
| -rw-r--r-- | dot_local/bin/executable_swaybg-random (renamed from bin/executable_swaybg-random) | 0 | ||||
| -rwxr-xr-x | dot_local/bin/executable_tmcg (renamed from bin/executable_tmcg) | 0 | ||||
| -rwxr-xr-x | dot_local/bin/executable_wd-bak (renamed from bin/executable_wd-bak) | 0 | ||||
| -rw-r--r-- | dot_local/bin/executable_wd-mount (renamed from bin/executable_wd-mount) | 0 | ||||
| -rw-r--r-- | dot_local/bin/executable_wd-umount (renamed from bin/executable_wd-umount) | 0 | ||||
| -rw-r--r-- | dot_local/bin/executable_wofi-window-switcher (renamed from bin/executable_wofi-window-switcher) | 0 | ||||
| -rw-r--r-- | dot_local/lib/openssh/executable_agent-launch | 47 | ||||
| -rw-r--r-- | dot_local/lib/sbuild/executable_update-chroots.sh | 37 |
27 files changed, 125 insertions, 47 deletions
diff --git a/bin/executable_Internet.m3u.sh b/dot_local/bin/executable_Internet.m3u.sh index 62d83d0..62d83d0 100644 --- a/bin/executable_Internet.m3u.sh +++ b/dot_local/bin/executable_Internet.m3u.sh diff --git a/bin/executable_copyright.awk b/dot_local/bin/executable_copyright.awk index 371a9c2..371a9c2 100755 --- a/bin/executable_copyright.awk +++ b/dot_local/bin/executable_copyright.awk diff --git a/bin/executable_do_blue.sh b/dot_local/bin/executable_do_blue.sh index cd79e50..cd79e50 100755 --- a/bin/executable_do_blue.sh +++ b/dot_local/bin/executable_do_blue.sh diff --git a/bin/executable_do_dac.sh b/dot_local/bin/executable_do_dac.sh index 7ae913e..7ae913e 100755 --- a/bin/executable_do_dac.sh +++ b/dot_local/bin/executable_do_dac.sh diff --git a/bin/executable_do_speakers.sh b/dot_local/bin/executable_do_speakers.sh index 84b82e1..84b82e1 100755 --- a/bin/executable_do_speakers.sh +++ b/dot_local/bin/executable_do_speakers.sh diff --git a/bin/executable_icd b/dot_local/bin/executable_icd index 367b87f..367b87f 100755 --- a/bin/executable_icd +++ b/dot_local/bin/executable_icd diff --git a/bin/executable_lbdb-fetchaddr-wrapper b/dot_local/bin/executable_lbdb-fetchaddr-wrapper index bb1270a..bb1270a 100755 --- a/bin/executable_lbdb-fetchaddr-wrapper +++ b/dot_local/bin/executable_lbdb-fetchaddr-wrapper diff --git a/bin/executable_lfoot b/dot_local/bin/executable_lfoot index 5522085..5522085 100644 --- a/bin/executable_lfoot +++ b/dot_local/bin/executable_lfoot diff --git a/bin/executable_mailx-alias b/dot_local/bin/executable_mailx-alias index c1d961a..c1d961a 100755 --- a/bin/executable_mailx-alias +++ b/dot_local/bin/executable_mailx-alias diff --git a/bin/executable_mice.sh b/dot_local/bin/executable_mice.sh index 794f86f..794f86f 100755 --- a/bin/executable_mice.sh +++ b/dot_local/bin/executable_mice.sh diff --git a/bin/executable_mpd_only.sh b/dot_local/bin/executable_mpd_only.sh index 468c6a5..468c6a5 100755 --- a/bin/executable_mpd_only.sh +++ b/dot_local/bin/executable_mpd_only.sh diff --git a/bin/executable_mpd_others.sh b/dot_local/bin/executable_mpd_others.sh index b27e11e..b27e11e 100755 --- a/bin/executable_mpd_others.sh +++ b/dot_local/bin/executable_mpd_others.sh diff --git a/bin/executable_mutt-fetchbug b/dot_local/bin/executable_mutt-fetchbug index 93ffc58..93ffc58 100755 --- a/bin/executable_mutt-fetchbug +++ b/dot_local/bin/executable_mutt-fetchbug diff --git a/bin/executable_mutt_bgrun b/dot_local/bin/executable_mutt_bgrun index f833bab..f833bab 100755 --- a/bin/executable_mutt_bgrun +++ b/dot_local/bin/executable_mutt_bgrun diff --git a/bin/executable_mutt_oauth2.py b/dot_local/bin/executable_mutt_oauth2.py index 559811f..559811f 100644 --- a/bin/executable_mutt_oauth2.py +++ b/dot_local/bin/executable_mutt_oauth2.py diff --git a/bin/executable_ptmp b/dot_local/bin/executable_ptmp index e42c695..e42c695 100755 --- a/bin/executable_ptmp +++ b/dot_local/bin/executable_ptmp diff --git a/dot_local/bin/executable_sbuild-experimental b/dot_local/bin/executable_sbuild-experimental new file mode 100644 index 0000000..ed938bf --- /dev/null +++ b/dot_local/bin/executable_sbuild-experimental @@ -0,0 +1,2 @@ +#!/bin/sh +sbuild --dist=experimental --extra-repository='deb http://deb.debian.org/debian experimental main contrib non-free' --build-dep-resolver=aspcud $@ diff --git a/dot_local/bin/executable_set-ic7300-time.py b/dot_local/bin/executable_set-ic7300-time.py new file mode 100644 index 0000000..cf4ecf1 --- /dev/null +++ b/dot_local/bin/executable_set-ic7300-time.py @@ -0,0 +1,86 @@ +#!/usr/bin/env python3 +# horrible python script to set time and date on the IC7300 +# or other Icom radios that use the same protocol. +# I made this script because the IC7300 has a faulty RTC battery and it does not have +# ethernet connection and NTP client like the 7610, 705, 9700, R8600, etc. +# This script sets the time slightly wrong because you cannot set seconds, only minutes. + +# I'm a sysadmin and not a programmer and this script violates ALL the programming +# best practices. ALL of them. Feel free to make it much better. +# IZ4UFQ +# +# cleaned up in 2026 by Ryan Kavanagh VA2RKV + +civaddress="0x94" #this is the default IC7300 address. Change to match your radio config. +baudrate = 19200 #change to match your radio serial speed +#serialport = "/dev/ttyUSB0" # Serial port of your radios serial interface. See comment below + +# you can set a serial port by id so that it always connect to the correct radio, usefeul if you have more than +# one usb serial port connected (I have 8 of them) +serialport = "/dev/serial/by-id/usb-Silicon_Labs_CP2102_USB_to_UART_Bridge_Controller_IC-7300_02048039-if00-port0" + + +#Import libraries we'll need to use +import time +import serial +import struct + +# Get time in GMT. If you want local time change to "t = time.localtime()" +t = time.localtime() +offset = time.localtime().tm_gmtoff + +# extract strings for year, day, month, hour, minute +# with a leading zero if needed +year = str(t.tm_year) +month = str(t.tm_mon).rjust(2,'0') +day = str(t.tm_mday).rjust(2,'0') +hour = str(t.tm_hour).rjust(2,'0') +minute = str(t.tm_min).rjust(2,'0') +off_hour = "%02d" % abs(offset // 3600) +off_minute = "%02d" % (offset % 3600) +off_sign = "00" if offset > 0 else "01" + +# set date, ci-v command is 0x94 +command = ["0xFE", "0xFE", civaddress, "0xE0", "0x1A", "0x05", "0x00" ] +command.append("0x94") +command.append("0x"+year[0:2]) +command.append("0x"+year[2:]) +command.append("0x"+month) +command.append("0x"+day) +command.append("0xFD") + +with serial.Serial(serialport, baudrate) as ser: + for cmd in command: + senddata = int(bytes(cmd, 'UTF-8'), 16) + ser.write(struct.pack('>B', senddata)) + +# set time, ci-v command is 0x95 +# you CANNOT set seconds, so unless you want to wait for the minute mark +# you'll end up with a time that is set incorrectly by less than one minute +# I prefer to set time incorrectly than to wait for up to 59 seconds + +command = ["0xFE", "0xFE", civaddress, "0xE0", "0x1A", "0x05", "0x00" ] +command.append("0x95") +command.append("0x"+hour) +command.append("0x"+minute) +command.append("0xFD") + +with serial.Serial(serialport, baudrate) as ser: + for cmd in command: + senddata = int(bytes(cmd, 'UTF-8'), 16) + ser.write(struct.pack('>B', senddata)) + +# set UTC offset, ci-v command is 0x96 +# Format described on page 19-11 of IC-7300 "Full Manual" + +command = ["0xFE", "0xFE", civaddress, "0xE0", "0x1A", "0x05", "0x00" ] +command.append("0x96") +command.append("0x"+off_hour) +command.append("0x"+off_minute) +command.append("0x"+off_sign) +command.append("0xFD") + +with serial.Serial(serialport, baudrate) as ser: + for cmd in command: + senddata = int(bytes(cmd, 'UTF-8'), 16) + ser.write(struct.pack('>B', senddata)) diff --git a/bin/executable_startaudio b/dot_local/bin/executable_startaudio index 3fbfa7f..3fbfa7f 100755 --- a/bin/executable_startaudio +++ b/dot_local/bin/executable_startaudio diff --git a/bin/executable_swaybg-random b/dot_local/bin/executable_swaybg-random index ba4baa1..ba4baa1 100644 --- a/bin/executable_swaybg-random +++ b/dot_local/bin/executable_swaybg-random diff --git a/bin/executable_tmcg b/dot_local/bin/executable_tmcg index 5ebb3cf..5ebb3cf 100755 --- a/bin/executable_tmcg +++ b/dot_local/bin/executable_tmcg diff --git a/bin/executable_wd-bak b/dot_local/bin/executable_wd-bak index f824fba..f824fba 100755 --- a/bin/executable_wd-bak +++ b/dot_local/bin/executable_wd-bak diff --git a/bin/executable_wd-mount b/dot_local/bin/executable_wd-mount index b8f8a45..b8f8a45 100644 --- a/bin/executable_wd-mount +++ b/dot_local/bin/executable_wd-mount diff --git a/bin/executable_wd-umount b/dot_local/bin/executable_wd-umount index 08e55eb..08e55eb 100644 --- a/bin/executable_wd-umount +++ b/dot_local/bin/executable_wd-umount diff --git a/bin/executable_wofi-window-switcher b/dot_local/bin/executable_wofi-window-switcher index 2344093..2344093 100644 --- a/bin/executable_wofi-window-switcher +++ b/dot_local/bin/executable_wofi-window-switcher diff --git a/dot_local/lib/openssh/executable_agent-launch b/dot_local/lib/openssh/executable_agent-launch deleted file mode 100644 index 36e06ff..0000000 --- a/dot_local/lib/openssh/executable_agent-launch +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/sh -# helper script for launching ssh-agent, used by systemd unit -set -e - -options="$(getopt -o '' -l help -- "$@")" || exit 1 -eval set -- "$options" - -if [ ! -d "$XDG_RUNTIME_DIR" ]; then - # shellcheck disable=SC2016 - echo 'This needs $XDG_RUNTIME_DIR to be set' >&2 - exit 1 -fi - -while :; do - case $1 in - --help) - echo 'Usage:' >&2 - echo " $0 start [-- ssh-agent options]" >&2 - echo " $0 stop" - exit 0 - ;; - --) - shift - break - ;; - *) - echo "Unexpected argument: $1" >&2 - exit 1 - ;; - esac -done - -if [ "$1" = start ]; then - shift - if [ ! -S "$SSH_AUTH_SOCK" ] && grep -s -q '^use-ssh-agent$' /etc/X11/Xsession.options; then - S="$XDG_RUNTIME_DIR/openssh_agent" - dbus-update-activation-environment --verbose --systemd SSH_AUTH_SOCK="$S" SSH_AGENT_LAUNCHER=openssh - exec ssh-agent -D -a "$S" "$@" - fi -elif [ "$1" = stop ]; then - if [ "$SSH_AGENT_LAUNCHER" = openssh ]; then - dbus-update-activation-environment --systemd SSH_AUTH_SOCK= - fi -else - echo "Unknown command $1" >&2 - exit 1 -fi diff --git a/dot_local/lib/sbuild/executable_update-chroots.sh b/dot_local/lib/sbuild/executable_update-chroots.sh new file mode 100644 index 0000000..fdbcfc5 --- /dev/null +++ b/dot_local/lib/sbuild/executable_update-chroots.sh @@ -0,0 +1,37 @@ +#!/bin/sh + +TARGETS="unstable-amd64 unstable-i386 unstable-sh4" + +DEST=~/.cache/sbuild + +call_mmdebstrap() { + # call_mmdebstrap dist arch mirror + mmdebstrap \ + --quiet \ + --arch=$2 \ + --variant=buildd \ + --components=main,contrib,non-free \ + --aptopt='Acquire::http::proxy "http://127.0.0.1:3142";' \ + $1 "$DEST/$1-$2.tar" "$3" +} + +get_mirror() { + case $1 in + sh4) + echo "http://ftp.ports.debian.org/debian-ports/" + ;; + *) + echo "http://deb.debian.org/debian" + ;; + esac +} + +for target in $TARGETS; do + dist="$(echo "$target" | cut -d- -f1)" + arch="$(echo "$target" | cut -d- -f2)" + mirror="$(get_mirror $arch)" + call_mmdebstrap "$dist" "$arch" "$mirror" + if [ "$dist" = "unstable" ] && [ ! -L "$DEST/experimental-$arch.tar" ]; then + ln -s "$DEST/$dist-$arch.tar" "$DEST/experimental-$arch.tar" + fi +done |
