remove hella old scripts

textadept
Nico 6 months ago
parent 9b0217821e
commit 3f01a6db9d
  1. 5
      scripts/.local/bin/fragment-vimwiki-header
  2. 3
      scripts/.local/bin/hide-osk
  3. 32
      scripts/.local/bin/index-zettel
  4. 2
      scripts/.local/bin/jack_setup
  5. 15
      scripts/.local/bin/makedoc
  6. 12
      scripts/.local/bin/mountmenu
  7. 18
      scripts/.local/bin/newdoc
  8. 12
      scripts/.local/bin/osk-status
  9. 10
      scripts/.local/bin/osk-toggle
  10. 3
      scripts/.local/bin/password-menu-wofi
  11. 4
      scripts/.local/bin/pim
  12. 7
      scripts/.local/bin/renametaz
  13. 4
      scripts/.local/bin/show-osk
  14. 13
      scripts/.local/bin/unmountmenu
  15. 19
      scripts/.local/bin/workspace-switcher

@ -1,5 +0,0 @@
#!/usr/bin/python
from sys import argv
from os.path import basename
print("# " + basename(argv[1]).replace("_"," ").split(".")[:1][0] + "\n")

@ -1,3 +0,0 @@
#!/bin/bash
busctl call --user sm.puri.OSK0 /sm/puri/OSK0 sm.puri.OSK0 SetVisible b false

@ -1,32 +0,0 @@
#!/usr/bin/env python
"""
Generates an index of the connections between items in the zettel.
"""
import os
import re
base = "/home/nico/vimwiki/zettel/"
edges = [] # an 'edge' is a tuple of a point and a destination.
link_regex = re.compile(r'\[\[(.*?)\]\]')
# search is a function that is called recursively to build the list of reachable files
def search(f):
if os.path.exists(f) and f.split(".")[1] == "md":
fp = open(f,"r")
r = fp.read()
links = link_regex.findall(r)
for l in links: # all files mentioned as links in this one
edge = (f, l) # tuple of (src, dest)
if not (edge in edges):
edges.append(edge)
search(os.path.join(base, l))
search(os.path.join(base,"index.md"))
with open(os.path.join(base,"index"),"w+") as i:
for e in edges:
i.write(f"{os.path.basename(e[0])} {e[1]}\n")

@ -1,2 +0,0 @@
#!/bin/bash
pactl load-module module-jack-sink client_name=pulse_sink_2 connect=yes

@ -1,15 +0,0 @@
#!/bin/bash
pandoc --biblatex -t latex -s -i $1 -o $1.lytex
lilypond-book $1.lytex -o textmp
cd textmp
xelatex $1.tex
if [ -f "$1.bcf" ]
then
biber $1.bcf
xelatex $1.tex
fi
cp $1.pdf ..
cd ..
rm -rf textmp
rm $1.lytex

@ -1,12 +0,0 @@
drives="$(lsblk -rpo "name,size,mountpoint,fstype" | awk -F'[ ]' '$4!=""&&$3==""{printf "%s (%s)\n", $1, $2}')"
[ -z "$drives" ] && exit 1
chosen="$(echo "$drives" | rofi -dmenu -i -p "Mount which drive?" | awk '{print $1}')"
[ -z "$chosen" ] && exit 1
stdout=$(udisksctl mount -b "$chosen")
if [ $? -eq 0 ]
then
notify-send Mount "$stdout"
else
notify-send Mount "Mounting Failed"
fi

@ -1,18 +0,0 @@
#!/usr/bin/python
from time import strftime, localtime
import sys
import os
import re
r = re.compile('[^a-zA-Z]')
TEMPLATE = open("/home/nihilazo/Documents/05-Templates/document.md","r").read()
date = strftime("%Y-%m-%d", localtime())
title = sys.argv[1]
ftitle = r.sub('', title.strip().lower())
fname = "{}-{}.md".format(date,ftitle)
if not os.path.isfile(fname):
with open(fname,"w+") as f:
f.write(TEMPLATE.format(title=title, date=date))
os.system("nvim " + fname)

@ -1,12 +0,0 @@
#!/bin/bash
sleep 0.2
STATUS=$(gsettings get org.gnome.desktop.a11y.applications screen-keyboard-enabled)
if [ "$STATUS" = "false" ]; then
echo "✘"
else
echo "✔"
fi

@ -1,10 +0,0 @@
#!/bin/bash
STATUS=$(gsettings get org.gnome.desktop.a11y.applications screen-keyboard-enabled)
if [ "$STATUS" = "false" ]; then
gsettings set org.gnome.desktop.a11y.applications screen-keyboard-enabled true
else
gsettings set org.gnome.desktop.a11y.applications screen-keyboard-enabled false
fi

@ -1,3 +0,0 @@
#!/bin/bash
gopass ls --flat | wofi --show dmenu | xargs --no-run-if-empty gopass show | wl-copy

@ -1,4 +0,0 @@
#!/bin/sh
tmux new-session -d "nvim ~/vimwiki/index.md +'lcd ~/vimwiki'"
tmux new-window 'calcurse'
tmux -2 attach-session -d

@ -1,7 +0,0 @@
#!/bin/sh
# Renames episodes of the adventure zone
IFS=
for i in *.mp3
do
mv $i $(echo $i | awk '{printf "%s %s %s.mp3",$1,$5,$7}' | sed 's/://')
done

@ -1,4 +0,0 @@
#!/bin/bash
pidof squeekboard || squeekboard &
busctl call --user sm.puri.OSK0 /sm/puri/OSK0 sm.puri.OSK0 SetVisible b true

@ -1,13 +0,0 @@
COLS="name,type,size,mountpoint"
drives=$(lsblk -rpo "name,size,mountpoint" | awk -F'[ ]' '$1!~"/dev/sda.|/dev/sdb."&&$3!=""&&NR!=1{printf "%s (%s)\n",$1, $3}')
[ -z "$drives" ] && exit
chosen=$(echo "$drives" | rofi -dmenu -i -p "Unmount which drive?" | awk '{print $1}')
[ -z "$chosen" ] && exit
stdout=$(udisksctl unmount -b "$chosen")
if [ $? -eq 0 ]
then
notify-send "Mount" "$stdout"
else
notify-send "Mount" "Unmounting Failed"
fi

@ -1,19 +0,0 @@
#!/usr/bin/env python
import sys
from i3ipc import Connection
i3 = Connection()
ws = i3.get_workspaces()
for w in ws:
if w.focused == True:
current = w
if sys.argv[1] == "next":
i3.command(f"workspace {current.num + 1}")
elif sys.argv[1] == "prev":
if current.num == 1:
pass
else:
i3.command(f"workspace {current.num - 1}")
Loading…
Cancel
Save