From 32a0f89bc0eea5252e432f626d16b7ecdddcc97f Mon Sep 17 00:00:00 2001 From: Mart Lubbers Date: Mon, 17 Dec 2018 12:04:38 +0100 Subject: [PATCH] many updates - patch clean on installation - update msmtp fpr - readd ncmpcpp only for streaming - add trydactyl - update bar to ignore docker interfaces - add scripts for external monitors --- clean/.local/bin/install_clean.sh | 105 ++++++++++++++++++++++++++++- email/.config/msmtp/config | 3 +- music/.ncmpcpp/bindings | 22 ++++++ music/.ncmpcpp/config | 41 +++++++++++ shell/.local/bin/update | 2 +- x/.config/tridactyl/tridactylrc | 23 +++++++ x/.local/bin/bar | 9 ++- x/.local/bin/xrandr-clone-hdmi.sh | 2 + x/.local/bin/xrandr-extend-hdmi.sh | 2 + x/.local/bin/xrandr-only-laptop.sh | 2 + 10 files changed, 207 insertions(+), 4 deletions(-) create mode 100644 music/.ncmpcpp/bindings create mode 100644 music/.ncmpcpp/config create mode 100644 x/.config/tridactyl/tridactylrc create mode 100755 x/.local/bin/xrandr-clone-hdmi.sh create mode 100755 x/.local/bin/xrandr-extend-hdmi.sh create mode 100755 x/.local/bin/xrandr-only-laptop.sh diff --git a/clean/.local/bin/install_clean.sh b/clean/.local/bin/install_clean.sh index acf04f0..745a9e1 100755 --- a/clean/.local/bin/install_clean.sh +++ b/clean/.local/bin/install_clean.sh @@ -1,4 +1,107 @@ #!/bin/sh -mv /opt/clean /opt/clean.bak +cd /tmp curl ftp://ftp.cs.ru.nl/pub/Clean/builds/linux-x64/clean-bundle-complete-linux-x64-latest.tgz | tar -xz +rm -rf /opt/clean mv clean-bundle-complete /opt/clean + +patch /opt/clean/lib/StdEnv/StdGeneric.dcl <) + ++generic binumap a b | binumap b a :: a -> b ++derive binumap c ++derive binumap PAIR ++derive binumap EITHER ++derive binumap OBJECT ++derive binumap CONS ++derive binumap RECORD ++derive binumap FIELD ++derive binumap (->) ++ + // HACK: dictionaries for all generics. + // It works since all generic classes have only one method and do not inherit + // from other classes +EOPATCH + +patch /opt/clean/lib/StdEnv/StdGeneric.icl <)|} _ ba fr _ f = comp3 fr f ba + ++binumap{|c|} x = x ++ ++binumap{|PAIR|} fx _ fy _ (PAIR x y) = PAIR (fx x) (fy y) ++ ++binumap{|EITHER|} fl _ fr _ (LEFT x) = LEFT (fl x) ++binumap{|EITHER|} fl _ fr _ (RIGHT x) = RIGHT (fr x) ++ ++binumap{|CONS|} fx _ (CONS x) = CONS (fx x) ++ ++binumap{|RECORD|} fx _ (RECORD x) = RECORD (fx x) ++ ++binumap{|FIELD|} fx _ (FIELD x) = FIELD (fx x) ++ ++binumap{|OBJECT|} fx _ (OBJECT x) = OBJECT (fx x) ++ ++binumap{|(->)|} _ ba fr _ f = comp3 fr f ba ++ + comp3 :: !(.a -> .b) u:(.c -> .a) !(.d -> .c) -> u:(.d -> .b) + comp3 f g h + | is_id f +EOPATCH + +patch /opt/clean/etc/IDEEnvs < scrollpage 0.5 +bind h tabprev +bind l tabnext + +set yankto selection +set putfrom selection +set hintchars 1234567890 +set hintfiltermode vimperator-reflow +set allowautofocus false +set searchengine duckduckgo diff --git a/x/.local/bin/bar b/x/.local/bin/bar index bc01c54..cdc09f4 100755 --- a/x/.local/bin/bar +++ b/x/.local/bin/bar @@ -1,4 +1,5 @@ #!/bin/sh +# battery if stat -t /sys/class/power_supply/BAT*/uevent >/dev/null 2>&1; then for f in /sys/class/power_supply/BAT*/uevent; do eval $(grep -v " " "$f") @@ -6,7 +7,8 @@ if stat -t /sys/class/power_supply/BAT*/uevent >/dev/null 2>&1; then done fi -for int in $(ip link show | grep -Po '(?<=.: )[A-Za-z0-9]+(?=:)'); do +# network adapters +for int in $(ip link show | grep -Po '(?<=.: )[A-Za-z0-9]+(?=:)' | grep -v docker); do if [ $(ip addr show dev $int | grep -Po "(?<=link/)\S+ ") = "ether" ]; then net="$net$int: " if /sbin/iwconfig $int >/dev/null 2>&1; then @@ -16,8 +18,13 @@ for int in $(ip link show | grep -Po '(?<=.: )[A-Za-z0-9]+(?=:)'); do fi done +# sound levels snd="♪ $(pactl list sinks | grep -Po "(?<=Volume: front)[^%]*" | grep -o "[0-9]\?[0-9][0-9]$" | head -n 1) | " + +# disk space dsk="Dsk: $(df -h | grep '/$' | awk '{print $4"/"$2}') | " + +# date date="$(date +"%Y-%m-%d %H:%M") " echo "$net$snd$bat$dsk$date" diff --git a/x/.local/bin/xrandr-clone-hdmi.sh b/x/.local/bin/xrandr-clone-hdmi.sh new file mode 100755 index 0000000..a5eec97 --- /dev/null +++ b/x/.local/bin/xrandr-clone-hdmi.sh @@ -0,0 +1,2 @@ +#!/bin/sh +xrandr --output eDP1 --auto --output HDMI1 --same-as eDP1 --auto diff --git a/x/.local/bin/xrandr-extend-hdmi.sh b/x/.local/bin/xrandr-extend-hdmi.sh new file mode 100755 index 0000000..00abe20 --- /dev/null +++ b/x/.local/bin/xrandr-extend-hdmi.sh @@ -0,0 +1,2 @@ +#!/bin/sh +xrandr --output eDP1 --auto --output HDMI1 --right-of eDP1 --auto diff --git a/x/.local/bin/xrandr-only-laptop.sh b/x/.local/bin/xrandr-only-laptop.sh new file mode 100755 index 0000000..de1baf2 --- /dev/null +++ b/x/.local/bin/xrandr-only-laptop.sh @@ -0,0 +1,2 @@ +#!/bin/sh +xrandr --output eDP1 --auto --output HDMI1 --off -- 2.20.1