many updates
authorMart Lubbers <mart@martlubbers.net>
Mon, 17 Dec 2018 11:04:38 +0000 (12:04 +0100)
committerMart Lubbers <mart@martlubbers.net>
Mon, 17 Dec 2018 11:04:38 +0000 (12:04 +0100)
- 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
email/.config/msmtp/config
music/.ncmpcpp/bindings [new file with mode: 0644]
music/.ncmpcpp/config [new file with mode: 0644]
shell/.local/bin/update
x/.config/tridactyl/tridactylrc [new file with mode: 0644]
x/.local/bin/bar
x/.local/bin/xrandr-clone-hdmi.sh [new file with mode: 0755]
x/.local/bin/xrandr-extend-hdmi.sh [new file with mode: 0755]
x/.local/bin/xrandr-only-laptop.sh [new file with mode: 0755]

index acf04f0..745a9e1 100755 (executable)
@@ -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 <<EOPATCH
+--- StdGeneric.dcl     2018-12-17 02:43:55.000000000 +0100
++++ StdGeneric.dcl     2018-12-17 11:06:09.196234236 +0100
+@@ -64,6 +64,16 @@
+ derive bimap FIELD
+ derive bimap (->)
++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 <<EOPATCH
+--- StdGeneric.icl     2018-12-17 02:43:55.000000000 +0100
++++ StdGeneric.icl     2018-12-17 11:06:09.196234236 +0100
+@@ -21,6 +21,23 @@
+ bimap{|(->)|} _ 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 <<EOPATCH
+--- IDEEnvs    2018-12-17 11:58:48.876039159 +0100
++++ IDEEnvs    2018-12-17 12:00:52.384066455 +0100
+@@ -35,13 +35,44 @@
+                       Path:   {Application}/lib/StdEnv
+                       Path:   {Application}/lib/Dynamics
+                       Path:   {Application}/lib/TCPIP
++                      Path:   {Application}/lib/Gast
+                       Path:   {Application}/lib/Platform
+                       Path:   {Application}/lib/Platform/Deprecated/Generics
++                      Path:   {Application}/lib/Platform/Deprecated/ArgEnv
++                      Path:   {Application}/lib/Platform/Deprecated/MersenneTwister
+                       Path:   {Application}/lib/Platform/Deprecated/StdLib
+                       Path:   {Application}/lib/Sapl
+                       Path:   {Application}/lib/GraphCopy
+                       Path:   {Application}/lib/iTasks
+-              EnvironmentCompiler:    lib/exe/cocl::-dynamics -sapl
++              EnvironmentCompiler:    lib/exe/cocl:-h 500m -s 20m:-dynamics -sapl
++              EnvironmentCodeGen:     lib/exe/cg
++              EnvironmentLinker:      lib/exe/linker|lib/exe/sapl-collector-linker|lib/exe/itasks-web-collector
++              EnvironmentDynLink:     lib/exe/linker
++              EnvironmentVersion:     920
++              EnvironmentRedirect:    False
++              EnvironmentCompileMethod:       Pers
++              EnvironmentProcessor:   I386
++              Environment64BitProcessor:      True
++      Environment
++              EnvironmentName:        iTasks-git
++              EnvironmentPaths
++                      Path:   {Application}/lib/StdEnv
++                      Path:   {Application}/lib/Dynamics
++                      Path:   {Application}/lib/TCPIP
++                      Path:   {Application}/lib/Sapl
++                      Path:   {Application}/lib/GraphCopy
++                      Path:   {Application}/lib/Gast
++                      Path:   /home/mrl/projects/clean/clean-platform/src/libraries/Platform-x86
++                      Path:   /home/mrl/projects/clean/clean-platform/src/libraries/OS-Posix
++                      Path:   /home/mrl/projects/clean/clean-platform/src/libraries/OS-Linux
++                      Path:   /home/mrl/projects/clean/clean-platform/src/libraries/OS-Linux-64
++                      Path:   /home/mrl/projects/clean/clean-platform/src/libraries/OS-Independent
++                      Path:   /home/mrl/projects/clean/clean-platform/src/libraries/OS-Independent/Deprecated/Generics
++                      Path:   /home/mrl/projects/clean/clean-platform/src/libraries/OS-Independent/Deprecated/StdLib
++                      Path:   /home/mrl/projects/clean/clean-platform/src/libraries/OS-Independent/Deprecated/ArgEnv
++                      Path:   /home/mrl/projects/clean/clean-platform/src/libraries/OS-Independent/Deprecated/MersenneTwister
++                      Path:   /home/mrl/projects/clean/iTasks-SDK/Libraries
++              EnvironmentCompiler:    lib/exe/cocl:-h 500m -s 20m:-dynamics -sapl
+               EnvironmentCodeGen:     lib/exe/cg
+               EnvironmentLinker:      lib/exe/linker|lib/exe/sapl-collector-linker|lib/exe/itasks-web-collector
+               EnvironmentDynLink:     lib/exe/linker
+EOPATCH
index e150d1b..9b6be2f 100644 (file)
@@ -3,7 +3,8 @@ host lubbers.email
 port 587
 auth on
 tls on
-tls_fingerprint B6:C7:06:ED:BA:F6:EF:8B:A3:0F:83:2D:F6:73:B4:78:D6:07:C9:52:60:8C:8A:FB:B4:B2:BA:3F:CA:00:B2:FC
+#tls_fingerprint B6:C7:06:ED:BA:F6:EF:8B:A3:0F:83:2D:F6:73:B4:78:D6:07:C9:52:60:8C:8A:FB:B4:B2:BA:3F:CA:00:B2:FC
+tls_certcheck off
 user mart@martlubbers.net
 passwordeval pass mail/mart@martlubbers.net
 #proxy_host localhost
diff --git a/music/.ncmpcpp/bindings b/music/.ncmpcpp/bindings
new file mode 100644 (file)
index 0000000..5512564
--- /dev/null
@@ -0,0 +1,22 @@
+def_key "j"
+       scroll_down
+def_key "k"
+       scroll_up
+def_key "J"
+       select_item
+       scroll_down
+def_key "K"
+       select_item
+       scroll_up
+def_key "l"
+       next_column
+def_key "l"
+       slave_screen
+def_key "h"
+       previous_column
+def_key "h"
+       master_screen
+def_key "ctrl-j"
+       page_down
+def_key "ctrl-k"
+       page_up
diff --git a/music/.ncmpcpp/config b/music/.ncmpcpp/config
new file mode 100644 (file)
index 0000000..bdbeaea
--- /dev/null
@@ -0,0 +1,41 @@
+browser_sort_mode = name
+browser_sort_format = {%A - }{%t}|{%f} {(%l)}
+song_columns_list_format = (6f)[green]{NE} (30)[]{a} (30)[white]{t} (30)[cyan]{b} (7f)[magenta]{l}
+
+playlist_show_remaining_time = yes
+playlist_shorten_total_times = yes
+playlist_separate_albums = yes
+
+browser_display_mode = columns
+search_engine_display_mode = columns
+playlist_editor_display_mode = columns
+
+autocenter_mode = yes
+centered_cursor = yes
+
+default_place_to_search_in = database
+user_interface = alternative
+
+media_library_primary_tag = album_artist
+cyclic_scrolling = yes
+
+allow_for_physical_item_deletion = no
+
+startup_screen = "playlist"
+startup_slave_screen = "media_library"
+
+locked_screen_width_part = 50
+ask_for_locked_screen_width_part = no
+
+clock_display_seconds = yes
+display_volume_level = yes
+display_bitrate = yes
+display_remaining_time = yes
+
+ignore_leading_the = yes
+media_library_sort_by_mtime = no
+
+enable_window_title = yes
+
+external_editor = vim
+use_console_editor = yes
index 832323c..453a6e5 100755 (executable)
@@ -7,4 +7,4 @@ cmd() {
 }
 
 sudo sh -c "$(cmd)"
-sh -c "tlmgr update --all --self && offlineimap -o -u ttyui && khal -c .config/khal/config $NUL && khard $NUL && pass git pull origin master"
+sh -c "tlmgr update --all --self && offlineimap -o -u ttyui && khal $NUL && khard $NUL && pass git pull origin master"
diff --git a/x/.config/tridactyl/tridactylrc b/x/.config/tridactyl/tridactylrc
new file mode 100644 (file)
index 0000000..5cfff67
--- /dev/null
@@ -0,0 +1,23 @@
+" This file must be put in ~/.config/tridactyl/
+" In order to source the file, tridactyl needs the native messenger. See
+" :installnative in tridactly
+"
+" When you make changes to this file, either :source it or restart firefox
+"
+" To see all current settings, use :viewconfig
+
+" This must be the first entry to get vim-like behaviour where removing a line
+" from here makes the setting disappear. Otherwise settings are cached
+" internally somehow
+sanitize tridactyllocal tridactylsync
+
+bind <Space> 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
index bc01c54..cdc09f4 100755 (executable)
@@ -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 (executable)
index 0000000..a5eec97
--- /dev/null
@@ -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 (executable)
index 0000000..00abe20
--- /dev/null
@@ -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 (executable)
index 0000000..de1baf2
--- /dev/null
@@ -0,0 +1,2 @@
+#!/bin/sh
+xrandr --output eDP1 --auto --output HDMI1 --off