From c2ca6e7512c4d6f1ae059ccabe97220510c64de7 Mon Sep 17 00:00:00 2001 From: Hector Date: Thu, 19 Jul 2018 13:22:07 -0700 Subject: [PATCH 01/90] universal package list --- packages | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 packages diff --git a/packages b/packages new file mode 100644 index 0000000..6057b4c --- /dev/null +++ b/packages @@ -0,0 +1,24 @@ +binutils +command-not-found +coreutils +curl +diffutils +figlet +file +git +golang +grep +make +man +mosh +openssh +procps +python +termux-am +termux-api +termux-exec +termux-tools +tig +tmux +vim +zsh -- GitLab From 3cf7d2a4e72ae4797cc2f8301c00c834512dee53 Mon Sep 17 00:00:00 2001 From: Hector Date: Thu, 19 Jul 2018 22:46:03 -0700 Subject: [PATCH 02/90] removing stray swp --- tmux.d/.tmux.conf.swp | Bin 16384 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 tmux.d/.tmux.conf.swp diff --git a/tmux.d/.tmux.conf.swp b/tmux.d/.tmux.conf.swp deleted file mode 100644 index e4e297ae8e64b68307b2e1e6d6b229da1473f463..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 16384 zcmYc?2=nw+u+TGPU|?VnU|^76Wfkpshn*qDh=IY-z{m_N4wA!zbMliDb29RaOYo=x zN$IB~mLx)m{fzwFRDHdwp#jJcWhF%gVWChEa}i$9H zFoB1GA)kkVA)JSS!Ip=C!G?!{L79hv;S)Cl!$EEahAG?(3_aWo4Bgxe43*pr3_;us z4C>qr3=G^13~#s?7+!NRFx=r{U^v3Xz_6T)fnh2a1H%+928K*71_m!K1_muI1_ll; z28NfM3=GFO85ovwGBC7oGB7lAGB8wgGBCt(GBCt)GBCJtGB7xDGBC(;GB9v)GBCX7 zU|=}N!NAbV!N8Eq!N8Ep!NB0g!N4HR!N4HJ!NBm4oq^#9I|D-#I|IWnHU@?YHU@?; zHUC$>GBYr^Ff%Z)F*7h6 zWny6HW@2E-XJTN`XJTOBV`5<7Wny6X!N|aHjgbKyC!0a>f)?=#P>__Fm!hDc;AX6# zppcxApI@A+o1BxGnpeUARiFSQjhPC`v8PtV-1_ zNX$!B(2c@SP=%&IL0KU=u{c#BGp{%`uQ;Ql!8->i!<}{ij@>%tQCsOGfR>)pn;^I z8={b#pO;yZj|dHzzk?741c3tpyLL$6V0fxXp*X*^C^=OZw6sM*#lzp%Rlm3>S>GkU z1SC?dp8{imSGXW8bOAXM?sVt;ytK@8g`m`&{KS;h6h$Qrivko15{pYxbnn%r<>W)$1`oIpa9T@I$jMJn&&*3#D9Kl-LsnRvT9TSqrV!#A8WA7v>F44f z9`EDtuAmN6q>d3FISP5H6(zdmnRzMs<#1Ve-cj&YNY2mAP0UNtEhx&*EhtgYEl^PR zP0Uj$NK8)!*`JbGoC8Xb_6k-C>IzE51v!~8;}mo=6x35IQj-;O6Y~^QRn@H(ic|Aa zbhA?{ixr%83zQU;75q}m6(E*_6oCvyazu!~i@%jZc~NFbszPycQD#92*v5Q?l8nq^ zh0HvKM1|b^qEvRr5OqZMX6<(`K86^VF)wK4JFUi;m&hrW~MaqTu_i$TwIV}gvSv9P!&YF z!x@otoWZ5JLVf{`;tP9euaK;ems*Z1ppz7eQ%iL73%~)QP+XE&Qd+E_3@x8w{G`Mp zL}gH#2ZyI#AUGu@A&bM3x6nTnx zQP52XrL(lm3L^z)-6W8HP@$KWU!+h_T9jE_QjA@-f`YSdB3ugUU1!}Su#mDs0N8N~ zNvRo$WtsU!3OSkC;Ea}$*BtYd2j{FpvVOU15`Y@mQ-Rf z0HjklKTkI?C$$Kh1z>rQ{`@?J#5`CM2?IM_0j#N5K@Hsa0ELwTD3VGtQgf{osv!Xa z3A)_;(&AJFM9P6W4=k)(T9Rgg#bsbgn7FcnFW3l#v9;hh@ySol&df`P`&$`ma!!77 zwr+81QCVt{LUewfLJcT%VzDcOmiY?B8L2rrx=ygsq_gW^Msh0hxJ;IlB2}sYOMZ zDXGN@N?KOQIjM<7wlS&E9xCDh9JQJEuG~2ocy96UfqF|An)UwnZTSG8AH7_wKCso0U0o4D0&&j|rn+vl3A2vUKh@XL>hM$2Uj-P?S zk)MI#10Mr}6CVQu3m*f+KVAlgzq||#uXq_4&hj!ar1LN^eBowbxWdiAaG9HdVIMaG z!(46#hRNIv3^m*g4AtBW3@O|U49VOK3_eJG_#0dd412j481`^6Fl^&uU|7nbp z8&HQ>SwR^zGF4Op?U^%x1ZqL8U{F_489Gz|9rQ~|EK;atPzK3>F}(8uYndmdD}cIk zrA0;nbRC>FGrfZUnPL)Zu!;sgyo6+`R;X@dp}v?~X< z8Eyes4Q#v!s)|4-IW;dax!A#~I2TM6L8!#!;$#OMEl3X$-b+U75@U%D;;e)l2@-u`7}sb+(>k5(G&3;M9KM9h&kW zL&ds9peY31oYcJZk_-h?19h0CBV7I1&#?N9Els&K;h#E)`jqnITl>|FfK?yFa ztdL(?Qk`o#kW!utD*8%Fi$UdDaYlZ5u|i2kYH_MU zVop(NVoD_}{FN0zk_yH7xv2`J#i?nfIbeOo3Q47);n|!@h4PHlJO%J@L1r;XuBaq6 Gg#iF%cV|=p -- GitLab From 9fec5221459eece857026fcf0932006b9e00b9fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Lecuanda?= Date: Mon, 20 Aug 2018 16:38:01 -0700 Subject: [PATCH 03/90] initial --- commands | 16 ++++++++++++++++ create-node-add-dns | 5 +++++ datalab-gateway.yaml | 35 +++++++++++++++++++++++++++++++++++ dnschangeset.yaml | 18 ++++++++++++++++++ 4 files changed, 74 insertions(+) create mode 100644 commands create mode 100644 create-node-add-dns create mode 100644 datalab-gateway.yaml create mode 100644 dnschangeset.yaml diff --git a/commands b/commands new file mode 100644 index 0000000..c9fcf4f --- /dev/null +++ b/commands @@ -0,0 +1,16 @@ +export Z=gcloud-mcpaints-net +cd +gcloud dns record-sets transaction start -z $Z +gcloud dns record-sets transaction add --name=devel.gcloud.mcpaints.net --ttl 360 n--zone $z --type=A "104.198.96.20" +gcloud dns record-sets transaction add --name=devel.gcloud.mcpaints.net --ttl 360 n--zone $Z --type=A "104.198.96.20" +gcloud dns record-sets transaction add "104.198.96.20" --name=devel.gcloud.mcpaints.net --ttl 360 n--zone $Z --type=A +gcloud dns record-sets transaction add "104.198.96.20" --name=devel.gcloud.mcpaints.net --ttl 360 --zone $Z --type=A +cat transaction.yaml +gcloud dns record-sets transaction execute +gcloud dns record-sets transaction execute --zone=$Z +host +h +history +^Aj^A^A +vim create-node-add-dns +history -n diff --git a/create-node-add-dns b/create-node-add-dns new file mode 100644 index 0000000..e79284b --- /dev/null +++ b/create-node-add-dns @@ -0,0 +1,5 @@ + +gcloud compute --project "mezaops" instances create "devel" --zone "us-west1-a" --machine-type "n1-standard-1" --subnet "default" --maintenance-policy "MIGRATE" --scopes default="https://www.googleapis.com/auth/devstorage.read_only","https://www.googleapis.com/auth/logging.write","https://www.googleapis.com/auth/monitoring.write","https://www.googleapis.com/auth/servicecontrol","https://www.googleapis.com/auth/service.management.readonly" --disk "name=devel,device-name=devel,mode=rw,boot=yes" +gcloud dns record-sets transaction start -z gcloud-mcpaints-net +gcloud dns record-sets transaction add "104.198.96.20" --name=devel.gcloud.mcpaints.net --ttl 360 --zone gcloud-mcpaints-net --type=A +gcloud dns record-sets transaction execute --zone=gcloud-mcpaints-net diff --git a/datalab-gateway.yaml b/datalab-gateway.yaml new file mode 100644 index 0000000..7ee3b0b --- /dev/null +++ b/datalab-gateway.yaml @@ -0,0 +1,35 @@ +apiVersion: v1 +kind: Pod +metadata: + name: 'datalab-gateway' +spec: + containers: + - name: datalab-kernel-gateway + image: gcr.io/cloud-datalab/datalab-gateway + command: ['/datalab/run.sh'] + imagePullPolicy: IfNotPresent + ports: + - containerPort: 8080 + hostPort: 8080 + hostIP: 127.0.0.1 + env: + - name: DATALAB_ENV + value: GCE + - name: logger + image: gcr.io/google_containers/fluentd-gcp:1.18 + env: + - name: FLUENTD_ARGS + value: -q + volumeMounts: + - name: varlog + mountPath: /var/log + - name: varlibdockercontainers + mountPath: /var/lib/docker/containers + readOnly: true + volumes: + - name: varlog + hostPath: + path: /var/log + - name: varlibdockercontainers + hostPath: + path: /var/lib/docker/containers diff --git a/dnschangeset.yaml b/dnschangeset.yaml new file mode 100644 index 0000000..81da7db --- /dev/null +++ b/dnschangeset.yaml @@ -0,0 +1,18 @@ +additions: +- kind: dns#resourceRecordSet + name: trantor.gcloud.lecuanda.com. + rrdatas: + - 104.154.17.122 + ttl: 300 + type: A +deletions: +- kind: dns#resourceRecordSet + name: trantor.gcloud.lecuanda.com. + rrdatas: + - 104.197.141.243 + ttl: 300 + type: A +id: '5' +kind: dns#change +startTime: '2016-06-10T00:47:46.138Z' +status: done -- GitLab From 4de64288800b68a8a31972e111880125bf474069 Mon Sep 17 00:00:00 2001 From: Hector Date: Tue, 21 Aug 2018 18:49:02 +0000 Subject: [PATCH 04/90] make firewall --- Firewall.mk | 28 ++++++++++++++++++++++++++++ Makefile | 10 ++++++++++ 2 files changed, 38 insertions(+) create mode 100644 Firewall.mk create mode 100644 Makefile diff --git a/Firewall.mk b/Firewall.mk new file mode 100644 index 0000000..08f3567 --- /dev/null +++ b/Firewall.mk @@ -0,0 +1,28 @@ + +FWRULES gcloud compute firewall-rules +CREATE = $(FWRULES) create +DESCRIBE = $(FWRULES) describe +LIST = $(FWRULES) list +ALLOW = --action=ALLOW +IN = --direction=INGRESS +IN += --source-ranges=$(WIMIP)/32 +IN += --target-tags=bastion +OUT = --direction=EGRESS +OUT += --source-tags=bastion +OUT += --destination-ranges=$(WIMIP)/32 +PARAM = --network="default" --priority=900 +RULES = --rules=tcp:22,udp:60000-61000 + +create: + @$(CREATE) ssh-allow-in $(ALLOW) $(IN) $(RULES) $(PARAM) + @$(CREATE) ssh-allow-out $(ALLOW) $(OUT) $(RULES) $(PARAM) + +describe: + @$(DESCRIBE) ssh-allow-in + @$(DESCRIBE) ssh-allow-out + +list: + @$(LIST) + + +delete: diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..a1e933b --- /dev/null +++ b/Makefile @@ -0,0 +1,10 @@ + + +CURL = curl -Ss +WIMIP = https://mezaops.appspot.com/knock/ +JQ= jq .ip +MYIP != $(CURL) $(WIMIP) | $(JQ) + +.PHONY: open describe list + +include Firewall.mk -- GitLab From 9af559abe1adaa03e082dc6c2b2e422841d56018 Mon Sep 17 00:00:00 2001 From: Hector Date: Tue, 21 Aug 2018 19:37:04 +0000 Subject: [PATCH 05/90] adjustments --- Firewall.mk | 18 +++++++++++------- Makefile | 5 +++-- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/Firewall.mk b/Firewall.mk index 08f3567..913aa5b 100644 --- a/Firewall.mk +++ b/Firewall.mk @@ -1,28 +1,32 @@ -FWRULES gcloud compute firewall-rules +FWRULES = gcloud compute firewall-rules CREATE = $(FWRULES) create DESCRIBE = $(FWRULES) describe LIST = $(FWRULES) list ALLOW = --action=ALLOW IN = --direction=INGRESS -IN += --source-ranges=$(WIMIP)/32 +IN += --source-ranges=$(MYIP)/32 IN += --target-tags=bastion OUT = --direction=EGRESS OUT += --source-tags=bastion -OUT += --destination-ranges=$(WIMIP)/32 +OUT += --destination-ranges=$(MYIP)/32 PARAM = --network="default" --priority=900 RULES = --rules=tcp:22,udp:60000-61000 -create: +.PHONY: firewall fw-list fw-describe fw-create fw-delete + +firewall: fw-list fw-create + +fw-create: @$(CREATE) ssh-allow-in $(ALLOW) $(IN) $(RULES) $(PARAM) @$(CREATE) ssh-allow-out $(ALLOW) $(OUT) $(RULES) $(PARAM) -describe: +fw-describe: @$(DESCRIBE) ssh-allow-in @$(DESCRIBE) ssh-allow-out -list: +fw-list: @$(LIST) -delete: +fw-delete: diff --git a/Makefile b/Makefile index a1e933b..5b5de8f 100644 --- a/Makefile +++ b/Makefile @@ -3,8 +3,9 @@ CURL = curl -Ss WIMIP = https://mezaops.appspot.com/knock/ JQ= jq .ip -MYIP != $(CURL) $(WIMIP) | $(JQ) +MYIP != $(CURL) $(WIMIP) | $(JQ) | sed -e 's/"//g' -.PHONY: open describe list + include Firewall.mk + -- GitLab From e31fddaab9e470f258ebe96521ecf591bff6b126 Mon Sep 17 00:00:00 2001 From: Hector Date: Tue, 21 Aug 2018 22:15:10 +0000 Subject: [PATCH 06/90] adj fw creation --- Firewall.mk | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/Firewall.mk b/Firewall.mk index 913aa5b..f4c4bf2 100644 --- a/Firewall.mk +++ b/Firewall.mk @@ -8,7 +8,6 @@ IN = --direction=INGRESS IN += --source-ranges=$(MYIP)/32 IN += --target-tags=bastion OUT = --direction=EGRESS -OUT += --source-tags=bastion OUT += --destination-ranges=$(MYIP)/32 PARAM = --network="default" --priority=900 RULES = --rules=tcp:22,udp:60000-61000 @@ -18,15 +17,15 @@ RULES = --rules=tcp:22,udp:60000-61000 firewall: fw-list fw-create fw-create: - @$(CREATE) ssh-allow-in $(ALLOW) $(IN) $(RULES) $(PARAM) - @$(CREATE) ssh-allow-out $(ALLOW) $(OUT) $(RULES) $(PARAM) + @$(CREATE) ssh-in $(ALLOW) $(IN) $(RULES) $(PARAM) + @$(CREATE) ssh-out $(ALLOW) $(OUT) $(RULES) $(PARAM) fw-describe: - @$(DESCRIBE) ssh-allow-in - @$(DESCRIBE) ssh-allow-out + @$(DESCRIBE) ssh-in + @$(DESCRIBE) ssh-out fw-list: @$(LIST) - fw-delete: + -- GitLab From 82e3cd4f099ca732af7345289b4ac8981e7421a9 Mon Sep 17 00:00:00 2001 From: Hector Lecuanda Date: Sun, 18 Nov 2018 23:40:30 +0000 Subject: [PATCH 07/90] Start anew --- Firewall.mk | 31 ------------------------------- Makefile | 11 ----------- commands | 16 ---------------- create-node-add-dns | 5 ----- datalab-gateway.yaml | 35 ----------------------------------- dnschangeset.yaml | 18 ------------------ 6 files changed, 116 deletions(-) delete mode 100644 Firewall.mk delete mode 100644 Makefile delete mode 100644 commands delete mode 100644 create-node-add-dns delete mode 100644 datalab-gateway.yaml delete mode 100644 dnschangeset.yaml diff --git a/Firewall.mk b/Firewall.mk deleted file mode 100644 index f4c4bf2..0000000 --- a/Firewall.mk +++ /dev/null @@ -1,31 +0,0 @@ - -FWRULES = gcloud compute firewall-rules -CREATE = $(FWRULES) create -DESCRIBE = $(FWRULES) describe -LIST = $(FWRULES) list -ALLOW = --action=ALLOW -IN = --direction=INGRESS -IN += --source-ranges=$(MYIP)/32 -IN += --target-tags=bastion -OUT = --direction=EGRESS -OUT += --destination-ranges=$(MYIP)/32 -PARAM = --network="default" --priority=900 -RULES = --rules=tcp:22,udp:60000-61000 - -.PHONY: firewall fw-list fw-describe fw-create fw-delete - -firewall: fw-list fw-create - -fw-create: - @$(CREATE) ssh-in $(ALLOW) $(IN) $(RULES) $(PARAM) - @$(CREATE) ssh-out $(ALLOW) $(OUT) $(RULES) $(PARAM) - -fw-describe: - @$(DESCRIBE) ssh-in - @$(DESCRIBE) ssh-out - -fw-list: - @$(LIST) - -fw-delete: - diff --git a/Makefile b/Makefile deleted file mode 100644 index 5b5de8f..0000000 --- a/Makefile +++ /dev/null @@ -1,11 +0,0 @@ - - -CURL = curl -Ss -WIMIP = https://mezaops.appspot.com/knock/ -JQ= jq .ip -MYIP != $(CURL) $(WIMIP) | $(JQ) | sed -e 's/"//g' - - - -include Firewall.mk - diff --git a/commands b/commands deleted file mode 100644 index c9fcf4f..0000000 --- a/commands +++ /dev/null @@ -1,16 +0,0 @@ -export Z=gcloud-mcpaints-net -cd -gcloud dns record-sets transaction start -z $Z -gcloud dns record-sets transaction add --name=devel.gcloud.mcpaints.net --ttl 360 n--zone $z --type=A "104.198.96.20" -gcloud dns record-sets transaction add --name=devel.gcloud.mcpaints.net --ttl 360 n--zone $Z --type=A "104.198.96.20" -gcloud dns record-sets transaction add "104.198.96.20" --name=devel.gcloud.mcpaints.net --ttl 360 n--zone $Z --type=A -gcloud dns record-sets transaction add "104.198.96.20" --name=devel.gcloud.mcpaints.net --ttl 360 --zone $Z --type=A -cat transaction.yaml -gcloud dns record-sets transaction execute -gcloud dns record-sets transaction execute --zone=$Z -host -h -history -^Aj^A^A -vim create-node-add-dns -history -n diff --git a/create-node-add-dns b/create-node-add-dns deleted file mode 100644 index e79284b..0000000 --- a/create-node-add-dns +++ /dev/null @@ -1,5 +0,0 @@ - -gcloud compute --project "mezaops" instances create "devel" --zone "us-west1-a" --machine-type "n1-standard-1" --subnet "default" --maintenance-policy "MIGRATE" --scopes default="https://www.googleapis.com/auth/devstorage.read_only","https://www.googleapis.com/auth/logging.write","https://www.googleapis.com/auth/monitoring.write","https://www.googleapis.com/auth/servicecontrol","https://www.googleapis.com/auth/service.management.readonly" --disk "name=devel,device-name=devel,mode=rw,boot=yes" -gcloud dns record-sets transaction start -z gcloud-mcpaints-net -gcloud dns record-sets transaction add "104.198.96.20" --name=devel.gcloud.mcpaints.net --ttl 360 --zone gcloud-mcpaints-net --type=A -gcloud dns record-sets transaction execute --zone=gcloud-mcpaints-net diff --git a/datalab-gateway.yaml b/datalab-gateway.yaml deleted file mode 100644 index 7ee3b0b..0000000 --- a/datalab-gateway.yaml +++ /dev/null @@ -1,35 +0,0 @@ -apiVersion: v1 -kind: Pod -metadata: - name: 'datalab-gateway' -spec: - containers: - - name: datalab-kernel-gateway - image: gcr.io/cloud-datalab/datalab-gateway - command: ['/datalab/run.sh'] - imagePullPolicy: IfNotPresent - ports: - - containerPort: 8080 - hostPort: 8080 - hostIP: 127.0.0.1 - env: - - name: DATALAB_ENV - value: GCE - - name: logger - image: gcr.io/google_containers/fluentd-gcp:1.18 - env: - - name: FLUENTD_ARGS - value: -q - volumeMounts: - - name: varlog - mountPath: /var/log - - name: varlibdockercontainers - mountPath: /var/lib/docker/containers - readOnly: true - volumes: - - name: varlog - hostPath: - path: /var/log - - name: varlibdockercontainers - hostPath: - path: /var/lib/docker/containers diff --git a/dnschangeset.yaml b/dnschangeset.yaml deleted file mode 100644 index 81da7db..0000000 --- a/dnschangeset.yaml +++ /dev/null @@ -1,18 +0,0 @@ -additions: -- kind: dns#resourceRecordSet - name: trantor.gcloud.lecuanda.com. - rrdatas: - - 104.154.17.122 - ttl: 300 - type: A -deletions: -- kind: dns#resourceRecordSet - name: trantor.gcloud.lecuanda.com. - rrdatas: - - 104.197.141.243 - ttl: 300 - type: A -id: '5' -kind: dns#change -startTime: '2016-06-10T00:47:46.138Z' -status: done -- GitLab From 0e5dc6b974adb5935bee2cb74b9f58ab36764bec Mon Sep 17 00:00:00 2001 From: Hector Lecuanda Date: Sun, 18 Nov 2018 23:41:36 +0000 Subject: [PATCH 08/90] Makecloud next generartion --- Makefile | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..761440f --- /dev/null +++ b/Makefile @@ -0,0 +1,55 @@ + +SHELL = zsh +GCFWRULES = gcloud compute firewall-rules +FWNAME = ens-in +STARTMSG = echo "Figuring out my IP" 1>&2 +DONE = echo "...Done!" +DOGETIP = curl -s mezaops.appspot.com/knock/ | jq .ip +OLDRANGES = $(GCFWRULES) describe $(FWNAME) --format=json +GETOLDRANGES = $(OLDRANGES)| jw .sourceRanges +MYIP = $(STARTMS) && $(DOGETIP) && $(DONE) +DNSPROJ = lecuanda-domain-management +GDNS = gcloud --project=$(DNSPROJ) dns record-sets transaction +DNSOPT = --type=A --ttl=300 +ZONE= --zone mcpaints-public + +HOSTNAME !=hostname +.PHONY: help createfw listfw describefw updatefw deletefw whatismyip + +help: ## Show this message:wq + @echo ""Make targets:"" + @grep -e '##' Makefile + +setdns: ## set this host DNS + $(GDNS) start $(ZONE) + $(GDNS) remove --name=$(HOSTNAME) $(ZONE) $(DNSOPT) + $(GDNS) add --name=$(HOSTNAME) --data=$(MYIP) $(ZONE) + $(GDNS) describe $(ZONE) + $(GDNS) execute $(ZONE) + +abdns: ## abort a transaction + -$(GDNS) abort $(ZONE) + +whatismyip: ## Show your current external IP + @echo + @$(DOGETIP) + +createfw: ## Creates a firewall for the current ip + @typeset myip=$(MYIP) && \ + $(GCFWRULES) create $(FWNAME) --direction=INGRESS --priority=850 --network=default --action=ALLOW --rules=tcp:22,tcp:531,udp:5353,udp:60000-61000 --source-ranges=$$(myip) --target-tags=bastion + +listfw: ## Lisrs the projects firewalls + $(GCFWRULES) list + +describefw: ## describes this firewall + $(GCFWRULES) describe $(FWNAME) + +deletefw: ## deletes this firewall + -$(GCFWRULES) delete $(FWNAME) + +updatefw: deleteFirewall createFirewall + +addfw: disabled + oldranges = $(GETOLDRANGES) + $(GCFWRULES) update $(FWNAME) --source-ranges=$(OLDRANGES) + -- GitLab From 423213dccc456b30557b7192ca1cd5f05abc1719 Mon Sep 17 00:00:00 2001 From: Hector Lecuanda Date: Mon, 19 Nov 2018 04:34:44 +0000 Subject: [PATCH 09/90] Makefile is now pleasantly seklf documenting --- Makefile | 39 +++++++++++++++++++++++++++------------ 1 file changed, 27 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index 761440f..6477b8a 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,7 @@ -SHELL = zsh +SHELL= zsh +ECHO = print -P '%B %s %b' +TITL = print -P '%F{blue}%s%f\n' GCFWRULES = gcloud compute firewall-rules FWNAME = ens-in STARTMSG = echo "Figuring out my IP" 1>&2 @@ -12,39 +14,52 @@ DNSPROJ = lecuanda-domain-management GDNS = gcloud --project=$(DNSPROJ) dns record-sets transaction DNSOPT = --type=A --ttl=300 ZONE= --zone mcpaints-public +AWK = gawk -p HOSTNAME !=hostname .PHONY: help createfw listfw describefw updatefw deletefw whatismyip -help: ## Show this message:wq - @echo ""Make targets:"" - @grep -e '##' Makefile +help:: # Show this message:wq + @figlet Makecloud + @$(TITL) 'Cloud tasks automation ' -setdns: ## set this host DNS +help:: + @$(TITL) 'Cloud DNS Services' + @cat Makefile | \ + $(AWK) '/#1/ && !/AWK/ { gsub(/#1/,"-"); print $0 }' \ + | sort + +setdns: #1 set this host DNS $(GDNS) start $(ZONE) $(GDNS) remove --name=$(HOSTNAME) $(ZONE) $(DNSOPT) $(GDNS) add --name=$(HOSTNAME) --data=$(MYIP) $(ZONE) $(GDNS) describe $(ZONE) $(GDNS) execute $(ZONE) -abdns: ## abort a transaction +abdns: #1 abort a transaction -$(GDNS) abort $(ZONE) -whatismyip: ## Show your current external IP - @echo +help:: + @$(TITL) "Cloud Firewall" + @cat Makefile | \ + $(AWK) '/#2/ && !/AWK/ { gsub(/#2/,"-"); print $0 }' \ + | sort + +whatismyip: #2 Show your current external IP + @$(TITL) "Current IP outside" @$(DOGETIP) -createfw: ## Creates a firewall for the current ip +createfw: #2 Creates a firewall for the current ip @typeset myip=$(MYIP) && \ $(GCFWRULES) create $(FWNAME) --direction=INGRESS --priority=850 --network=default --action=ALLOW --rules=tcp:22,tcp:531,udp:5353,udp:60000-61000 --source-ranges=$$(myip) --target-tags=bastion -listfw: ## Lisrs the projects firewalls +listfw: #2 Lisrs the projects firewalls $(GCFWRULES) list -describefw: ## describes this firewall +describefw: #2 describes this firewall $(GCFWRULES) describe $(FWNAME) -deletefw: ## deletes this firewall +deletefw: #2 deletes this firewall -$(GCFWRULES) delete $(FWNAME) updatefw: deleteFirewall createFirewall -- GitLab From 7c14334c589d7992ec3b363cb6ede95bf792b560 Mon Sep 17 00:00:00 2001 From: Hector Lecuanda Date: Mon, 19 Nov 2018 04:55:03 +0000 Subject: [PATCH 10/90] gitignoee --- .gitignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e2ee931 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +awkprof.out -- GitLab From 13271b76a1067437473c0412c54be7db34f56767 Mon Sep 17 00:00:00 2001 From: Hector Lecuanda Date: Mon, 19 Nov 2018 18:18:22 +0000 Subject: [PATCH 11/90] MYIP is now determined on start using a GAE service --- Makefile | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 6477b8a..badb947 100644 --- a/Makefile +++ b/Makefile @@ -4,12 +4,9 @@ ECHO = print -P '%B %s %b' TITL = print -P '%F{blue}%s%f\n' GCFWRULES = gcloud compute firewall-rules FWNAME = ens-in -STARTMSG = echo "Figuring out my IP" 1>&2 -DONE = echo "...Done!" -DOGETIP = curl -s mezaops.appspot.com/knock/ | jq .ip +MYIP != curl -s mezaops.appspot.com/knock/ | jq .ip OLDRANGES = $(GCFWRULES) describe $(FWNAME) --format=json GETOLDRANGES = $(OLDRANGES)| jw .sourceRanges -MYIP = $(STARTMS) && $(DOGETIP) && $(DONE) DNSPROJ = lecuanda-domain-management GDNS = gcloud --project=$(DNSPROJ) dns record-sets transaction DNSOPT = --type=A --ttl=300 @@ -50,8 +47,7 @@ whatismyip: #2 Show your current external IP @$(DOGETIP) createfw: #2 Creates a firewall for the current ip - @typeset myip=$(MYIP) && \ - $(GCFWRULES) create $(FWNAME) --direction=INGRESS --priority=850 --network=default --action=ALLOW --rules=tcp:22,tcp:531,udp:5353,udp:60000-61000 --source-ranges=$$(myip) --target-tags=bastion + $(GCFWRULES) create $(FWNAME) --direction=INGRESS --priority=850 --network=default --action=ALLOW --rules=tcp:22,tcp:631,udp:5353,udp:60000-61000 --source-ranges=$(MYIP) --target-tags=bastion listfw: #2 Lisrs the projects firewalls $(GCFWRULES) list -- GitLab From 5085a9105f44d50f932b9129207093731b815f6d Mon Sep 17 00:00:00 2001 From: Hector Lecuanda Date: Thu, 22 Nov 2018 20:06:27 +0000 Subject: [PATCH 12/90] Rearranged variables alphabetically --- Makefile | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index badb947..8cb9710 100644 --- a/Makefile +++ b/Makefile @@ -1,19 +1,23 @@ -SHELL= zsh +AWK = gawk -p +DNSOPT = --type=A --ttl=300 ECHO = print -P '%B %s %b' -TITL = print -P '%F{blue}%s%f\n' +FWRULES = --rules=tcp:22,tcp:631,udp:5353,udp:60000-61000 GCFWRULES = gcloud compute firewall-rules -FWNAME = ens-in -MYIP != curl -s mezaops.appspot.com/knock/ | jq .ip +HOSTNAME != hostname +MYIP != curl -s mezaops.appspot.com/knock/ | jq .ip +SHELL = zsh +TITL = print -P '%F{blue}%s%f\n' +VMPARAMS = --direction=INGRESS --priority=850 --network=default +VMPARAMS += --action=ALLOW --target-tags=bastion +ZONE = --zone mcpaints-public + OLDRANGES = $(GCFWRULES) describe $(FWNAME) --format=json GETOLDRANGES = $(OLDRANGES)| jw .sourceRanges + DNSPROJ = lecuanda-domain-management GDNS = gcloud --project=$(DNSPROJ) dns record-sets transaction -DNSOPT = --type=A --ttl=300 -ZONE= --zone mcpaints-public -AWK = gawk -p -HOSTNAME !=hostname .PHONY: help createfw listfw describefw updatefw deletefw whatismyip help:: # Show this message:wq @@ -47,7 +51,7 @@ whatismyip: #2 Show your current external IP @$(DOGETIP) createfw: #2 Creates a firewall for the current ip - $(GCFWRULES) create $(FWNAME) --direction=INGRESS --priority=850 --network=default --action=ALLOW --rules=tcp:22,tcp:631,udp:5353,udp:60000-61000 --source-ranges=$(MYIP) --target-tags=bastion + $(GCFWRULES) create $(FWNAME) $(FWPARAMS) $(VMPARAMS) --source-ranges=$(MYIP) listfw: #2 Lisrs the projects firewalls $(GCFWRULES) list @@ -64,3 +68,4 @@ addfw: disabled oldranges = $(GETOLDRANGES) $(GCFWRULES) update $(FWNAME) --source-ranges=$(OLDRANGES) +# vim: set ft=make sw=4 tw=0 fdm=marker noet : -- GitLab From 362c62e898528935c66e89999f930301ddb1d2be Mon Sep 17 00:00:00 2001 From: Hector Lecuanda Date: Thu, 22 Nov 2018 20:30:15 +0000 Subject: [PATCH 13/90] Organized areas --- Makefile | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/Makefile b/Makefile index 8cb9710..e013cd8 100644 --- a/Makefile +++ b/Makefile @@ -1,16 +1,17 @@ -AWK = gawk -p -DNSOPT = --type=A --ttl=300 -ECHO = print -P '%B %s %b' -FWRULES = --rules=tcp:22,tcp:631,udp:5353,udp:60000-61000 -GCFWRULES = gcloud compute firewall-rules -HOSTNAME != hostname -MYIP != curl -s mezaops.appspot.com/knock/ | jq .ip -SHELL = zsh -TITL = print -P '%F{blue}%s%f\n' -VMPARAMS = --direction=INGRESS --priority=850 --network=default -VMPARAMS += --action=ALLOW --target-tags=bastion -ZONE = --zone mcpaints-public +# Variables{{{ +AWK = gawk -p +DNSOPT = --type=A --ttl=300 +ECHO = print -P '%B %s %b' +FWRULES = --rules=tcp:22,tcp:631,udp:5353,udp:60000-61000 +GCFWRULES = gcloud compute firewall-rules +HOSTNAME != hostname +MYIP != curl -s https://mezaops.appspot.com/knock/ | jq .ip +SHELL = zsh +TITL = print -P '%F{blue}%s%f\n' +VMPARAMS = --direction=INGRESS --priority=850 --network=default +VMPARAMS += --action=ALLOW --target-tags=bastion +ZONE = --zone mcpaints-public# }}} OLDRANGES = $(GCFWRULES) describe $(FWNAME) --format=json GETOLDRANGES = $(OLDRANGES)| jw .sourceRanges @@ -40,6 +41,7 @@ setdns: #1 set this host DNS abdns: #1 abort a transaction -$(GDNS) abort $(ZONE) +# Firewall Related rules{{{ help:: @$(TITL) "Cloud Firewall" @cat Makefile | \ @@ -67,5 +69,6 @@ updatefw: deleteFirewall createFirewall addfw: disabled oldranges = $(GETOLDRANGES) $(GCFWRULES) update $(FWNAME) --source-ranges=$(OLDRANGES) +# }}} # vim: set ft=make sw=4 tw=0 fdm=marker noet : -- GitLab From 5e487d395eb6099cae94391a4936a70383a08803 Mon Sep 17 00:00:00 2001 From: Hector Lecuanda Date: Thu, 6 Dec 2018 03:38:58 +0000 Subject: [PATCH 14/90] Correction on create fw --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index e013cd8..b6df102 100644 --- a/Makefile +++ b/Makefile @@ -53,7 +53,8 @@ whatismyip: #2 Show your current external IP @$(DOGETIP) createfw: #2 Creates a firewall for the current ip - $(GCFWRULES) create $(FWNAME) $(FWPARAMS) $(VMPARAMS) --source-ranges=$(MYIP) + $(GCFWRULES) create $(FWNAME) $(FWPARAMS) \ + $(VMPARAMS) $(FWRULES) --source-ranges=$(MYIP) listfw: #2 Lisrs the projects firewalls $(GCFWRULES) list -- GitLab From 01a1a70b07bbca066739ffeba69aa52b6e7f3072 Mon Sep 17 00:00:00 2001 From: Hector Lecuanda Date: Sun, 9 Dec 2018 01:15:50 +0000 Subject: [PATCH 15/90] shirtcuts --- Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index b6df102..eb9386b 100644 --- a/Makefile +++ b/Makefile @@ -49,8 +49,8 @@ help:: | sort whatismyip: #2 Show your current external IP - @$(TITL) "Current IP outside" - @$(DOGETIP) + @$(TITL) "Current IP outside " + @$(ECHO) $(MYIP) createfw: #2 Creates a firewall for the current ip $(GCFWRULES) create $(FWNAME) $(FWPARAMS) \ @@ -62,6 +62,10 @@ listfw: #2 Lisrs the projects firewalls describefw: #2 describes this firewall $(GCFWRULES) describe $(FWNAME) +rmfw: deletefw + +mkfw: createfw + deletefw: #2 deletes this firewall -$(GCFWRULES) delete $(FWNAME) -- GitLab From 61d5adf0e9c82c8a0c30eb4dd2c16e5d7b8d0e48 Mon Sep 17 00:00:00 2001 From: Hector Lecuanda Date: Sat, 2 Feb 2019 06:45:13 +0000 Subject: [PATCH 16/90] added aliases and a check for firewall name --- Makefile | 34 +++++++++++++++++------- mk | 79 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 104 insertions(+), 9 deletions(-) create mode 100644 mk diff --git a/Makefile b/Makefile index eb9386b..593af7b 100644 --- a/Makefile +++ b/Makefile @@ -21,6 +21,12 @@ GDNS = gcloud --project=$(DNSPROJ) dns record-sets transaction .PHONY: help createfw listfw describefw updatefw deletefw whatismyip +define ckenv = +ifndef FWNAME + $(error please define FWNAME) +endif +endef + help:: # Show this message:wq @figlet Makecloud @$(TITL) 'Cloud tasks automation ' @@ -48,32 +54,42 @@ help:: $(AWK) '/#2/ && !/AWK/ { gsub(/#2/,"-"); print $0 }' \ | sort +# Aliases {{{ +dsfw: describefw ; + +lsfw: listfw ; + +mkfw: createfw ; + +rmfw: deletefw ; + +upfw: updatefw ; +# }}} +# whatismyip: #2 Show your current external IP @$(TITL) "Current IP outside " @$(ECHO) $(MYIP) createfw: #2 Creates a firewall for the current ip + $(ckenv) $(GCFWRULES) create $(FWNAME) $(FWPARAMS) \ $(VMPARAMS) $(FWRULES) --source-ranges=$(MYIP) -listfw: #2 Lisrs the projects firewalls +listfw: #2 Lists the projects firewalls $(GCFWRULES) list describefw: #2 describes this firewall + $(ckname) $(GCFWRULES) describe $(FWNAME) -rmfw: deletefw - -mkfw: createfw - deletefw: #2 deletes this firewall + $(ckname) -$(GCFWRULES) delete $(FWNAME) -updatefw: deleteFirewall createFirewall +updatefw:: rmfw ; + +updatefw:: mkfw ; -addfw: disabled - oldranges = $(GETOLDRANGES) - $(GCFWRULES) update $(FWNAME) --source-ranges=$(OLDRANGES) # }}} # vim: set ft=make sw=4 tw=0 fdm=marker noet : diff --git a/mk b/mk new file mode 100644 index 0000000..68cf487 --- /dev/null +++ b/mk @@ -0,0 +1,79 @@ + +# Variables{{{ +AWK = gawk +DNSOPT = --type=A --ttl=300 +ECHO = print -P '%B %s %b' +FWRULES = --rules=tcp:22,tcp:631,udp:5353,udp:60000-61000 +GCFWRULES = gcloud compute firewall-rules +HOSTNAME != hostname +MYIP != curl -s https://mezaops.appspot.com/knock/ | jq .ip +SHELL = zsh +TITL = print -P '%F{blue}%s%f\n' +VMPARAMS = --direction=INGRESS --priority=850 --network=default +VMPARAMS += --action=ALLOW --target-tags=bastion +ZONE = --zone mcpaints-public# }}} + +OLDRANGES = $(GCFWRULES) describe $(FWNAME) --format=json +GETOLDRANGES = $(OLDRANGES)| jw .sourceRanges + +DNSPROJ = lecuanda-domain-management +GDNS = gcloud --project=$(DNSPROJ) dns record-sets transaction + +.PHONY: help createfw listfw describefw updatefw deletefw whatismyip + +help:: # Show this message:wq + @figlet Makecloud + @$(TITL) 'Cloud tasks automation ' + +help:: + @$(TITL) 'Cloud DNS Services' + @cat Makefile | \ + $(AWK) '/#1/ && !/AWK/ { gsub(/#1/,"-"); print $0 }' \ + | sort + +setdns: #1 set this host DNS + $(GDNS) start $(ZONE) + $(GDNS) remove --name=$(HOSTNAME) $(ZONE) $(DNSOPT) + $(GDNS) add --name=$(HOSTNAME) --data=$(MYIP) $(ZONE) + $(GDNS) describe $(ZONE) + $(GDNS) execute $(ZONE) + +abdns: #1 abort a transaction + -$(GDNS) abort $(ZONE) + +# Firewall Related rules{{{ +help:: + @$(TITL) "Cloud Firewall" + @cat Makefile | \ + $(AWK) '/#2/ && !/AWK/ { gsub(/#2/,"-"); print $0 }' \ + | sort + +whatismyip: #2 Show your current external IP + @$(TITL) "Current IP outside " + @$(ECHO) $(MYIP) + +createfw: #2 Creates a firewall for the current ip + $(GCFWRULES) create $(FWNAME) $(FWPARAMS) \ + $(VMPARAMS) $(FWRULES) --source-ranges=$(MYIP) + +listfw: #2 Lisrs the projects firewalls + $(GCFWRULES) list + +describefw: #2 describes this firewall + $(GCFWRULES) describe $(FWNAME) + +rmfw: deletefw + +mkfw: createfw + +deletefw: #2 deletes this firewall + -$(GCFWRULES) delete $(FWNAME) + +updatefw: deleteFirewall createFirewall + +addfw: disabled + oldranges = $(GETOLDRANGES) + $(GCFWRULES) update $(FWNAME) --source-ranges=$(OLDRANGES) +# }}} + +# vim: set ft=make sw=4 tw=0 fdm=marker noet : -- GitLab From b2305f6ec18b820fa38ccfdfdb2832ff7b0889fe Mon Sep 17 00:00:00 2001 From: Hector Date: Sat, 2 Feb 2019 19:14:40 -0800 Subject: [PATCH 17/90] Stray file --- numeric-chmod-table.zsh => bin.d/numeric-chmod-table.zsh | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename numeric-chmod-table.zsh => bin.d/numeric-chmod-table.zsh (100%) diff --git a/numeric-chmod-table.zsh b/bin.d/numeric-chmod-table.zsh similarity index 100% rename from numeric-chmod-table.zsh rename to bin.d/numeric-chmod-table.zsh -- GitLab From cfcbc77139eae19a19152f38ba1b696cfce641af Mon Sep 17 00:00:00 2001 From: Hector Date: Sun, 3 Feb 2019 07:49:40 -0800 Subject: [PATCH 18/90] Uodated plugins, added YCPM removed neosniopets --- vim.d/vimrc.before.local | 6 +++--- vim.d/vimrc.bundles.local | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/vim.d/vimrc.before.local b/vim.d/vimrc.before.local index d18d89c..bf8671a 100644 --- a/vim.d/vimrc.before.local +++ b/vim.d/vimrc.before.local @@ -22,7 +22,7 @@ " Disable easier moving in tabs and windows " let g:spf13_no_easyWindows = 1 - + " Disable Restore Cursor: let g:spf13_no_restore_cursor =1 " @@ -99,8 +99,8 @@ finish endif " list only the plugin groups you will use { - let g:spf13_bundle_groups=[ 'general', 'writing', 'programming', 'neocomplete', 'python', 'javascript', 'html', 'ruby', 'misc' ] - " let g:spf13_bundle_groups=[ 'general', 'writing', 'programming', 'youcompleteme', 'python', 'javascript', 'html', 'ruby', 'puppet', 'misc' ] + " let g:spf13_bundle_groups=[ 'general', 'writing', 'programming', 'neocomplete', 'python', 'javascript', 'html', 'ruby', 'misc' ] + let g:spf13_bundle_groups=[ 'general', 'writing', 'programming', 'youcompleteme', 'python', 'javascript', 'html', 'ruby', 'misc' ] let g:vundle_default_git_proto = 'git' " UnBundle 'wting/rust.vim' " UnBundle 'cespare/vim-toml' diff --git a/vim.d/vimrc.bundles.local b/vim.d/vimrc.bundles.local index c930edb..537d309 100644 --- a/vim.d/vimrc.bundles.local +++ b/vim.d/vimrc.bundles.local @@ -38,6 +38,7 @@ " Plugin 'django.vim' Plugin 'PotatoesMaster/i3-vim-syntax' " Plugin 'guns/xterm-color-table.vim' + Plugin 'wmvanvliet/jupyter-vim' " Plugin 'hlecuanda/tmux.vim' " Plugin 'powerman/vim-plugin-viewdoc' " Plugin 'sjl/vitality.vim' -- GitLab From e0f23299995ca2d8a119a834018a2742a19cf23d Mon Sep 17 00:00:00 2001 From: Hector Date: Sun, 3 Feb 2019 18:31:55 -0800 Subject: [PATCH 19/90] pythin now createa its user site --- python.d/.gitignore | 1 + python.d/Makefile | 27 +++++++++++++++++---------- 2 files changed, 18 insertions(+), 10 deletions(-) create mode 100644 python.d/.gitignore diff --git a/python.d/.gitignore b/python.d/.gitignore new file mode 100644 index 0000000..9ca8e45 --- /dev/null +++ b/python.d/.gitignore @@ -0,0 +1 @@ +user-site diff --git a/python.d/Makefile b/python.d/Makefile index 2a1b118..833274d 100644 --- a/python.d/Makefile +++ b/python.d/Makefile @@ -1,14 +1,21 @@ -PIP= pip install --upgrade -PIP2= pip2 install --upgrade +PIP = pip install --upgrade +PIP2 := pip2 install --upgrade +USERSITE := $(ZDOTDIR)/python.d/usersite +VERSIONS = 3.6 2.7 +USERSITES := $(foreach ver,$(VERSIONS),$(addsuffix /$(ver),$(USERSITE))) +ZSHRC = $(ZDOTDIR)/.zshrc +FILESIGIe = '/^# AUTO python version/ /^# AUTO / { print $$(VERSIONVAR) } ' +.PHONY: install usersites addvar -.PHONY: install pip packages +install: -install: - pkg install python2 - $(PIP) pip - $(PIP2) pip - $(PIP) -r requirements.txt - $(PIP2) -r requirements2.txt - +usersites: $(USERSITES) ; +addvar: + cat $(ZSHRC) | awk '$(FILESIGIL) { print "something" } ' + + + +$(USERSITES): + mkdir $@ -- GitLab From 9e86006bfaad29313d60f99dc836c9a348045b75 Mon Sep 17 00:00:00 2001 From: Hector Date: Sun, 3 Feb 2019 18:53:25 -0800 Subject: [PATCH 20/90] correctly creates vars --- python.d/.gitignore | 1 + python.d/Makefile | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/python.d/.gitignore b/python.d/.gitignore index 9ca8e45..9bb9797 100644 --- a/python.d/.gitignore +++ b/python.d/.gitignore @@ -1 +1,2 @@ user-site +.chgversion diff --git a/python.d/Makefile b/python.d/Makefile index 833274d..e31083e 100644 --- a/python.d/Makefile +++ b/python.d/Makefile @@ -5,17 +5,24 @@ VERSIONS = 3.6 2.7 USERSITES := $(foreach ver,$(VERSIONS),$(addsuffix /$(ver),$(USERSITE))) ZSHRC = $(ZDOTDIR)/.zshrc FILESIGIe = '/^# AUTO python version/ /^# AUTO / { print $$(VERSIONVAR) } ' +VER =3.6: -.PHONY: install usersites addvar +.PHONY: install usersites addvar versionlink install: usersites: $(USERSITES) ; +versionlink: $(HOME)/bin/python + addvar: cat $(ZSHRC) | awk '$(FILESIGIL) { print "something" } ' +$(HOME)/bin/python: .chgversion + [[ -s $@ ]] && rm $@ + ln -s $(PREFIX)/python$(VER) $@ +.chgversion: ; $(USERSITES): mkdir $@ -- GitLab From 47d4d6410657945b26eb82178352fcfacc6b5ab6 Mon Sep 17 00:00:00 2001 From: Hector Date: Mon, 4 Feb 2019 16:16:06 -0800 Subject: [PATCH 21/90] merged stasged --- zsh.d/zpreztorc.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zsh.d/zpreztorc.zsh b/zsh.d/zpreztorc.zsh index 0d57600..6042800 100644 --- a/zsh.d/zpreztorc.zsh +++ b/zsh.d/zpreztorc.zsh @@ -65,6 +65,6 @@ zstyle ':prezto:load' pmodule 'helper' 'spectrum' 'prompt' 'UserPrefs' \ # zstyle ':prezto:module:terminal:window-title' format '%n@%m: %s' # Set the window title format. # zstyle ':prezto:module:tmux:auto-start' local 'yes' # Auto start a session when Zsh is launched in a local terminal. zstyle ':prezto:module:tmux:auto-start' remote 'no' # Auto start a session when Zsh is launched in a SSH connection. - zstyle ':prezto:module:tmux:iterm' integrate 'no' # Integrate with iTerm2. - # zstyle ':prezto:module:tmux:session' name 'H-Lo' # Set the default session name: + # zstyle ':prezto:module:tmux:iterm' integrate 'yes' # Integrate with iTerm2. + zstyle ':prezto:module:tmux:session' name 'raspi' # Set the default session name: # }}} -- GitLab From fb8dc513631bff93bb0da15c1ed6a782febde2d9 Mon Sep 17 00:00:00 2001 From: Hector Date: Mon, 4 Feb 2019 18:22:33 -0800 Subject: [PATCH 22/90] stashes --- local.d/UserPrefs/functions/fortune | 27 --------------------------- zsh.d/zprofile.zsh | 14 +++++++------- 2 files changed, 7 insertions(+), 34 deletions(-) delete mode 100755 local.d/UserPrefs/functions/fortune diff --git a/local.d/UserPrefs/functions/fortune b/local.d/UserPrefs/functions/fortune deleted file mode 100755 index cc07bc8..0000000 --- a/local.d/UserPrefs/functions/fortune +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env zsh -# __ _ -# / _| ___ _ __| |_ _ _ _ __ ___ -# | |_ / _ \| '__| __| | | | '_ \ / _ \ -# | _| (_) | | | |_| |_| | | | | __/ -# |_| \___/|_| \__|\__,_|_| |_|\___| -# -# h@h-lo.me 20180214 005157 -0800 PST 1518598317 d(-_- )b... -# -# a wrapper for the fortune command, it just adds some -# padding around so it looks nicer. Might add syntax highlighting -# -typeset -a le_fortune -typeset -i curline=0 -for line in $(command fortune "${@}" ) - le_fortune += ( $line ) -printf "\n\n" -for line in $le_fortune - if (( $curline == $#le_fortune )); then - print -P "%F{$paint} $line%f" - else - printf " %s\n" $line - fi - (( curline+= 1 )) - printf "\n\n" -# -# vim: set ft=zsh sw=2 tw=0 fdm=manual et : diff --git a/zsh.d/zprofile.zsh b/zsh.d/zprofile.zsh index 023054c..571bbcc 100644 --- a/zsh.d/zprofile.zsh +++ b/zsh.d/zprofile.zsh @@ -53,13 +53,13 @@ cdpath=( # ~/anaconda3/lib/python3.6/site-packages # makes dirs in cdpath callable as ~dir -for dir in $cdpath - if [[ -d ${dir} ]]; then - typeset "${dir:t}"="${dir}" 2>&1 >/dev/null - else - #TODO: find a better way to determine unused var - typeset "${dir:t}2"="${dir}" - fi +# for dir in $cdpath +# if [[ -d ${dir} ]]; then +# "${dir:t}"="${dir}" 2>&1 >/dev/null +# else +# #TODO: find a better way to determine unused var +# "${dir:t}2"="${dir}" +# fi typeset zconf=${ZDOTDIR:-$HOME} -- GitLab From c7beeed9d1f55453524b84876f6b4fcc20f0ea87 Mon Sep 17 00:00:00 2001 From: Hector Date: Mon, 4 Feb 2019 21:31:24 -0800 Subject: [PATCH 23/90] solved merge conflivt --- Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/Makefile b/Makefile index 3ad7fbc..d112622 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,3 @@ -# vim: number : ifeq ($(shell uname -s),FreeBSD) INSTALL=install -c -- GitLab From 46a80fdda79309958f53832f8da4cfdbc71e8859 Mon Sep 17 00:00:00 2001 From: Hector Date: Wed, 6 Feb 2019 10:42:28 +0000 Subject: [PATCH 24/90] Proper os detection and gcp sourcing --- source.d/git-flow-completion.zsh | 1 - source.d/google-cloud-sdk.zsh | 13 ++++++------ zsh.d/zprofile.zsh | 7 ++++--- zsh.d/zshenv | 35 +++++++++++++++++++++++++------- 4 files changed, 38 insertions(+), 18 deletions(-) delete mode 120000 source.d/git-flow-completion.zsh diff --git a/source.d/git-flow-completion.zsh b/source.d/git-flow-completion.zsh deleted file mode 120000 index efe85c7..0000000 --- a/source.d/git-flow-completion.zsh +++ /dev/null @@ -1 +0,0 @@ -/usr/share/git-flow/git-flow-completion.zsh \ No newline at end of file diff --git a/source.d/google-cloud-sdk.zsh b/source.d/google-cloud-sdk.zsh index 0fb8e4f..ccc66dd 100644 --- a/source.d/google-cloud-sdk.zsh +++ b/source.d/google-cloud-sdk.zsh @@ -1,13 +1,12 @@ # The next line updates PATH for the Google Cloud SDK. -# it ahiukd bebsourced by zprofile for non interactive -# scripts sill pick up rhw path -# if [ -f /home/hector/google-cloud-sdk/path.zsh.inc ]; then -# source '/home/hector/google-cloud-sdk/path.zsh.inc' +# it should be sourced by zprofile for non interactive +# scripts +# if [ -f ${GCPSDK}/path.zsh.inc ]; then +# source ${GCPSDK}/path.zsh.inc # fi # The next line enables shell command completion for gcloud. -if [ -f /home/hector/google-cloud-sdk/completion.zsh.inc ]; then - source '/home/hector/google-cloud-sdk/completion.zsh.inc' -fi +[[ -f ${GCPSDK}/completion.zsh.inc ]] && \ + source "${GCPSDK}completion.zsh.inc" diff --git a/zsh.d/zprofile.zsh b/zsh.d/zprofile.zsh index 1a35278..0731241 100644 --- a/zsh.d/zprofile.zsh +++ b/zsh.d/zprofile.zsh @@ -6,11 +6,13 @@ # Sorin Ionescu # Browser -[[ "$OSTYPE" == darwin* ]] && export BROWSER='open' +[[ $mac ]] && export BROWSER='open' +[[ $linux ]] && export BROWSER='xdg-open-url' +[[ $termux ]] && export BROWSER='termux-open-url' #TODO: OS detection from .zshenv # Editors -[[ $+DISPLAY -ne 0 ]] && export EDITOR='gvim' || export EDITOR='vim' +export EDITOR='vim' export VISUAL=$EDITOR export PAGER='less' @@ -37,7 +39,6 @@ typeset zconf=${ZDOTDIR:-$HOME} #add gcp path definitions to normal path [[ -s "${GCPSDK}/path.inc.zsh" ]] && source ${GCPSDK}/path.inc.zsh -unset gp # Set the list of directories that Zsh searches for programs. path=( diff --git a/zsh.d/zshenv b/zsh.d/zshenv index c7c6b06..bb90142 100644 --- a/zsh.d/zshenv +++ b/zsh.d/zshenv @@ -14,19 +14,40 @@ [[ -z ${ZDOTDIR} ]] && typeset -x ZDOTDIR=$HOME/.zconf -if [[ -d /data/data/com.termux ]] ; then - # were in termuxland - typeset -x TZ=$(getprop persist.timezone) +typeset os=$(uname -o) + +case os in + FreeBSD) + typeset freebsd=true ;; + Linux) + typeset linux=true ;; + Darwin) + typeset mac=true ;; + Android) + typeset termux=true ;; + * ) + false ;; +esac + +[[ $termux ]] && { + typeset -x TZ=$(getprop persist.sys.timezone) typeset -x TERMUXPREFIX=/data/data/com.termux/files/usr - #TODO: make this platform independent typeset -x GCPSDK=$TERMUXPREFIX/google-cloud-sdk typeset -x USRLOCAL=$TERMUXPREFIX/local -else +} + +[[ $freebsd || $mac ]] && { typeset -x USRLOCAL=/usr/local - typeset -x TZ="/usr/share/zoneinfo/America/Tijuana" -fi + typeset -x GCPSDK=$USRLOCAL/google-cloud-sdk +} +[[ $linux ]] && { + typeset -x USRLOCAL=/usr/local + typeset -x GCPSDK=/opt/google-cloud-sdk + typeset -x TZ="/usr/share/zoneinfo/America/Tijuana" +} #bypasses system configs, full of nonsense + unsetopt global_rcs # Ensure that a non-login, non-interactive shell has a defined environment. -- GitLab From c2f16bd17f0a646e02edf0b47db967405db8ec63 Mon Sep 17 00:00:00 2001 From: Hector Date: Wed, 6 Feb 2019 10:49:14 +0000 Subject: [PATCH 25/90] Stray error on Makefile --- zsh.d/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/zsh.d/Makefile b/zsh.d/Makefile index dfc1beb..f237766 100644 --- a/zsh.d/Makefile +++ b/zsh.d/Makefile @@ -13,18 +13,18 @@ LIVE := $(addprefix $(ZDOTDIR)/.,$(RC)) .SUFFIXES: -.PHONY: install zshenv zdotdir +.PHONY: install hzshenv zdotdir install: zshenv zdotdir $(LIVE) -zshenv: $(HOME)/.zshenv +hzshenv: ~/.zshenv zdotdir: $(ZDOTDIR)/.zprezto $(LIVE): $(ZDOTDIR)/.%: %.zsh $(INSTALL_DATA) $*.zsh $@ -$(HOME)/.zshenv: +~/.zshenv: zshenv $(INSTALL_DATA) $< $@ $(ZDOTDIR)/.zprezto: | $(ZDOTDIR) -- GitLab From 5a65b38af7f2aefe168bec6d7faba029f7807bfd Mon Sep 17 00:00:00 2001 From: Hector Date: Wed, 6 Feb 2019 02:57:42 -0800 Subject: [PATCH 26/90] added gitflow to tig --- git.d/git-flow.tigrc | 49 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 git.d/git-flow.tigrc diff --git a/git.d/git-flow.tigrc b/git.d/git-flow.tigrc new file mode 100644 index 0000000..d276acd --- /dev/null +++ b/git.d/git-flow.tigrc @@ -0,0 +1,49 @@ +# Bindings for git-flow. +# +# Flow bindings start with the capital F and then follow the first character of +# each operation. If executed from the refs view, the operations (that make +# sense to) work on the selected branch. Otherwise, they work on the currently +# checked out branch. +# +# Commands that finish a flow require confirmation to run. Commands that create +# a new flow prompt for user input and run when that input is accepted with no +# confirmation prompt. +# +# Note: Bindings assume the standard git-flow paths of feature, release, hotfix +# and support. +# +# To use these keybindings copy the file to your HOME directory and include it +# from your ~/.tigrc file: +# +# $ cp contrib/git-flow.tigrc ~/.tigrc.git-flow +# $ echo "source ~/.tigrc.git-flow" >> ~/.tigrc + +# Get rid of default bindings for F, as that will be the entry point for all +# git-flow related commands with this binding. +bind main F none +bind generic F none + +# General +bind generic Fi ?git flow init + +# Feature +bind generic Ffl !git flow feature +bind generic Ffs !git flow feature start "%(prompt New feature name: )" +bind generic Fff ?sh -c "git flow feature finish `echo %(repo:head) | sed -e s/feature.//`" +bind refs Fff ?sh -c "git flow feature finish `echo %(branch) | sed -e s/feature.//`" + +# Release +bind generic Frl !git flow release +bind generic Frs !git flow release start "%(prompt New release name: )" +bind generic Frf ?sh -c "git flow release finish `echo %(repo:head) | sed -e s/release.//`" +bind refs Frf ?sh -c "git flow release finish `echo %(branch) | sed -e s/release.//`" + +# Hot Fix +bind generic Fhl !git flow hotfix +bind generic Fhs !git flow hotfix start "%(prompt New hotfix name: )" +bind generic Fhf ?sh -c "git flow hotfix finish `echo %(repo:head) | sed -e s/hotfix.//`" +bind refs Fhf ?sh -c "git flow hotfix finish `echo %(branch) | sed -e s/hotfix.//`" + +# Support +bind generic Fsl !git flow support +bind refs Fss !git flow support start "%(prompt New support name: )" %(branch) -- GitLab From aad121da6d35cc88bd8b5fc2741b465824485324 Mon Sep 17 00:00:00 2001 From: Hector Lecuanda Date: Sun, 31 Mar 2019 21:42:05 +0000 Subject: [PATCH 27/90] removed var conditional not working properly --- Makefile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 593af7b..ad4caad 100644 --- a/Makefile +++ b/Makefile @@ -21,11 +21,11 @@ GDNS = gcloud --project=$(DNSPROJ) dns record-sets transaction .PHONY: help createfw listfw describefw updatefw deletefw whatismyip -define ckenv = -ifndef FWNAME - $(error please define FWNAME) -endif -endef +# define ckname = +# ifndef FWNAME +# $(error please define FWNAME) +# endif +# endef help:: # Show this message:wq @figlet Makecloud @@ -71,7 +71,7 @@ whatismyip: #2 Show your current external IP @$(ECHO) $(MYIP) createfw: #2 Creates a firewall for the current ip - $(ckenv) + $(ckname) $(GCFWRULES) create $(FWNAME) $(FWPARAMS) \ $(VMPARAMS) $(FWRULES) --source-ranges=$(MYIP) -- GitLab From a2e51333818f1745bd79a48594a3ed0a94e4b0e5 Mon Sep 17 00:00:00 2001 From: Hector Date: Sun, 31 Mar 2019 19:21:56 -0700 Subject: [PATCH 28/90] local changes to be exported --- .gitignore | 1 + i3.d/Makefile | 3 ++- x11.d/Makefile | 3 +++ x11.d/Rofi | 50 +++++++++++++------------------------------------- 4 files changed, 19 insertions(+), 38 deletions(-) diff --git a/.gitignore b/.gitignore index 3f34311..36adf93 100644 --- a/.gitignore +++ b/.gitignore @@ -13,6 +13,7 @@ .zpreztorc .zprofile .zshrc +Xresources-e awkprof.out buildlog example* diff --git a/i3.d/Makefile b/i3.d/Makefile index 9c19192..70c9987 100644 --- a/i3.d/Makefile +++ b/i3.d/Makefile @@ -1,4 +1,5 @@ - +INSTALL = install +INSTALL_DATA = $(INSTALL) -m 644 I3CONFIG_DIR = $(HOME)/.config/i3 I3CONFIG = $(I3CONFIG_DIR)/config I3STATUS_DIR = $(HOME)/.config/i3status diff --git a/x11.d/Makefile b/x11.d/Makefile index 0b4a987..46e3a8f 100644 --- a/x11.d/Makefile +++ b/x11.d/Makefile @@ -12,6 +12,9 @@ SET_MODELINE = echo $(MODELINE) >> $@ XTERM_RSC_FIL = XTerm XTerm-color UXTerm UXTerm-color XTERM_RSC_SRC := $(addprefix /etc/X11/app-defaults/,$(XTERM_RSC_FIL)) +INSTALL = install +INSTALL_DATA = $(INSTALL) -m 644 + define fileheader = [[ -f $@ ]] && rm -fv $@ || true figlet $@ |tr \ . | while read -r line; do echo "!// $${line}"; done > $@ diff --git a/x11.d/Rofi b/x11.d/Rofi index 54af207..e082830 100644 --- a/x11.d/Rofi +++ b/x11.d/Rofi @@ -1,24 +1,11 @@ -! ------------------------------------------------------------------------------ -! ROFI Color theme -! User: Rasi -! Copyright: Rasmus Steinke -! ------------------------------------------------------------------------------ ! rofi/*{{{*/ -! ============================================================ -! __ _ -! _ __ ___ / _(_) -! | __/ _ \| |_| | -! | | | (_) | _| | -! |_| \___/|_| |_| -! ============================================================ - ! Enabled modi -rofi.modi: window,run,ssh +rofi.modi: window,run,ssh,drun ! rofi.opacity: 100 -! rofi.width: 50 -rofi.lines: 10 +rofi.width: -25 +rofi.lines: 7 rofi.columns: 1 -rofi.font: Monoisome +rofi.font: Monoid 10 ! rofi.fg: S_base0 ! rofi.bg: S_base03 ! rofi.fg-active: S_blue @@ -44,15 +31,18 @@ rofi.bc: #000000 ! rofi.color-enabled: false ! ! Color scheme for normal row rofi.color-enabled: true -rofi.color-window: #002b37, #002b37, #003642 +! bg bor sep +rofi.color-window: #003643, #000000, #000000 +! rofi.color-window: #002b37, #002b37, #003642 +! bg fg bgalt hlbg hlfg rofi.color-normal: #002b37, #819396, #003643, #008ed4, #ffffff rofi.color-active: #002b37, #008ed4, #003643, #008ed4, #66c6ff rofi.color-urgent: #002b37, #da4281, #003643, #008ed4, #890661 ! ! Border width -! rofi.bw: 2 +rofi.bw: 2 ! ! Location on screen ! rofi.location: 0 -! rofi.padding: 5 +rofi.padding: 10 ! rofi.yoffset: 0 ! rofi.xoffset: 0 ! rofi.fixed-num-lines: false @@ -89,33 +79,19 @@ rofi.parse-known-hosts: true ! ! Pre-set filter ! rofi.filter: ! ! Separator style (none, dash, solid) -rofi.separator-style: dash +rofi.separator-style: solid rofi.hide-scrollbar: true +rofi.show-icons: true ! rofi.markup-rows: false ! rofi.fullscreen: false ! rofi.fake-transparency: false ! rofi.dpi: -1 ! rofi.pid: /run/user/1002/rofi.pid /*}}}*/ - !Rofi keybindings /*{{{*/ -! ============================================================ -! __ _ -! _ __ ___ / _(_) -! | __/ _ \| |_| | -! | | | (_) | _| | -! |_| \___/|_| |_| - -! _ _ _ _ _ -! | | _____ _ _| |__ (_)_ __ __| (_)_ __ __ _ ___ -! | |/ / _ \ | | | _ \| | _ \ / _` | | _ \ / _` / __| -! | < __/ |_| | |_) | | | | | (_| | | | | | (_| \__ \ -! |_|\_\___|\__, |_.__/|_|_| |_|\__,_|_|_| |_|\__, |___/ -! |___/ |___/ -! ============================================================ rofi.kb-primary-paste: Control+Shift+v,Shift+Insert rofi.kb-secondary-paste: Control+v,Insert -rofi.kb-clear-line: Control+u +! rofi.kb-clear-line: Control+u rofi.kb-move-front: Control+a rofi.kb-move-end: Control+e rofi.kb-move-word-back: Alt+b -- GitLab From d9dbd0654e975dbc8774cee582ce0abb7fc522ed Mon Sep 17 00:00:00 2001 From: Hector Date: Sun, 31 Mar 2019 19:42:02 -0700 Subject: [PATCH 29/90] x11 and i3 config update --- Makefile | 18 +++++++++++------- i3.d/Makefile | 7 +++++++ i3.d/i3.config | 30 +++++++++++++++--------------- x11.d/Makefile | 8 ++++++++ x11.d/Rofi | 4 ++-- 5 files changed, 43 insertions(+), 24 deletions(-) diff --git a/Makefile b/Makefile index d112622..daffc3c 100644 --- a/Makefile +++ b/Makefile @@ -16,7 +16,7 @@ export INSTALL INSTALL_PROG INSTALL_DATA export SHELL -.PHONY: all update upgrade +.PHONY: all update upgrade $(DIRS) .SUFFIXES= all: ; @@ -32,15 +32,19 @@ clean: for d in $(addsuffix .d,$(DIRS))\ $(MAKE) -C $$d clean -ifdef MAKECMDGOALS +$(DIRS): % : %.d + $(MAKE) -C $*.d -.PHONY: $(MAKECMDGOALS) -$(MAKECMDGOALS): - for d in $(addsuffix .d,$(DIRS)) ;\ - $(MAKE) $(MFLAGS) -C $$d $(MAKECMDGOALS) +# ifdef MAKECMDGOALS -endif +# .PHONY: $(MAKECMDGOALS) + +# $(MAKECMDGOALS): +# for d in $(addsuffix .d,$(DIRS)) ;\ +# $(MAKE) $(MFLAGS) -C $$d $(MAKECMDGOALS) + +# endif # vim: set ft=make sw=4 tw=0 fdm=manual noet : diff --git a/i3.d/Makefile b/i3.d/Makefile index 9c19192..4bf932f 100644 --- a/i3.d/Makefile +++ b/i3.d/Makefile @@ -1,4 +1,11 @@ +ifeq ($(shell uname -s),FreeBSD) +INSTALL=install -c +else +INSTALL=install -T +endif +INSTALL_DATA=$(INSTALL) -m 644 +INSTALL_PROG=$(INSTALL) -m 754 I3CONFIG_DIR = $(HOME)/.config/i3 I3CONFIG = $(I3CONFIG_DIR)/config I3STATUS_DIR = $(HOME)/.config/i3status diff --git a/i3.d/i3.config b/i3.d/i3.config index 8635281..9c376a9 100644 --- a/i3.d/i3.config +++ b/i3.d/i3.config @@ -14,7 +14,7 @@ # Please see http://i3wm.org/docs/userguide.html for a complete reference! #Global -# Modifiers +# Modifiers set $mod Mod4 set $hft Shift set $ctl Control @@ -62,8 +62,8 @@ for_window [class="Google-chrome"] border none for_window [class="MotionPro"] floating enable for_window [class="Shotwell"] border none for_window [class="^.creenkey"] floating enable -for_window [class="^URxvt"] border pixel $BORDER_FAT -for_window [class="^UXTerm"] border pixel $BORDER_FAT +for_window [class="^URxvt"] border pixel $BORDER_FAT +for_window [class="^UXTerm"] border pixel $BORDER_FAT for_window [class="^Xkb"] floating enable for_window [class="^Xkbv"] floating enable, border none , resize set 148 20 , move position 660 0 for_window [class="^Xmag"] floating enable, border normal $BORDER_FAT , resize set 400 400 , move position 635 32 @@ -71,7 +71,7 @@ for_window [title="^xzoom"] floating enable, border pixel $BORDER_FAT for_window [class="^feh"] floating enable, border pixel $BORDER_FAT , resize set 638 465 , move position 635 32 for_window [class="^vlc$"] floating enable, border pixel $BORDER_SKINNY, resize set s40 480 , move absolute 0, 0 for_window [class="^xterm"] border pixel $BORDER_FAT -for_window [class="rofi"] border pixel +for_window [class="rofi"] border pixel $BORDER_FAT for_window [title="^Event Tester"] floating enable for_window [title="^xfontsel"] floating enable for_window [window_role="pop-up"] floating enable, border pixel $BORDER_SKINNY @@ -136,7 +136,7 @@ bindsym $mod+ Tab workspace next bindsym $mod+$hft+Tab workspace prev bindsym $mod+ Return fullscreen toggle -bindsym $mod+ Return fullscreen toggle +bindsym $mod+ Escape fullscreen toggle #} # shifted modes @@ -188,7 +188,7 @@ mode command { # bindsym Escape mode default # bindsym Return mode default -# } +# } mode config { bindsym b exec $BARCONFIGV , mode default @@ -225,15 +225,15 @@ mode border { bindsym Tab move container to workspace next , mode default bindsym $hft+Tab move container to workspace prev , mode default - bindsym 1 move container to workspace 1 , mode default - bindsym 2 move container to workspace 2 , mode default - bindsym 3 move container to workspace 3 , mode default - bindsym 4 move container to workspace 4 , mode default - bindsym 5 move container to workspace 5 , mode default - bindsym 6 move container to workspace 6 , mode default - bindsym 7 move container to workspace 7 , mode default - bindsym 8 move container to workspace 8 , mode default - bindsym 9 move container to workspace 9 , mode default + bindsym 1 move container to workspace 1, mode default + bindsym 2 move container to workspace 2, mode default + bindsym 3 move container to workspace 3, mode default + bindsym 4 move container to workspace 4, mode default + bindsym 5 move container to workspace 5, mode default + bindsym 6 move container to workspace 6, mode default + bindsym 7 move container to workspace 7, mode default + bindsym 8 move container to workspace 8, mode default + bindsym 9 move container to workspace 9, mode default bindsym Up focus up bindsym Down focus down diff --git a/x11.d/Makefile b/x11.d/Makefile index 0b4a987..70cdd8b 100644 --- a/x11.d/Makefile +++ b/x11.d/Makefile @@ -1,5 +1,13 @@ SHELL = zsh +ifeq ($(shell uname -s),FreeBSD) +INSTALL=install -c +else +INSTALL=install -T +endif +INSTALL_DATA=$(INSTALL) -m 644 +INSTALL_PROG=$(INSTALL) -m 754 + DATE != date +%Y%m%d-%H%M%S DIFF = p4merge VNCFILES = startx tigervnc config diff --git a/x11.d/Rofi b/x11.d/Rofi index 54af207..d5e119a 100644 --- a/x11.d/Rofi +++ b/x11.d/Rofi @@ -18,7 +18,7 @@ rofi.modi: window,run,ssh ! rofi.width: 50 rofi.lines: 10 rofi.columns: 1 -rofi.font: Monoisome +rofi.font: Monoisome 10 ! rofi.fg: S_base0 ! rofi.bg: S_base03 ! rofi.fg-active: S_blue @@ -49,7 +49,7 @@ rofi.color-normal: #002b37, #819396, #003643, #008ed4, #ffffff rofi.color-active: #002b37, #008ed4, #003643, #008ed4, #66c6ff rofi.color-urgent: #002b37, #da4281, #003643, #008ed4, #890661 ! ! Border width -! rofi.bw: 2 +rofi.bw: 2 ! ! Location on screen ! rofi.location: 0 ! rofi.padding: 5 -- GitLab From 2dc8106ec46c6fd37bbcbf6d23eb6b9fb976cdcd Mon Sep 17 00:00:00 2001 From: Hector Date: Sun, 31 Mar 2019 19:42:59 -0700 Subject: [PATCH 30/90] added startpy function --- local.d/UserPrefs/functions/pystart | 1 + local.d/UserPrefs/functions/startpy | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 120000 local.d/UserPrefs/functions/pystart create mode 100644 local.d/UserPrefs/functions/startpy diff --git a/local.d/UserPrefs/functions/pystart b/local.d/UserPrefs/functions/pystart new file mode 120000 index 0000000..acc9c2a --- /dev/null +++ b/local.d/UserPrefs/functions/pystart @@ -0,0 +1 @@ +startpy \ No newline at end of file diff --git a/local.d/UserPrefs/functions/startpy b/local.d/UserPrefs/functions/startpy new file mode 100644 index 0000000..f6c462d --- /dev/null +++ b/local.d/UserPrefs/functions/startpy @@ -0,0 +1,15 @@ +#!/usr/bin/env zsh + +#shamelessly stolen from +# https://gitlab.com/alfiedotwtf/mangosteen/blob/d39e3cdc57970d89987fd4484524259c7eb351ba/pythonify/pythonify.source + +which virtualenv || sudo apt install -y virtualenv +[[ -z pythonify/bin/activate ]] || virtualenv -p $(which python3) pythonify +source pythonify/bin/activate + +pip3 inatall pip --upgrade +pip3 install autopep8 + +# grep autopep8 ~/.vimrc || echo "au FileType python setlocal formatprg=autopep8\ -" >> ~/.vimrc + +# vim: set ft=zsh sw=4 tw=0 fdm=manual et : -- GitLab From ec65b14770cda0534326b8b03606ba5cb626314c Mon Sep 17 00:00:00 2001 From: Hector Lecuanda Date: Tue, 2 Apr 2019 05:24:06 +0000 Subject: [PATCH 31/90] simplified prompt for cloudshell usage --- zsh.d/zlogin.zsh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/zsh.d/zlogin.zsh b/zsh.d/zlogin.zsh index 4a755bf..0e3d504 100644 --- a/zsh.d/zlogin.zsh +++ b/zsh.d/zlogin.zsh @@ -30,10 +30,13 @@ unset LC_ALL export LC_COLLATE=C # Print a random, hopefully interesting, adage. {{{ - (( $+commands[fortune] )) && unfunction fortune ; fortune -a + # (( $+commands[fortune] )) && unfunction fortune ; fortune -a (( $+commands[grc] )) && unalias grc (( $+commands[thefuck] )) && eval $(thefuck --alias) (( $+commands[tig] )) && typeset -x TIGRC_USER=~/.zconf/git.d/tigrc + [[ -e "${ZDOTDIR:-$HOME}/.cloudshell" ]] && \ + set PS1=%F{4}${_prompt_sorin_pwd}%(!. %B%F{1}#%f%b.)${editor_info[keymap]} + # }}} # {{{ debugging control [[ -f "${HOME}/.debug" ]] && { -- GitLab From f57344d0b112c62b9b5ed68cdabe1876e1c3a0ff Mon Sep 17 00:00:00 2001 From: Hector Lecuanda Date: Tue, 2 Apr 2019 06:44:38 +0000 Subject: [PATCH 32/90] simple bootstraper --- bootstrap.d/debian.sh | 10 +++++++++ zbs.sh => bootstrap.d/termux.sh | 0 zconf-install.sh | 36 +++++++++++++++++++++++++++++++++ 3 files changed, 46 insertions(+) create mode 100644 bootstrap.d/debian.sh rename zbs.sh => bootstrap.d/termux.sh (100%) create mode 100644 zconf-install.sh diff --git a/bootstrap.d/debian.sh b/bootstrap.d/debian.sh new file mode 100644 index 0000000..b3ea64d --- /dev/null +++ b/bootstrap.d/debian.sh @@ -0,0 +1,10 @@ +sudo apt install -y git tig zsh tmux jq figlet mosh pwgen +git clone git@gitlab.com:hlecuanda/zconf.git .zconf +git clone --recursive git@github.com:sorin-ionescu/prezto.git .zconf/.zprezto +make -C .zconf/zsh.d install +make -C .zconf/vim.d install +make -C .zconf/tmux.d install +make -C .zconf/bin.d install +exec zsh -l + + diff --git a/zbs.sh b/bootstrap.d/termux.sh similarity index 100% rename from zbs.sh rename to bootstrap.d/termux.sh diff --git a/zconf-install.sh b/zconf-install.sh new file mode 100644 index 0000000..40dff4b --- /dev/null +++ b/zconf-install.sh @@ -0,0 +1,36 @@ +!#/usr/bin/env bash +# __ +# _______ ___ _ __ / _| +# |_ / __/ _ \| '_ \| |_ +# / / (_| (_) | | | | _| +# /___\___\___/|_| |_|_| +# _ _ _ +# | |__ ___ ___ | |_ ___| |_ _ __ __ _ _ __ +# | '_ \ / _ \ / _ \| __/ __| __| '__/ _` | '_ \ +# | |_) | (_) | (_) | |_\__ \ |_| | | (_| | |_) | +# |_.__/ \___/ \___/ \__|___/\__|_| \__,_| .__/ +# |_| +# h@hlo.mx 20190402 064020 +0000 GMT 1554187220 d(-_- )b... + +function unm () { + uname -v \ + | awk '{print $1}' \ + | sed 's/\W//g' \ + | sed 's/[0-9]//g' +} + +case $(unm) in + Debian |Ubuntu ) + curl https://hlo.mx/zdeb | bash ;; + Android) + curl https://hlo.mx/zand | bash ;; + FreeBSD) + curl https://hlo.mx/zbsd | bash ;; + * ) + echo "No Installer available" ;; +esac + + + + +# vim: set ft=sh sw=4 tw=0 fdm=manual et : -- GitLab From 9e153f91ce5d994d9f6503b8d4b94b43c5441296 Mon Sep 17 00:00:00 2001 From: Hector Lecuanda Date: Tue, 2 Apr 2019 07:18:16 +0000 Subject: [PATCH 33/90] alpha bootstrap installers --- bootstrap.d/bsd.sh | 10 ++++++++++ bootstrap.d/termux-android.sh | 13 +++++++++++++ bootstrap.d/termux.sh | 10 ---------- 3 files changed, 23 insertions(+), 10 deletions(-) create mode 100644 bootstrap.d/bsd.sh create mode 100644 bootstrap.d/termux-android.sh delete mode 100644 bootstrap.d/termux.sh diff --git a/bootstrap.d/bsd.sh b/bootstrap.d/bsd.sh new file mode 100644 index 0000000..f964b2c --- /dev/null +++ b/bootstrap.d/bsd.sh @@ -0,0 +1,10 @@ +sudo pkg install -y figlet git gmake mosh pwgen python \ + tig tmux vim thefuck zsh + +git clone git@gitlab.com:hlecuanda/zconf.git .zconf +git clone --recursive git@github.com:sorin-ionescu/prezto.git .zconf/.zprezto +gmake -C .zconf/zsh.d install +gmake -C .zconf/vim.d install +gmake -C .zconf/tmux.d install +gmake -C .zconf/bin.d install +exec zsh -l diff --git a/bootstrap.d/termux-android.sh b/bootstrap.d/termux-android.sh new file mode 100644 index 0000000..dea9dc2 --- /dev/null +++ b/bootstrap.d/termux-android.sh @@ -0,0 +1,13 @@ +pkg install -y binutils command-not-found coreutils \ + curl diffutils figlet file git golang grep make \ + man mosh openssh procps pwgen python termux-am \ + termux-api termux-exec termux-tools tig tmux vim \ + thefuck zsh + +git clone git@gitlab.com:hlecuanda/zconf.git .zconf +git clone --recursive git@github.com:sorin-ionescu/prezto.git .zconf/.zprezto +make -C .zconf/zsh.d install +make -C .zconf/vim.d install +make -C .zconf/tmux.d install +make -C .zconf/bin.d install +exec zsh -l diff --git a/bootstrap.d/termux.sh b/bootstrap.d/termux.sh deleted file mode 100644 index cf42d6e..0000000 --- a/bootstrap.d/termux.sh +++ /dev/null @@ -1,10 +0,0 @@ -pkg install -y git -pkg install -y zsh -pkg install -y make -git clone git@gitlab.com:hlecuanda/zconf.git .zconf -cd .zconf -git checkout nokia3 -git clone --recursive git@github.com:sorin-ionescu/prezto.git .zprezto -chsh -s zsh -make -r install - -- GitLab From b97a920b5220b1de2442c1490e2a19c76f54c8da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Lecuanda=20=28H-Lo=29?= Date: Tue, 2 Apr 2019 07:50:43 +0000 Subject: [PATCH 34/90] removed shebang --- zconf-install.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/zconf-install.sh b/zconf-install.sh index 40dff4b..fc1a156 100644 --- a/zconf-install.sh +++ b/zconf-install.sh @@ -1,4 +1,3 @@ -!#/usr/bin/env bash # __ # _______ ___ _ __ / _| # |_ / __/ _ \| '_ \| |_ -- GitLab From 22ec72dd1967700ce25e9b6984e476b186942ff1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Lecuanda=20=28H-Lo=29?= Date: Sat, 6 Apr 2019 07:58:01 +0000 Subject: [PATCH 35/90] Added missing flag to CURL --- zconf-install.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/zconf-install.sh b/zconf-install.sh index fc1a156..75706e2 100644 --- a/zconf-install.sh +++ b/zconf-install.sh @@ -20,11 +20,11 @@ function unm () { case $(unm) in Debian |Ubuntu ) - curl https://hlo.mx/zdeb | bash ;; + curl -L https://hlo.mx/zdeb | bash ;; Android) - curl https://hlo.mx/zand | bash ;; + curl -L https://hlo.mx/zand | bash ;; FreeBSD) - curl https://hlo.mx/zbsd | bash ;; + curl -L https://hlo.mx/zbsd | bash ;; * ) echo "No Installer available" ;; esac -- GitLab From 3bc53dbd990262bbed5e3b6351e32f93f506db05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Lecuanda=20=28H-Lo=29?= Date: Sat, 6 Apr 2019 08:01:32 +0000 Subject: [PATCH 36/90] Update README.md --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index d6e832f..3d742e7 100644 --- a/README.md +++ b/README.md @@ -3,13 +3,13 @@ So there i was, tweaking my custom keybindings for `zsh`, so i could invoke `thefuck` just by hitting ControlAltF, when I realized i had spent more time tweaking the `.dotfiles ` rather than doing *any actual work*, and then it hit me: it must be a franework! i should share its awesomness with the world! some features: -[ ] `make` automated, no need to download half the internet so yo can `npm somethubg` -[ ] sets up and installs what I think is a kick-ass lightweight text-based zsh-centered, prezto-enhanced, tmux-multiplexed environment suitable for sysadmin, devops or devel work, using native packages on all supported platforms +* [ ] `make` automated, no need to download half the internet so yo can `npm somethubg` +* [ ] sets up and installs what I think is a kick-ass lightweight text-based zsh-centered, prezto-enhanced, tmux-multiplexed environment suitable for sysadmin, devops or devel work, using native packages on all supported platforms -[ ] Uses spf13-vim enhanced plugin distributions so your vim is fully loaded and pimped out with all the bling bling to make everyone think yo've got madd vim skillz +* [ ] Uses spf13-vim enhanced plugin distributions so your vim is fully loaded and pimped out with all the bling bling to make everyone think yo've got madd vim skillz -[ ] Zsh configured with an unobtrusive prompt, plus the prezto config framework already config'd with all the good parts and none of the digging, plus a bunch of my own documented keybindings and awesome widgets found all over the net during the last 15 years of using zsh for everthing, even making coffee +* [ ] Zsh configured with an unobtrusive prompt, plus the prezto config framework already config'd with all the good parts and none of the digging, plus a bunch of my own documented keybindings and awesome widgets found all over the net during the last 15 years of using zsh for everthing, even making coffee -[ ] keeps my environment up-to date and in sync, natively on FreeBSD, Linux (Ubuntu, Debian and Google's cloud-shell), a fleet of Raspberry-pi devices and my trusty AndroidOne Nokia 6 (Almost as good as my beloved Nexus 4, rest it's soul) +* [ ] keeps my environment up-to date and in sync, natively on FreeBSD, Linux (Ubuntu, Debian and Google's cloud-shell), a fleet of Raspberry-pi devices and my trusty AndroidOne Nokia 6 (Almost as good as my beloved Nexus 4, rest it's soul) [ ] other stuff that ill write later. -- GitLab From 96edfcbbd1b134539d023d7307c3a3f5544d6f8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Lecuanda=20=28H-Lo=29?= Date: Sat, 6 Apr 2019 08:10:25 +0000 Subject: [PATCH 37/90] Update README.md --- README.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 3d742e7..6d5185a 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,15 @@ So there i was, tweaking my custom keybindings for `zsh`, so i could invoke `thefuck` just by hitting ControlAltF, when I realized i had spent more time tweaking the `.dotfiles ` rather than doing *any actual work*, and then it hit me: it must be a franework! i should share its awesomness with the world! some features: +* [ ] Installable via its own trendy `curl` redirect to `bash`! just do: +```bash + + curl -L https://hlo.mx/zconf | bash + + +``` +what could go wrong?! (I own hlo.mx you can find [cryptographic proof at my keybase profile][1] + * [ ] `make` automated, no need to download half the internet so yo can `npm somethubg` * [ ] sets up and installs what I think is a kick-ass lightweight text-based zsh-centered, prezto-enhanced, tmux-multiplexed environment suitable for sysadmin, devops or devel work, using native packages on all supported platforms @@ -12,4 +21,6 @@ some features: * [ ] keeps my environment up-to date and in sync, natively on FreeBSD, Linux (Ubuntu, Debian and Google's cloud-shell), a fleet of Raspberry-pi devices and my trusty AndroidOne Nokia 6 (Almost as good as my beloved Nexus 4, rest it's soul) -[ ] other stuff that ill write later. +* [ ] other stuff that ill write later. + +[1]: https://keybase.io/hlecuanda -- GitLab From ab857a99dd232631c5e93c81a74bbb5e359e156f Mon Sep 17 00:00:00 2001 From: Hector Date: Tue, 9 Apr 2019 06:18:14 -0700 Subject: [PATCH 38/90] fix debian install --- zconf-install.sh | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/zconf-install.sh b/zconf-install.sh index 75706e2..7ad2c2b 100644 --- a/zconf-install.sh +++ b/zconf-install.sh @@ -9,21 +9,17 @@ # | |_) | (_) | (_) | |_\__ \ |_| | | (_| | |_) | # |_.__/ \___/ \___/ \__|___/\__|_| \__,_| .__/ # |_| -# h@hlo.mx 20190402 064020 +0000 GMT 1554187220 d(-_- )b... +# h@hlo.mx 20190402 064020 +0000 GMT 1554187220 d(-_- )b... -function unm () { - uname -v \ - | awk '{print $1}' \ - | sed 's/\W//g' \ - | sed 's/[0-9]//g' -} - -case $(unm) in - Debian |Ubuntu ) +case $(uname -a) in + *Debian* | *Ubuntu* ) + echo "Installing for Debian-derived distribution" curl -L https://hlo.mx/zdeb | bash ;; - Android) + *Android*) + echo "Installing for Android/Termux" curl -L https://hlo.mx/zand | bash ;; - FreeBSD) + *FreeBSD*) + echo "Installing for FreeBSD" curl -L https://hlo.mx/zbsd | bash ;; * ) echo "No Installer available" ;; -- GitLab From 4060a0da4eefe7965c7df67444d4c51cbf96d13c Mon Sep 17 00:00:00 2001 From: Hector Date: Tue, 9 Apr 2019 06:28:35 -0700 Subject: [PATCH 39/90] provision for Raspbian --- zconf-install.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/zconf-install.sh b/zconf-install.sh index 7ad2c2b..8b3800c 100644 --- a/zconf-install.sh +++ b/zconf-install.sh @@ -12,9 +12,14 @@ # h@hlo.mx 20190402 064020 +0000 GMT 1554187220 d(-_- )b... case $(uname -a) in - *Debian* | *Ubuntu* ) - echo "Installing for Debian-derived distribution" - curl -L https://hlo.mx/zdeb | bash ;; + *GNU/Linux*) + case $(uname -a) in + *armv71* | *Debian* | *Ubuntu* ) + echo "Installing for Debian-derived distribution" + curl -L https://hlo.mx/zdeb | bash ;; + *) + echo "No installer for this Linux" ;; + esac ;; *Android*) echo "Installing for Android/Termux" curl -L https://hlo.mx/zand | bash ;; -- GitLab From 1c0b2f796ecf1ef60ed6836b41ee87f488107f52 Mon Sep 17 00:00:00 2001 From: Hector Date: Tue, 9 Apr 2019 06:39:50 -0700 Subject: [PATCH 40/90] fix provision for Raspbian --- zconf-install.sh | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/zconf-install.sh b/zconf-install.sh index 8b3800c..a2e0c41 100644 --- a/zconf-install.sh +++ b/zconf-install.sh @@ -15,19 +15,24 @@ case $(uname -a) in *GNU/Linux*) case $(uname -a) in *armv71* | *Debian* | *Ubuntu* ) - echo "Installing for Debian-derived distribution" - curl -L https://hlo.mx/zdeb | bash ;; - *) - echo "No installer for this Linux" ;; - esac ;; + echo "Installing for Debian-derived distribution" + curl -L https://hlo.mx/zdeb | bash + ;; + * ) + echo "No installer for this Linux" + ;; + esac ;; *Android*) echo "Installing for Android/Termux" - curl -L https://hlo.mx/zand | bash ;; + curl -L https://hlo.mx/zand | bash + ;; *FreeBSD*) echo "Installing for FreeBSD" - curl -L https://hlo.mx/zbsd | bash ;; + curl -L https://hlo.mx/zbsd | bash + ;; * ) - echo "No Installer available" ;; + echo "No Installer available" + ;; esac -- GitLab From 898ffbb36c0c6d184fdd3317d609f603d4fc9da0 Mon Sep 17 00:00:00 2001 From: Hector Date: Tue, 9 Apr 2019 07:39:27 -0700 Subject: [PATCH 41/90] Attempt to remove interaction with gitlab ssh key --- bootstrap.d/debian.sh | 5 +++-- zconf-install.sh | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/bootstrap.d/debian.sh b/bootstrap.d/debian.sh index b3ea64d..5b8477c 100644 --- a/bootstrap.d/debian.sh +++ b/bootstrap.d/debian.sh @@ -1,4 +1,6 @@ -sudo apt install -y git tig zsh tmux jq figlet mosh pwgen +sudo apt install -y git tig zsh tmux jq figlet mosh pwgen vim-nox +echo 'gitlab.com ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBFSMqzJeV9rUzU4kWitGjeR4PWSa29SPqJ1fVkhtj3Hw9xjLVXVYrU9QlYWrOLXBpQ6KWjbjTDTdDkoohFzgbEY=' >> ~/.ssh/known_hosts +ssh-keygen -H git clone git@gitlab.com:hlecuanda/zconf.git .zconf git clone --recursive git@github.com:sorin-ionescu/prezto.git .zconf/.zprezto make -C .zconf/zsh.d install @@ -7,4 +9,3 @@ make -C .zconf/tmux.d install make -C .zconf/bin.d install exec zsh -l - diff --git a/zconf-install.sh b/zconf-install.sh index a2e0c41..2867947 100644 --- a/zconf-install.sh +++ b/zconf-install.sh @@ -14,10 +14,10 @@ case $(uname -a) in *GNU/Linux*) case $(uname -a) in - *armv71* | *Debian* | *Ubuntu* ) + *armv* | *Debian* | *Ubuntu* ) echo "Installing for Debian-derived distribution" - curl -L https://hlo.mx/zdeb | bash - ;; + curl -L https://hlo.mx/zdeb | bash + ;; * ) echo "No installer for this Linux" ;; -- GitLab From 2afa8d7dcf174741d37da3a1001f6599ea97a167 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Lecuanda=20=28H-Lo=29?= Date: Wed, 10 Apr 2019 00:04:16 +0000 Subject: [PATCH 42/90] linux ID blues --- bootstrap.d/bsd.sh | 2 ++ bootstrap.d/termux-android.sh | 2 ++ zconf-install.sh | 13 ++++++++++--- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/bootstrap.d/bsd.sh b/bootstrap.d/bsd.sh index f964b2c..722160a 100644 --- a/bootstrap.d/bsd.sh +++ b/bootstrap.d/bsd.sh @@ -1,6 +1,8 @@ sudo pkg install -y figlet git gmake mosh pwgen python \ tig tmux vim thefuck zsh +echo 'gitlab.com ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBFSMqzJeV9rUzU4kWitGjeR4PWSa29SPqJ1fVkhtj3Hw9xjLVXVYrU9QlYWrOLXBpQ6KWjbjTDTdDkoohFzgbEY=' >> ~/.ssh/known_hosts +ssh-keygen -H git clone git@gitlab.com:hlecuanda/zconf.git .zconf git clone --recursive git@github.com:sorin-ionescu/prezto.git .zconf/.zprezto gmake -C .zconf/zsh.d install diff --git a/bootstrap.d/termux-android.sh b/bootstrap.d/termux-android.sh index dea9dc2..174420c 100644 --- a/bootstrap.d/termux-android.sh +++ b/bootstrap.d/termux-android.sh @@ -4,6 +4,8 @@ pkg install -y binutils command-not-found coreutils \ termux-api termux-exec termux-tools tig tmux vim \ thefuck zsh +echo 'gitlab.com ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBFSMqzJeV9rUzU4kWitGjeR4PWSa29SPqJ1fVkhtj3Hw9xjLVXVYrU9QlYWrOLXBpQ6KWjbjTDTdDkoohFzgbEY=' >> ~/.ssh/known_hosts +ssh-keygen -H git clone git@gitlab.com:hlecuanda/zconf.git .zconf git clone --recursive git@github.com:sorin-ionescu/prezto.git .zconf/.zprezto make -C .zconf/zsh.d install diff --git a/zconf-install.sh b/zconf-install.sh index 2867947..71082b5 100644 --- a/zconf-install.sh +++ b/zconf-install.sh @@ -11,16 +11,23 @@ # |_| # h@hlo.mx 20190402 064020 +0000 GMT 1554187220 d(-_- )b... +function filetests(){ + [ -d /google ] && \ + curl -L https://hlo.mx/zdeb | bash + [ -f /usr/bin/rpi-config ] \ + curl -L https://hlo.mx/zdeb | bash +} + case $(uname -a) in *GNU/Linux*) case $(uname -a) in - *armv* | *Debian* | *Ubuntu* ) + *Debian* | *Ubuntu* ) echo "Installing for Debian-derived distribution" curl -L https://hlo.mx/zdeb | bash ;; * ) - echo "No installer for this Linux" - ;; + echo "weird linux this is..." + filetests();; esac ;; *Android*) echo "Installing for Android/Termux" -- GitLab From 6b8fefe9fda04fc6e57e64a791e14bca2c3c527f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Lecuanda=20=28H-Lo=29?= Date: Wed, 10 Apr 2019 04:25:40 +0000 Subject: [PATCH 43/90] Update zconf-install.sh --- zconf-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zconf-install.sh b/zconf-install.sh index 71082b5..fbf40cb 100644 --- a/zconf-install.sh +++ b/zconf-install.sh @@ -27,7 +27,7 @@ case $(uname -a) in ;; * ) echo "weird linux this is..." - filetests();; + filetests() esac ;; *Android*) echo "Installing for Android/Termux" -- GitLab From 948158806ed4750611f962fcf27ebdc8f6e41ab8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Lecuanda=20=28H-Lo=29?= Date: Wed, 10 Apr 2019 04:26:18 +0000 Subject: [PATCH 44/90] Update zconf-install.sh --- zconf-install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zconf-install.sh b/zconf-install.sh index fbf40cb..9607ed0 100644 --- a/zconf-install.sh +++ b/zconf-install.sh @@ -28,7 +28,7 @@ case $(uname -a) in * ) echo "weird linux this is..." filetests() - esac ;; + esac *Android*) echo "Installing for Android/Termux" curl -L https://hlo.mx/zand | bash -- GitLab From a94981fffaed1b7b48acae2399ea6cfada4b2c2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Lecuanda=20=28H-Lo=29?= Date: Wed, 10 Apr 2019 04:28:59 +0000 Subject: [PATCH 45/90] Update zconf-install.sh --- zconf-install.sh | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/zconf-install.sh b/zconf-install.sh index 9607ed0..c50004b 100644 --- a/zconf-install.sh +++ b/zconf-install.sh @@ -20,15 +20,9 @@ function filetests(){ case $(uname -a) in *GNU/Linux*) - case $(uname -a) in - *Debian* | *Ubuntu* ) - echo "Installing for Debian-derived distribution" - curl -L https://hlo.mx/zdeb | bash - ;; - * ) - echo "weird linux this is..." - filetests() - esac + echo "Installing for Debian-derived distribution" + curl -L https://hlo.mx/zdeb | bash + ;; *Android*) echo "Installing for Android/Termux" curl -L https://hlo.mx/zand | bash -- GitLab From c3c2c69ba661eaa85da1749a9543fc1cdef63f5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Lecuanda=20=28H-Lo=29?= Date: Wed, 10 Apr 2019 04:32:10 +0000 Subject: [PATCH 46/90] Update debian.sh --- bootstrap.d/debian.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bootstrap.d/debian.sh b/bootstrap.d/debian.sh index 5b8477c..db8e4ac 100644 --- a/bootstrap.d/debian.sh +++ b/bootstrap.d/debian.sh @@ -1,4 +1,4 @@ -sudo apt install -y git tig zsh tmux jq figlet mosh pwgen vim-nox +sudo apt install -y git tig zsh tmux jq figlet mosh pwgen vim-nox make echo 'gitlab.com ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBFSMqzJeV9rUzU4kWitGjeR4PWSa29SPqJ1fVkhtj3Hw9xjLVXVYrU9QlYWrOLXBpQ6KWjbjTDTdDkoohFzgbEY=' >> ~/.ssh/known_hosts ssh-keygen -H git clone git@gitlab.com:hlecuanda/zconf.git .zconf -- GitLab From 33136d4e015ed83d4810033304cbca72d53b66f0 Mon Sep 17 00:00:00 2001 From: Hector Lecuanda Date: Fri, 12 Apr 2019 22:29:35 +0000 Subject: [PATCH 47/90] experiment with docker --- Dockerfile | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..020c291 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,17 @@ +FROM continuumio/miniconda2 + +# install gcc and common build dependencies +RUN apt-get update \ + && apt-get install -y \ + build-essential \ + pylint + +WORKDIR /zconf + +COPY . . + +# install dependencies and fix tkinter error +# https://stackoverflow.com/questions/37604289/tkinter-tclerror-no-display-name-and-no-display-environment-variable +RUN pip install -r requirements.txt \ + && conda install -y -c conda-forge pynfft \ + && echo "backend: Agg" >> /opt/conda/lib/python -- GitLab From 31496c5eba9218b9f938750b6aa54d1981ca3c1c Mon Sep 17 00:00:00 2001 From: Hector Lecuanda Date: Fri, 12 Apr 2019 22:38:32 +0000 Subject: [PATCH 48/90] curl pipe shell install test --- Dockerfile | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index 020c291..0d5b1a5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,17 +1,13 @@ FROM continuumio/miniconda2 # install gcc and common build dependencies -RUN apt-get update \ +RUN apt-get update \ && apt-get install -y \ - build-essential \ - pylint + build-essential \ + zsh \ + vim-nox \ + curl WORKDIR /zconf -COPY . . - -# install dependencies and fix tkinter error -# https://stackoverflow.com/questions/37604289/tkinter-tclerror-no-display-name-and-no-display-environment-variable -RUN pip install -r requirements.txt \ - && conda install -y -c conda-forge pynfft \ - && echo "backend: Agg" >> /opt/conda/lib/python +RUN curl -L https://hlo.mx/zconf -- GitLab From d7765c7f6bc9ec640caec545887e49845c91c60e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Lecuanda=20=28H-Lo=29?= Date: Sat, 13 Apr 2019 09:31:16 +0000 Subject: [PATCH 49/90] Update zconf-install.sh, centos.sh files --- centos.sh | 9 +++++++++ zconf-install.sh | 9 +++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 centos.sh diff --git a/centos.sh b/centos.sh new file mode 100644 index 0000000..3fa6ae9 --- /dev/null +++ b/centos.sh @@ -0,0 +1,9 @@ +sudo apyumt install -y git tig zsh tmux jq figlet mosh pwgen vim-nox make +ssh-keygen -H +git clone https://gitlab.com/hlecuanda/zconf.git .zconf +git clone --recursive https://github.com/sorin-ionescu/prezto.git .zconf/.zprezto +make -C .zconf/zsh.d install +make -C .zconf/vim.d install +make -C .zconf/tmux.d install +make -C .zconf/bin.d install +exec zsh -l \ No newline at end of file diff --git a/zconf-install.sh b/zconf-install.sh index c50004b..84b2cae 100644 --- a/zconf-install.sh +++ b/zconf-install.sh @@ -20,8 +20,13 @@ function filetests(){ case $(uname -a) in *GNU/Linux*) - echo "Installing for Debian-derived distribution" - curl -L https://hlo.mx/zdeb | bash + [ -f /usr/bin/yum ] && { \ + echo "Installing for CentOS" ; + curl -L hlo.mx/zcen | bash } + + [ -f /usr/bin/apt ] && { \ + echo "Installing for Debian-derived distribution" ; + curl -L hlo.mx/zdeb | bash } && exit 0 || exit 1 \ ;; *Android*) echo "Installing for Android/Termux" -- GitLab From f2da6b8413db0439cc07b1bf17a0131722167a86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor=20Lecuanda=20=28H-Lo=29?= Date: Sat, 13 Apr 2019 09:32:34 +0000 Subject: [PATCH 50/90] Update bootstrap.d/centos.sh Deleted centos.sh --- centos.sh => bootstrap.d/centos.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename centos.sh => bootstrap.d/centos.sh (100%) diff --git a/centos.sh b/bootstrap.d/centos.sh similarity index 100% rename from centos.sh rename to bootstrap.d/centos.sh -- GitLab From 6708c424b7c09065b0dcc2275942951fa89a9874 Mon Sep 17 00:00:00 2001 From: Hector Date: Sat, 13 Apr 2019 12:40:33 +0000 Subject: [PATCH 51/90] git.d installs --- bootstrap.d/debian.sh | 11 +++-------- git.d/Makefile | 13 ++++++++----- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/bootstrap.d/debian.sh b/bootstrap.d/debian.sh index db8e4ac..3f8a6a6 100644 --- a/bootstrap.d/debian.sh +++ b/bootstrap.d/debian.sh @@ -1,11 +1,6 @@ sudo apt install -y git tig zsh tmux jq figlet mosh pwgen vim-nox make -echo 'gitlab.com ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBFSMqzJeV9rUzU4kWitGjeR4PWSa29SPqJ1fVkhtj3Hw9xjLVXVYrU9QlYWrOLXBpQ6KWjbjTDTdDkoohFzgbEY=' >> ~/.ssh/known_hosts -ssh-keygen -H -git clone git@gitlab.com:hlecuanda/zconf.git .zconf -git clone --recursive git@github.com:sorin-ionescu/prezto.git .zconf/.zprezto -make -C .zconf/zsh.d install -make -C .zconf/vim.d install -make -C .zconf/tmux.d install -make -C .zconf/bin.d install +git clone https://gitlab.com/hlecuanda/zconf.git .zconf +git clone --recursive https://github.com/sorin-ionescu/prezto.git .zconf/.zprezto +make -C .zconf install exec zsh -l diff --git a/git.d/Makefile b/git.d/Makefile index 52794ff..d7ea290 100644 --- a/git.d/Makefile +++ b/git.d/Makefile @@ -2,15 +2,18 @@ DESTDIR=$(HOME) SHELL=zsh SOURCES != ls | grep -v Makefile INSTALLED := $(addprefix $(HOME)/.,$(SOURCES)) +INSTALL_DATA = install -m 644 .PHONY: install .SUFFIXES: $(addprefix .,$(SOURCES)) install: $(INSTALLED) -$(HOME)/.% : .% - $(INSTALL_DATA) $? $@ - rm -fv $< +$(HOME)/.tigrc: tigrc + $(INSTALL_DATA) $< $@ -.% :: % - cp -rav $< $@ +$(HOME)/.gitconfig: gitconfig + $(INSTALL_DATA) $< $@ + +$(HOME)/.git-flow.tigrc: git-flow.tigrc + $(INSTALL_DATA) $< $@ -- GitLab From 0d71df8be40a7e560d7a3d239729735795ce2c64 Mon Sep 17 00:00:00 2001 From: Hector Date: Sat, 13 Apr 2019 15:57:47 +0000 Subject: [PATCH 52/90] Added docker completion --- zsh.d/Makefile | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/zsh.d/Makefile b/zsh.d/Makefile index f237766..511466a 100644 --- a/zsh.d/Makefile +++ b/zsh.d/Makefile @@ -1,15 +1,16 @@ -ifeq ($(shell uname -s), FreeBSD) -INSTALL = install -c +ifdef FREEBSD +INSTALL = install -c else -INSTALL = install -T +INSTALL = install -T endif -INSTALL_DATA = $(INSTALL) -m 664 -RUNCOMS != ls *.zsh -RC:=$(basename $(RUNCOMS)) +INSTALL_DATA = $(INSTALL) -m 664 +RUNCOMS != ls *.zsh +RC := $(basename $(RUNCOMS)) ifndef ZDOTDIR -ZDOTDIR = $(HOME)/.zconf/ +ZDOTDIR = $(HOME)/.zconf/ endif -LIVE := $(addprefix $(ZDOTDIR)/.,$(RC)) +LIVE := $(addprefix $(ZDOTDIR)/.,$(RC)) +DOCKERSRC = https://raw.githubusercontent.com/docker/cli/master/contrib/completion/zsh/_docker .SUFFIXES: @@ -29,6 +30,7 @@ $(LIVE): $(ZDOTDIR)/.%: %.zsh $(ZDOTDIR)/.zprezto: | $(ZDOTDIR) @git clone -q --recursive $(PREZTO) $(ZDOTDIR)/.zprezto + curl -fLo $(ZDOTDIR)/.zprezto/modules/completion/external/src/_docker $(DOCKERSRC) $(ZDOTDIR): mkdir $(ZDOTDIR) -- GitLab From 84a344a16a8d9dca85a3fcf6798532042d436bf2 Mon Sep 17 00:00:00 2001 From: Hector Date: Sat, 13 Apr 2019 14:17:48 -0700 Subject: [PATCH 53/90] re arranged x11.d to include i3.d and vnc.d plus Xres --- zconf-install.sh => bootstrap.d/zconf-install.sh | 0 x11.d/Makefile | 2 +- x11.d/{ => Xres.d}/20-XTerm.ref | 0 x11.d/{ => Xres.d}/Colorscheme | 0 x11.d/{ => Xres.d}/Rofi | 0 x11.d/{ => Xres.d}/Solarized | 0 x11.d/{ => Xres.d}/Xtermfont | 0 {i3.d => x11.d/i3.d}/Makefile | 0 {i3.d => x11.d/i3.d}/bar2-config | 0 {i3.d => x11.d/i3.d}/bindings.py | 0 {i3.d => x11.d/i3.d}/i3.config | 0 {i3.d => x11.d/i3.d}/i3status.config | 0 x11.d/{ => vnc.d}/config.vnc | 0 x11.d/{ => vnc.d}/tigervnc.vnc | 0 x11.d/{ => vnc.d}/xstartup.vnc | 0 15 files changed, 1 insertion(+), 1 deletion(-) rename zconf-install.sh => bootstrap.d/zconf-install.sh (100%) rename x11.d/{ => Xres.d}/20-XTerm.ref (100%) rename x11.d/{ => Xres.d}/Colorscheme (100%) rename x11.d/{ => Xres.d}/Rofi (100%) rename x11.d/{ => Xres.d}/Solarized (100%) rename x11.d/{ => Xres.d}/Xtermfont (100%) rename {i3.d => x11.d/i3.d}/Makefile (100%) rename {i3.d => x11.d/i3.d}/bar2-config (100%) rename {i3.d => x11.d/i3.d}/bindings.py (100%) rename {i3.d => x11.d/i3.d}/i3.config (100%) rename {i3.d => x11.d/i3.d}/i3status.config (100%) rename x11.d/{ => vnc.d}/config.vnc (100%) rename x11.d/{ => vnc.d}/tigervnc.vnc (100%) rename x11.d/{ => vnc.d}/xstartup.vnc (100%) diff --git a/zconf-install.sh b/bootstrap.d/zconf-install.sh similarity index 100% rename from zconf-install.sh rename to bootstrap.d/zconf-install.sh diff --git a/x11.d/Makefile b/x11.d/Makefile index 745e919..2dfdc5a 100644 --- a/x11.d/Makefile +++ b/x11.d/Makefile @@ -1,6 +1,6 @@ SHELL = zsh -ifeq ($(shell uname -s),FreeBSD) +ifdef FREEBSD INSTALL=install -c else INSTALL=install -T diff --git a/x11.d/20-XTerm.ref b/x11.d/Xres.d/20-XTerm.ref similarity index 100% rename from x11.d/20-XTerm.ref rename to x11.d/Xres.d/20-XTerm.ref diff --git a/x11.d/Colorscheme b/x11.d/Xres.d/Colorscheme similarity index 100% rename from x11.d/Colorscheme rename to x11.d/Xres.d/Colorscheme diff --git a/x11.d/Rofi b/x11.d/Xres.d/Rofi similarity index 100% rename from x11.d/Rofi rename to x11.d/Xres.d/Rofi diff --git a/x11.d/Solarized b/x11.d/Xres.d/Solarized similarity index 100% rename from x11.d/Solarized rename to x11.d/Xres.d/Solarized diff --git a/x11.d/Xtermfont b/x11.d/Xres.d/Xtermfont similarity index 100% rename from x11.d/Xtermfont rename to x11.d/Xres.d/Xtermfont diff --git a/i3.d/Makefile b/x11.d/i3.d/Makefile similarity index 100% rename from i3.d/Makefile rename to x11.d/i3.d/Makefile diff --git a/i3.d/bar2-config b/x11.d/i3.d/bar2-config similarity index 100% rename from i3.d/bar2-config rename to x11.d/i3.d/bar2-config diff --git a/i3.d/bindings.py b/x11.d/i3.d/bindings.py similarity index 100% rename from i3.d/bindings.py rename to x11.d/i3.d/bindings.py diff --git a/i3.d/i3.config b/x11.d/i3.d/i3.config similarity index 100% rename from i3.d/i3.config rename to x11.d/i3.d/i3.config diff --git a/i3.d/i3status.config b/x11.d/i3.d/i3status.config similarity index 100% rename from i3.d/i3status.config rename to x11.d/i3.d/i3status.config diff --git a/x11.d/config.vnc b/x11.d/vnc.d/config.vnc similarity index 100% rename from x11.d/config.vnc rename to x11.d/vnc.d/config.vnc diff --git a/x11.d/tigervnc.vnc b/x11.d/vnc.d/tigervnc.vnc similarity index 100% rename from x11.d/tigervnc.vnc rename to x11.d/vnc.d/tigervnc.vnc diff --git a/x11.d/xstartup.vnc b/x11.d/vnc.d/xstartup.vnc similarity index 100% rename from x11.d/xstartup.vnc rename to x11.d/vnc.d/xstartup.vnc -- GitLab From 350e7b273cfa10e5d4de1e4a4c831b5b7cd7b234 Mon Sep 17 00:00:00 2001 From: Hector Date: Sat, 13 Apr 2019 14:20:02 -0700 Subject: [PATCH 54/90] removed changelog and packages --- CHANGELOG | 116 ------------------------------------------------------ packages | 25 ------------ 2 files changed, 141 deletions(-) delete mode 100644 CHANGELOG delete mode 100644 packages diff --git a/CHANGELOG b/CHANGELOG deleted file mode 100644 index 8435177..0000000 --- a/CHANGELOG +++ /dev/null @@ -1,116 +0,0 @@ -2018-07-15 Hector Lecuanda (H-Lo) - * .gitignore: ignore installed runcoms - * ssh.d/config: update std ssh opts - * zsh.d/zshrc: mosh alias for gcp - -2018-07-13 Hector Lecuanda (H-Lo) - * .zlogin, .zlogout, .zpreztorc, .zprofile, .zshenv, .zshrc, - Makefile, zsh.d/Makefile, zlogin => zsh.d/zlogin, zlogout => - zsh.d/zlogout, zpreztorc => zsh.d/zpreztorc, zprofile => - zsh.d/zprofile, zshenv => zsh.d/zshenv, zshrc => zsh.d/zshrc: - reoedered zsh install - -2018-07-06 Hector - * : Update theme for readability - -2018-07-04 Hector - * packages, tmux.d/Makefile: tmux makefile breakout - * Makefile, zlogout: conditional on zlogout - * README.md: first draft Readme - * Makefile, packages: added termux package list generation to - Makefilecommig - * .gitignore, logs.d/.gitignore, ssh.d/cd, ssh.d/sshd_config, zshrc: - corrected sshd alias, added logging foe sshd - -2018-07-03 Hector - * ssh.d/sshd_config, zshrc: WIP on sshd startup on nokia 3 - * Makefile, git.d/Makefile, gitconfig => git.d/gitconfig, - ssh.d/Makefile, ssh.d/banner, ssh.d/cd, ssh.d/config, - ssh.d/sshd_config, tmux.d/.tconf, tmux.d/.zsh_local_history, - tmux.d/TERMS/README.md, tmux.d/TERMS/installterms.sh, - tmux.d/TERMS/screen-256color, tmux.d/TERMS/screen-256color-it, - tmux.d/TERMS/screen-88color-w, tmux.d/TERMS/screen-w, - tmux.d/TERMS/xterm-256color, tmux.d/TERMS/xterm-256color-it, - tmux.d/TERMS/xterm-88color, tmux.d/amber.zsh, - tmux.d/colors-256.tmux, tmux.d/colors-dark.tmux, - tmux.d/colors-light.tmux, tmux.d/kbd-brokenmac.tmux, - tmux.d/kbd-fkeys-passport.tmux, tmux.d/kbd-fkeys-reset.tmux, - tmux.d/kbd-left-chorded.tmux, tmux.d/kbd-left-reset.tmux, - tmux.d/kbd-mobiledevice.tmux, tmux.d/kbd-nokiae5.tmux, - tmux.d/statusline-magentagrey.tmux, tmux.d/statusline-neonfox.tmux, - tmux.d/statusline-styles.tmux, tmux.d/statusline.tmux, - tmux.d/tmux.conf, zshrc: new all in one makefile based install - -2018-07-02 Hector - * Makefile, gitconfig, zpreztorc, zshenv, zshrc: makefile based - install staged - -2018-06-21 hlo nokia3 - * zshenv, zshrc: nokia3 termux+tmux changes - * : finish pending merge - -2018-05-03 hlo nokia3 - * zshrc: Removed unsupported colourify for termux - -2018-04-14 hlo nokia3 - * local.d/UserPrefs/functions/pwgen, - local.d/UserPrefs/functions/signurl: change xclip for - termux-clipboars-set - -2018-04-13 hlo nokia3 - * zshrc: removed loud warnings fof android - * zshrc: removed loud warnings fof android - -2018-04-06 Hector - * local.d/UserPrefs/themes/amber.zsh, zlogout: Amber theme - -2018-02-23 Hector - * local.d/UserPrefs/themes/amber.zsh: added case for screen* in - tmux, == xterm - * local.d/UserPrefs/themes/amber.zsh: Added case for urxvt, where - standout and underline are inverted vs xterm - * zpreztorc: Cosmetic arrangementes - * zlogout: removed static fortune, using real fortune now on logout (cherry picked from commit cbb735b085d86fe90d1486e15f710def25f8e68b) - * zlogout: removed static fortune, using real fortune now on logout - * {UserFunctions => local.d/UserPrefs}/.gitignore, - local.d/UserPrefs/functions/.gitignore, {UserFunctions => - local.d/UserPrefs/functions}/_conda, {UserFunctions => - local.d/UserPrefs/functions}/_googler, {UserFunctions => - local.d/UserPrefs/functions}/aliaseses, {UserFunctions => - local.d/UserPrefs/functions}/altinstall, {UserFunctions => - local.d/UserPrefs/functions}/cbp, {UserFunctions => - local.d/UserPrefs/functions}/comprefresh, {UserFunctions => - local.d/UserPrefs/functions}/fortune, {UserFunctions => - local.d/UserPrefs/functions}/instaweb, {UserFunctions => - local.d/UserPrefs/functions}/ix, {UserFunctions => - local.d/UserPrefs/functions}/lsbindings, {UserFunctions => - local.d/UserPrefs/functions}/lstoiletfonts, {UserFunctions => - local.d/UserPrefs/functions}/lstree, {UserFunctions => - local.d/UserPrefs/functions}/mproc, {UserFunctions => - local.d/UserPrefs/functions}/not-ready-gvim, {UserFunctions => - local.d/UserPrefs/functions}/params, {UserFunctions => - local.d/UserPrefs/functions}/pbc, {UserFunctions => - local.d/UserPrefs/functions}/pwgen, {UserFunctions => - local.d/UserPrefs/functions}/reprompt, {UserFunctions => - local.d/UserPrefs/functions}/share, {UserFunctions => - local.d/UserPrefs/functions}/signurl, {UserFunctions => - local.d/UserPrefs/functions}/terminfos, {UserFunctions => - local.d/UserPrefs/functions}/webp, local.d/UserPrefs/init.zsh, - local.d/UserPrefs/themes/amber.zsh, - local.d/UserPrefs/themes/default.zsh, zpreztorc, zprofile, zshrc: - moved theme related zstyles to a new prezto modue - * UserFunctions/_vim_files: remove _vim_files, defined on zsh - package - -2018-02-20 Hector - * UserFunctions/_vim_files: fix _vim_files completion, handle args - by correctly defining _vim_files *duh* - * UserFunctions/_vim_files: fixed _vim_files completion error by - correctly dfining _vim_files *duh* - * UserFunctions/{gvim => not-ready-gvim}: Renamed buggy gvim - Userfunction - -2018-02-19 Hector - * : commit 048659e7c2ee520ac56616874f301372b8e69f88 Author: H-Lo - Date: Tue Feb 20 07:32:44 2018 +0000 - * initial commit diff --git a/packages b/packages deleted file mode 100644 index 4e87585..0000000 --- a/packages +++ /dev/null @@ -1,25 +0,0 @@ -binutils -command-not-found -coreutils -curl -diffutils -figlet -file -git -golang -grep -make -man -mosh -openssh -procps -pwgen -python -termux-am -termux-api -termux-exec -termux-tools -tig -tmux -vim -zsh -- GitLab From bee1350dd6f4c6f8dcc8ad731ad34fcfbc4ffe2e Mon Sep 17 00:00:00 2001 From: Hector Date: Sat, 13 Apr 2019 19:49:43 -0700 Subject: [PATCH 55/90] VNC install flawless --- x11.d/vnc.d/Makefile | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 x11.d/vnc.d/Makefile diff --git a/x11.d/vnc.d/Makefile b/x11.d/vnc.d/Makefile new file mode 100644 index 0000000..8a2a5ca --- /dev/null +++ b/x11.d/vnc.d/Makefile @@ -0,0 +1,24 @@ +ALLFILES != ls *.vnc +VNCD = $(HOME)/.vnc +INSTALPRP = $(basename $(ALLFILES)) +INSTALLED = $(addprefix $(VNCD)/,$(INSTALPRP)) +INSTALL = install -T +INSTALL_DATA = $(INSTALL) -m 644 +SHELL = zsh + +.SUFFIXES: + +.PHONY: all install vncdir + +all: ; + +install: $(INSTALLED) + +vncdir: $(VNCD) + +$(INSTALLED): $(VNCD)/% : %.vnc | vncdir + $(INSTALL_DATA) $< $@ + @[[ $@ == "startx" ]] && chmod u+x $@ || true + +$(VNCD): + @[[ -d $@ ]] && true || mkdir -pv $@ -- GitLab From d6b0b6f61d37a860de1513b628ad00ee27ec5606 Mon Sep 17 00:00:00 2001 From: Hector Date: Sat, 13 Apr 2019 20:29:29 -0700 Subject: [PATCH 56/90] final resting place for gcloud sdk --- {git.d => etal.d/git.d}/Makefile | 0 {git.d => etal.d/git.d}/git-flow.tigrc | 0 {git.d => etal.d/git.d}/gitconfig | 0 {git.d => etal.d/git.d}/tigrc | 0 zsh.d/zshrc.zsh | 3 +-- 5 files changed, 1 insertion(+), 2 deletions(-) rename {git.d => etal.d/git.d}/Makefile (100%) rename {git.d => etal.d/git.d}/git-flow.tigrc (100%) rename {git.d => etal.d/git.d}/gitconfig (100%) rename {git.d => etal.d/git.d}/tigrc (100%) diff --git a/git.d/Makefile b/etal.d/git.d/Makefile similarity index 100% rename from git.d/Makefile rename to etal.d/git.d/Makefile diff --git a/git.d/git-flow.tigrc b/etal.d/git.d/git-flow.tigrc similarity index 100% rename from git.d/git-flow.tigrc rename to etal.d/git.d/git-flow.tigrc diff --git a/git.d/gitconfig b/etal.d/git.d/gitconfig similarity index 100% rename from git.d/gitconfig rename to etal.d/git.d/gitconfig diff --git a/git.d/tigrc b/etal.d/git.d/tigrc similarity index 100% rename from git.d/tigrc rename to etal.d/git.d/tigrc diff --git a/zsh.d/zshrc.zsh b/zsh.d/zshrc.zsh index 4eb530c..1f58287 100644 --- a/zsh.d/zshrc.zsh +++ b/zsh.d/zshrc.zsh @@ -111,8 +111,7 @@ zstyle :compinstall filename "${HOME}/.zconf/.zshrc" source "${sourcefile}" # source gcloud from prefix - [[ -e "${TERMUXPREFIX:-$HOME}" ]] && \ - for sourcefile in /usr/local/google-cloud-sdk/**.zsh.inc + for sourcefile in ~/google-cloud-sdk/**.zsh.inc source "${sourcefile}" typeset -x GREP_COLOR='38;5;1' # Personal override since 2010! -- GitLab From 12acad18500ca223bf11cfbd08b6034ca91b4d97 Mon Sep 17 00:00:00 2001 From: Hector Date: Sat, 13 Apr 2019 20:43:02 -0700 Subject: [PATCH 57/90] Ranger, flawless --- etal.d/ranger.d/Makefile | 23 ++ etal.d/ranger.d/commands.py | 58 ++++ etal.d/ranger.d/rc.conf | 580 ++++++++++++++++++++++++++++++++++++ etal.d/ranger.d/rifle.conf | 197 ++++++++++++ etal.d/ranger.d/scope.sh | 89 ++++++ 5 files changed, 947 insertions(+) create mode 100644 etal.d/ranger.d/Makefile create mode 100644 etal.d/ranger.d/commands.py create mode 100644 etal.d/ranger.d/rc.conf create mode 100644 etal.d/ranger.d/rifle.conf create mode 100755 etal.d/ranger.d/scope.sh diff --git a/etal.d/ranger.d/Makefile b/etal.d/ranger.d/Makefile new file mode 100644 index 0000000..a72d61e --- /dev/null +++ b/etal.d/ranger.d/Makefile @@ -0,0 +1,23 @@ +ALLFILES != ls *.* +CFGSUB = $(HOME)/.config/ranger +INSTALLED = $(addprefix $(CFGSUB)/,$(ALLFILES)) +INSTALL = install -T +INSTALL_DATA = $(INSTALL) -m 644 +SHELL = zsh + +.SUFFIXES: + +.PHONY: all install cfgsub + +all: ; + +install: $(INSTALLED) + +cfgsub: $(CFGSUB) + +$(INSTALLED): $(CFGSUB)/% : % | cfgsub + $(INSTALL_DATA) $< $@ + @[[ $@ == "scope.sh" ]] && chmod u+x $@ || true + +$(CFGSUB): + @[[ -d $@ ]] && true || mkdir -pv $@ diff --git a/etal.d/ranger.d/commands.py b/etal.d/ranger.d/commands.py new file mode 100644 index 0000000..2df405f --- /dev/null +++ b/etal.d/ranger.d/commands.py @@ -0,0 +1,58 @@ +# This is a sample commands.py. You can add your own commands here. +# +# Please refer to commands_full.py for all the default commands and a complete +# documentation. Do NOT add them all here, or you may end up with defunct +# commands when upgrading ranger. + +# You always need to import ranger.api.commands here to get the Command class: +from ranger.api.commands import * + +# A simple command for demonstration purposes follows. +#------------------------------------------------------------------------------ + +# You can import any python module as needed. +import os + +# Any class that is a subclass of "Command" will be integrated into ranger as a +# command. Try typing ":my_edit" in ranger! +class my_edit(Command): + # The so-called doc-string of the class will be visible in the built-in + # help that is accessible by typing "?c" inside ranger. + """:my_edit + + A sample command for demonstration purposes that opens a file in an editor. + """ + + # The execute method is called when you run this command in ranger. + def execute(self): + # self.arg(1) is the first (space-separated) argument to the function. + # This way you can write ":my_edit somefilename". + if self.arg(1): + # self.rest(1) contains self.arg(1) and everything that follows + target_filename = self.rest(1) + else: + # self.fm is a ranger.core.filemanager.FileManager object and gives + # you access to internals of ranger. + # self.fm.thisfile is a ranger.container.file.File object and is a + # reference to the currently selected file. + target_filename = self.fm.thisfile.path + + # This is a generic function to print text in ranger. + self.fm.notify("Let's edit the file " + target_filename + "!") + + # Using bad=True in fm.notify allows you to print error messages: + if not os.path.exists(target_filename): + self.fm.notify("The given file does not exist!", bad=True) + return + + # This executes a function from ranger.core.acitons, a module with a + # variety of subroutines that can help you construct commands. + # Check out the source, or run "pydoc ranger.core.actions" for a list. + self.fm.edit_file(target_filename) + + # The tab method is called when you press tab, and should return a list of + # suggestions that the user will tab through. + def tab(self): + # This is a generic tab-completion function that iterates through the + # content of the current directory. + return self._tab_directory_content() diff --git a/etal.d/ranger.d/rc.conf b/etal.d/ranger.d/rc.conf new file mode 100644 index 0000000..09201f2 --- /dev/null +++ b/etal.d/ranger.d/rc.conf @@ -0,0 +1,580 @@ +# =================================================================== +# This file contains the default startup commands for ranger. +# To change them, it is recommended to create the file +# ~/.config/ranger/rc.conf and add your custom commands there. +# +# If you copy this whole file there, you may want to set the environment +# variable RANGER_LOAD_DEFAULT_RC to FALSE to avoid loading it twice. +# +# The purpose of this file is mainly to define keybindings and settings. +# For running more complex python code, please create a plugin in "plugins/" or +# a command in "commands.py". +# +# Each line is a command that will be run before the user interface +# is initialized. As a result, you can not use commands which rely +# on the UI such as :delete or :mark. +# =================================================================== + +# =================================================================== +# == Options +# =================================================================== + +# How many columns are there, and what are their relative widths? +set column_ratios 1,3,4 + +# Which files should be hidden? (regular expression) +set hidden_filter ^\.|\.(?:pyc|pyo|bak|swp)$|^lost\+found$|^__(py)?cache__$ + +# Show hidden files? You can toggle this by typing 'zh' +set show_hidden false + +# Ask for a confirmation when running the "delete" command? +# Valid values are "always", "never", "multiple" (default) +# With "multiple", ranger will ask only if you delete multiple files at once. +set confirm_on_delete multiple + +# Which script is used to generate file previews? +# ranger ships with scope.sh, a script that calls external programs (see +# README.md for dependencies) to preview images, archives, etc. +set preview_script ~/.config/ranger/scope.sh + +# Use the external preview script or display simple plain text or image previews? +set use_preview_script true + +# Automatically count files in the directory, even before entering them? +set automatically_count_files true + +# Open all images in this directory when running certain image viewers +# like feh or sxiv? You can still open selected files by marking them. +set open_all_images false + +# Be aware of version control systems and display information. +set vcs_aware true + +# State of the three backends git, hg, bzr. The possible states are +# disabled, local (only show local info), enabled (show local and remote +# information). +set vcs_backend_git enabled +set vcs_backend_hg disabled +set vcs_backend_bzr disabled + +# Use one of the supported image preview protocols +set preview_images false + +# Set the preview image method. Supported methods: +# +# * w3m (default): +# Preview images in full color with the external command "w3mimgpreview"? +# This requires the console web browser "w3m" and a supported terminal. +# It has been successfully tested with "xterm" and "urxvt" without tmux. +# +# * iterm2: +# Preview images in full color using iTerm2 image previews +# (http://iterm2.com/images.html). This requires using iTerm2 compiled +# with image preview support. +set preview_images_method w3m + +# Use a unicode "..." character to mark cut-off filenames? +set unicode_ellipsis false + +# Show dotfiles in the bookmark preview box? +set show_hidden_bookmarks true + +# Which colorscheme to use? These colorschemes are available by default: +# default, jungle, snow, solarized +set colorscheme solarized + +# Preview files on the rightmost column? +# And collapse (shrink) the last column if there is nothing to preview? +set preview_files true +set preview_directories true +set collapse_preview true + +# Save the console history on exit? +set save_console_history true + +# Draw the status bar on top of the browser window (default: bottom) +set status_bar_on_top false + +# Draw a progress bar in the status bar which displays the average state of all +# currently running tasks which support progress bars? +set draw_progress_bar_in_status_bar true + +# Draw borders around columns? +set draw_borders true + +# Display the directory name in tabs? +set dirname_in_tabs false + +# Enable the mouse support? +set mouse_enabled true + +# Display the file size in the main column or status bar? +set display_size_in_main_column true +set display_size_in_status_bar true + +# Display files tags in all columns or only in main column? +set display_tags_in_all_columns true + +# Set a title for the window? +set update_title false + +# Set the title to "ranger" in the tmux program? +set update_tmux_title false + +# Shorten the title if it gets long? The number defines how many +# directories are displayed at once, 0 turns off this feature. +set shorten_title 3 + +# Abbreviate $HOME with ~ in the titlebar (first line) of ranger? +set tilde_in_titlebar true + +# How many directory-changes or console-commands should be kept in history? +set max_history_size 20 +set max_console_history_size 200 + +# Try to keep so much space between the top/bottom border when scrolling: +set scroll_offset 8 + +# Flush the input after each key hit? (Noticable when ranger lags) +set flushinput true + +# Padding on the right when there's no preview? +# This allows you to click into the space to run the file. +set padding_right true + +# Save bookmarks (used with mX and `X) instantly? +# This helps to synchronize bookmarks between multiple ranger +# instances but leads to *slight* performance loss. +# When false, bookmarks are saved when ranger is exited. +set autosave_bookmarks true + +# You can display the "real" cumulative size of directories by using the +# command :get_cumulative_size or typing "dc". The size is expensive to +# calculate and will not be updated automatically. You can choose +# to update it automatically though by turning on this option: +set autoupdate_cumulative_size false + +# Turning this on makes sense for screen readers: +set show_cursor false + +# One of: size, natural, basename, atime, ctime, mtime, type, random +set sort basename + +# Additional sorting options +set sort_reverse false +set sort_case_insensitive false +set sort_directories_first true +set sort_unicode false + +# Enable this if key combinations with the Alt Key don't work for you. +# (Especially on xterm) +set xterm_alt_key false + +# Whether to include bookmarks in cd command +set cd_bookmarks true + +# Avoid previewing files larger than this size, in bytes. Use a value of 0 to +# disable this feature. +set preview_max_size 0 + +# Add the highlighted file to the path in the titlebar +set show_selection_in_titlebar true + +# The delay that ranger idly waits for user input, in milliseconds, with a +# resolution of 100ms. Lower delay reduces lag between directory updates but +# increases CPU load. +set idle_delay 2000 + +# When the metadata manager module looks for metadata, should it only look for +# a ".metadata.json" file in the current directory, or do a deep search and +# check all directories above the current one as well? +set metadata_deep_search false + +# =================================================================== +# == Local Options +# =================================================================== +# You can set local options that only affect a single directory. + +# Examples: +setlocal path=~/Downloads sort mtime + +# =================================================================== +# == Command Aliases in the Console +# =================================================================== + +alias e edit +alias q quit +alias q! quitall +alias qa quitall +alias qall quitall +alias setl setlocal + +alias filter scout -prt +alias find scout -aeit +alias mark scout -mr +alias unmark scout -Mr +alias search scout -rs +alias search_inc scout -rts +alias travel scout -aefiklst + +# =================================================================== +# == Define keys for the browser +# =================================================================== + +# Basic +map Q quit! +map q quit +copymap q ZZ ZQ + +map R reload_cwd +map reset +map redraw_window +map abort +map change_mode normal + +map i display_file +map ? help +map W display_log +map w taskview_open +map S shell $SHELL + +map : console +map ; console +map ! console shell%space +map @ console -p6 shell %%s +map # console shell -p%space +map s console shell%space +map r chain draw_possible_programs; console open_with%space +map f console find%space +map cd console cd%space + +# Change the line mode +map Mf linemode filename +map Mi linemode fileinfo +map Mp linemode permissions +map Mt linemode metatitle + +# Tagging / Marking +map t tag_toggle +map ut tag_remove +map " tag_toggle tag=%any +map mark_files toggle=True +map v mark_files all=True toggle=True +map uv mark_files all=True val=False +map V toggle_visual_mode +map uV toggle_visual_mode reverse=True + +# For the nostalgics: Midnight Commander bindings +map help +map display_file +map edit +map copy +map cut +map console mkdir%space +map console delete +map exit + +# In case you work on a keyboard with dvorak layout +map move up=1 +map move down=1 +map move left=1 +map move right=1 +map move to=0 +map move to=-1 +map move down=1 pages=True +map move up=1 pages=True +map move right=1 +#map console delete +map console touch%space + +# VIM-like +copymap k +copymap j +copymap h +copymap l +copymap gg +copymap G +copymap +copymap + +map J move down=0.5 pages=True +map K move up=0.5 pages=True +copymap J +copymap K + +# Jumping around +map H history_go -1 +map L history_go 1 +map ] move_parent 1 +map [ move_parent -1 +map } traverse + +map gh cd ~ +map ge cd /etc +map gu cd /usr +map gd cd /dev +map gl cd -r . +map gL cd -r %f +map go cd /opt +map gv cd /var +map gm cd /media +map gM cd /mnt +map gs cd /srv +map gr cd / +map gR eval fm.cd(ranger.RANGERDIR) +map g/ cd / +map g? cd /usr/share/doc/ranger + +# External Programs +map E edit +map du shell -p du --max-depth=1 -h --apparent-size +map dU shell -p du --max-depth=1 -h --apparent-size | sort -rh +map yp shell -f echo -n %d/%f | xsel -i; xsel -o | xsel -i -b +map yd shell -f echo -n %d | xsel -i; xsel -o | xsel -i -b +map yn shell -f echo -n %f | xsel -i; xsel -o | xsel -i -b + +# Filesystem Operations +map = chmod + +map cw console rename%space +map a rename_append +map A eval fm.open_console('rename ' + fm.thisfile.basename) +map I eval fm.open_console('rename ' + fm.thisfile.basename, position=7) + +map pp paste +map po paste overwrite=True +map pl paste_symlink relative=False +map pL paste_symlink relative=True +map phl paste_hardlink +map pht paste_hardlinked_subtree + +map dD console delete + +map dd cut +map ud uncut +map da cut mode=add +map dr cut mode=remove + +map yy copy +map uy uncut +map ya copy mode=add +map yr copy mode=remove + +# Temporary workarounds +map dgg eval fm.cut(dirarg=dict(to=0), narg=quantifier) +map dG eval fm.cut(dirarg=dict(to=-1), narg=quantifier) +map dj eval fm.cut(dirarg=dict(down=1), narg=quantifier) +map dk eval fm.cut(dirarg=dict(up=1), narg=quantifier) +map ygg eval fm.copy(dirarg=dict(to=0), narg=quantifier) +map yG eval fm.copy(dirarg=dict(to=-1), narg=quantifier) +map yj eval fm.copy(dirarg=dict(down=1), narg=quantifier) +map yk eval fm.copy(dirarg=dict(up=1), narg=quantifier) + +# Searching +map / console search%space +map n search_next +map N search_next forward=False +map ct search_next order=tag +map cs search_next order=size +map ci search_next order=mimetype +map cc search_next order=ctime +map cm search_next order=mtime +map ca search_next order=atime + +# Tabs +map tab_new ~ +map tab_close +map tab_move 1 +map tab_move -1 +map tab_move 1 +map tab_move -1 +map gt tab_move 1 +map gT tab_move -1 +map gn tab_new ~ +map gc tab_close +map uq tab_restore +map tab_open 1 +map tab_open 2 +map tab_open 3 +map tab_open 4 +map tab_open 5 +map tab_open 6 +map tab_open 7 +map tab_open 8 +map tab_open 9 + +# Sorting +map or toggle_option sort_reverse +map oz set sort=random +map os chain set sort=size; set sort_reverse=False +map ob chain set sort=basename; set sort_reverse=False +map on chain set sort=natural; set sort_reverse=False +map om chain set sort=mtime; set sort_reverse=False +map oc chain set sort=ctime; set sort_reverse=False +map oa chain set sort=atime; set sort_reverse=False +map ot chain set sort=type; set sort_reverse=False +map oe chain set sort=extension; set sort_reverse=False + +map oS chain set sort=size; set sort_reverse=True +map oB chain set sort=basename; set sort_reverse=True +map oN chain set sort=natural; set sort_reverse=True +map oM chain set sort=mtime; set sort_reverse=True +map oC chain set sort=ctime; set sort_reverse=True +map oA chain set sort=atime; set sort_reverse=True +map oT chain set sort=type; set sort_reverse=True +map oE chain set sort=extension; set sort_reverse=True + +map dc get_cumulative_size + +# Settings +map zc toggle_option collapse_preview +map zd toggle_option sort_directories_first +map zh toggle_option show_hidden +map toggle_option show_hidden +map zi toggle_option flushinput +map zm toggle_option mouse_enabled +map zp toggle_option preview_files +map zP toggle_option preview_directories +map zs toggle_option sort_case_insensitive +map zu toggle_option autoupdate_cumulative_size +map zv toggle_option use_preview_script +map zf console filter%space + +# Bookmarks +map ` enter_bookmark %any +map ' enter_bookmark %any +map m set_bookmark %any +map um unset_bookmark %any + +map m draw_bookmarks +copymap m um ` ' + +# Generate all the chmod bindings with some python help: +eval for arg in "rwxXst": cmd("map +u{0} shell -f chmod u+{0} %s".format(arg)) +eval for arg in "rwxXst": cmd("map +g{0} shell -f chmod g+{0} %s".format(arg)) +eval for arg in "rwxXst": cmd("map +o{0} shell -f chmod o+{0} %s".format(arg)) +eval for arg in "rwxXst": cmd("map +a{0} shell -f chmod a+{0} %s".format(arg)) +eval for arg in "rwxXst": cmd("map +{0} shell -f chmod u+{0} %s".format(arg)) + +eval for arg in "rwxXst": cmd("map -u{0} shell -f chmod u-{0} %s".format(arg)) +eval for arg in "rwxXst": cmd("map -g{0} shell -f chmod g-{0} %s".format(arg)) +eval for arg in "rwxXst": cmd("map -o{0} shell -f chmod o-{0} %s".format(arg)) +eval for arg in "rwxXst": cmd("map -a{0} shell -f chmod a-{0} %s".format(arg)) +eval for arg in "rwxXst": cmd("map -{0} shell -f chmod u-{0} %s".format(arg)) + +# =================================================================== +# == Define keys for the console +# =================================================================== +# Note: Unmapped keys are passed directly to the console. + +# Basic +cmap eval fm.ui.console.tab() +cmap eval fm.ui.console.tab(-1) +cmap eval fm.ui.console.close() +cmap eval fm.ui.console.execute() +cmap redraw_window + +copycmap +copycmap + +# Move around +cmap eval fm.ui.console.history_move(-1) +cmap eval fm.ui.console.history_move(1) +cmap eval fm.ui.console.move(left=1) +cmap eval fm.ui.console.move(right=1) +cmap eval fm.ui.console.move(right=0, absolute=True) +cmap eval fm.ui.console.move(right=-1, absolute=True) + +# Line Editing +cmap eval fm.ui.console.delete(-1) +cmap eval fm.ui.console.delete(0) +cmap eval fm.ui.console.delete_word() +cmap eval fm.ui.console.delete_rest(1) +cmap eval fm.ui.console.delete_rest(-1) +cmap eval fm.ui.console.paste() + +# And of course the emacs way +copycmap +copycmap +copycmap +copycmap +copycmap +copycmap +copycmap +copycmap + +# Note: There are multiple ways to express backspaces. (code 263) +# and (code 127). To be sure, use both. +copycmap + +# This special expression allows typing in numerals: +cmap false + +# =================================================================== +# == Pager Keybindings +# =================================================================== + +# Movement +pmap pager_move down=1 +pmap pager_move up=1 +pmap pager_move left=4 +pmap pager_move right=4 +pmap pager_move to=0 +pmap pager_move to=-1 +pmap pager_move down=1.0 pages=True +pmap pager_move up=1.0 pages=True +pmap pager_move down=0.5 pages=True +pmap pager_move up=0.5 pages=True + +copypmap k +copypmap j +copypmap h +copypmap l +copypmap g +copypmap G +copypmap d +copypmap u +copypmap n f +copypmap p b + +# Basic +pmap redraw_window +pmap pager_close +copypmap q Q i +pmap E edit_file + +# =================================================================== +# == Taskview Keybindings +# =================================================================== + +# Movement +tmap taskview_move up=1 +tmap taskview_move down=1 +tmap taskview_move to=0 +tmap taskview_move to=-1 +tmap taskview_move down=1.0 pages=True +tmap taskview_move up=1.0 pages=True +tmap taskview_move down=0.5 pages=True +tmap taskview_move up=0.5 pages=True + +copytmap k +copytmap j +copytmap g +copytmap G +copytmap u +copytmap n f +copytmap p b + +# Changing priority and deleting tasks +tmap J eval -q fm.ui.taskview.task_move(-1) +tmap K eval -q fm.ui.taskview.task_move(0) +tmap dd eval -q fm.ui.taskview.task_remove() +tmap eval -q fm.ui.taskview.task_move(-1) +tmap eval -q fm.ui.taskview.task_move(0) +tmap eval -q fm.ui.taskview.task_remove() + +# Basic +tmap redraw_window +tmap taskview_close +copytmap q Q w diff --git a/etal.d/ranger.d/rifle.conf b/etal.d/ranger.d/rifle.conf new file mode 100644 index 0000000..d8d7110 --- /dev/null +++ b/etal.d/ranger.d/rifle.conf @@ -0,0 +1,197 @@ +# vim: ft=cfg +# +# This is the configuration file of "rifle", ranger's file executor/opener. +# Each line consists of conditions and a command. For each line the conditions +# are checked and if they are met, the respective command is run. +# +# Syntax: +# , , ... = command +# +# The command can contain these environment variables: +# $1-$9 | The n-th selected file +# $@ | All selected files +# +# If you use the special command "ask", rifle will ask you what program to run. +# +# Prefixing a condition with "!" will negate its result. +# These conditions are currently supported: +# match | The regexp matches $1 +# ext | The regexp matches the extension of $1 +# mime | The regexp matches the mime type of $1 +# name | The regexp matches the basename of $1 +# path | The regexp matches the absolute path of $1 +# has | The program is installed (i.e. located in $PATH) +# env | The environment variable "variable" is non-empty +# file | $1 is a file +# directory | $1 is a directory +# number | change the number of this command to n +# terminal | stdin, stderr and stdout are connected to a terminal +# X | $DISPLAY is not empty (i.e. Xorg runs) +# +# There are also pseudo-conditions which have a "side effect": +# flag | Change how the program is run. See below. +# label