cleanup unused stuff and use passmenu from debian
authorMart Lubbers <mart@martlubbers.net>
Tue, 16 Oct 2018 13:02:26 +0000 (15:02 +0200)
committerMart Lubbers <mart@martlubbers.net>
Tue, 16 Oct 2018 13:02:26 +0000 (15:02 +0200)
config.h/dwm/config.h
x/.local/bin/bg [deleted file]
x/.local/bin/gvwrap [deleted file]
x/.local/bin/network [deleted file]
x/.local/bin/passmenu [deleted file]
x/.local/bin/pdflatexi [deleted file]
x/.local/bin/thumbnailer.sh [deleted file]
x/.local/bin/wifi [deleted file]

index 77868b1..0ee2c80 100644 (file)
@@ -61,8 +61,8 @@ static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn()
 static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL };
 static const char *termcmd[]  = { "st", NULL };
 static const char *quitcmd[]  = { "killall", "xinit", NULL };
-static const char *passmenu[]  = { "passmenu", NULL };
-static const char *passmenu_type[]  = { "passmenu", "--type", NULL };
+static const char *passmenu[]  = { "/usr/share/doc/pass/examples/dmenu/passmenu", NULL };
+static const char *passmenu_type[]  = { "/usr/share/doc/pass/examples/dmenu/passmenu", "--type", NULL };
 static const char *scr[] = { "scr", NULL };
 static const char *scr_sel[] = { "scr", "selection", NULL };
 static const char *lock[] = { "slock", NULL };
diff --git a/x/.local/bin/bg b/x/.local/bin/bg
deleted file mode 100755 (executable)
index b7e28a4..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/bash
-convert -size 1x1 xc:black png:- | display -window root
diff --git a/x/.local/bin/gvwrap b/x/.local/bin/gvwrap
deleted file mode 100755 (executable)
index 39b8a83..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-gv "$(fsel)"
diff --git a/x/.local/bin/network b/x/.local/bin/network
deleted file mode 100755 (executable)
index 4cb4f0c..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/bash
-netctl list | cut -b 3- | dmenu | ifne xargs -I{}\
-       sudo -A bash -c "netctl switch-to {} && ntpd -qg && hwclock -w"
diff --git a/x/.local/bin/passmenu b/x/.local/bin/passmenu
deleted file mode 100755 (executable)
index 9f91d12..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/bin/sh
-/usr/bin/passmenu "$@"|| /usr/share/doc/pass/examples/dmenu/passmenu "$@"
diff --git a/x/.local/bin/pdflatexi b/x/.local/bin/pdflatexi
deleted file mode 100755 (executable)
index a23b435..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/usr/bin/expect
-proc tryInstallPackage { name } {
-       global latexpid oldresult result spawn_id argv
-
-       # Set result
-       set result $name
-       send_user "\nTrying to install missing package\n"
-       # Encountering this result for the second time...
-       if {$oldresult == $result} {
-               send_user "$result has been tried twice with no results\n"
-               send_user "Is this not an image? Aborting...\n"
-               exit
-       # Install the package with tlmgri
-       } { spawn tlmgri $result
-               interact
-               # Reset spawn id to kill original pdflatex
-               set spawn_id $latexpid
-               close
-               wait
-               # Respawn pdflatex
-               spawn pdflatex {*}$argv
-               set oldresult $result
-               exp_continue
-       }
-}
-
-# Start latex and save the pid to kill it later
-spawn pdflatex {*}$argv
-set latexpid $spawn_id
-
-# Initialize the saved result to compare later
-set oldresult ""
-set result ""
-
-expect {
-       # Regular sty file is missing
-       -re "^.*File .(.*). not found.*$" {
-               tryInstallPackage $expect_out(1,string)
-       } -re "^.*language definition file (.*) was not foun" {
-       # Bibtex ldf file is missing
-               tryInstallPackage $expect_out(1,string)
-       } -re "^.*Encoding file .(.*). not found." {
-       # Font encoding file is missing
-               tryInstallPackage $expect_out(1,string)
-       } timeout {
-       # Timeout
-               send_user "Compilation timed out???"
-               exit
-       }
-}
diff --git a/x/.local/bin/thumbnailer.sh b/x/.local/bin/thumbnailer.sh
deleted file mode 100755 (executable)
index 9c7edeb..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/bin/bash
-
-PAGERESIZE=50%
-
-log () {
-       echo "$@" >&2
-}
-
-if [ "$#" -ne 2 ]
-then
-       log "Convert all pdf pages to a montage"
-       log "Usage: $0 INPUT.pdf OUTPUT.png"
-       exit 1
-fi
-log "Processing $1 to $2"
-
-TMPDIR="$(mktemp -d)"
-trap "rm -r $TMPDIR" EXIT 
-log "Temp directory created in $TMPDIR"
-
-NUMPAGES=$(identify "$1" | wc -l)
-log "$NUMPAGES detected"
-
-log -n "Processing page: "
-for ((p=0;p<$NUMPAGES;p++))
-do
-       convert "$1"[$p] -resize $PAGERESIZE $TMPDIR/$p.png
-       log -n "$p, "
-done
-log "done!"
-
-montage -geometry +0+0 $TMPDIR/*.png "$2"
-log "Montaging done"
diff --git a/x/.local/bin/wifi b/x/.local/bin/wifi
deleted file mode 100755 (executable)
index f024272..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/bash
-{ 
-       sudo -A iw dev wlp2s0 scan | grep -Po "(?<=SSID: ).*" | sort -u;
-       netctl list | cut -b 3-; 
-} | sort | uniq -d | head -1 | ifne xargs sudo -A netctl switch-to