From f167ebb4a12d8645c8a12d51c2ecbcbb0e982481 Mon Sep 17 00:00:00 2001 From: James Patrick Date: Wed, 20 Nov 2019 17:24:15 -0500 Subject: [PATCH 01/20] Grouped commands, plugins, and themes. Basically just relocated the command out of the middle of the plugins. --- zsh/zplug | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/zsh/zplug b/zsh/zplug index 16eb68a..f3e685b 100644 --- a/zsh/zplug +++ b/zsh/zplug @@ -2,6 +2,18 @@ source ${ZPLUG_HOME}/init.zsh +zplug "junegunn/fzf-bin", \ + from:gh-r, \ + as:command, \ + rename-to:fzf + +zplug "zdharma/zsh-diff-so-fancy", \ + as:command, \ + use:"bin/{git-dsf,diff-so-fancy}" + +zplug "${ZDIR}/modules/bin/", \ + as:command, \ + use:"*" zplug "zdharma/fast-syntax-highlighting", \ as:plugin, \ defer:2 @@ -24,17 +36,6 @@ zplug "junegunn/fzf", \ use:"shell/*.zsh", \ defer:2 -zplug "junegunn/fzf-bin", \ - from:gh-r, \ - as:command, \ - rename-to:fzf - -zplug "zdharma/zsh-diff-so-fancy", \ - as:command, \ - use:"bin/{git-dsf,diff-so-fancy}" - -zplug "${ZDIR}/modules/bin/", \ - as:command, \ use:"*" zplug "${ZDIR}/modules/history/", \ From 5f28729298601a3b2b2ae49efd3402f732f6a28b Mon Sep 17 00:00:00 2001 From: James Patrick Date: Fri, 22 Nov 2019 14:52:45 -0500 Subject: [PATCH 02/20] A push over script that doesn't hardcode tokens. --- zsh/modules/bin/tellme | 44 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100755 zsh/modules/bin/tellme diff --git a/zsh/modules/bin/tellme b/zsh/modules/bin/tellme new file mode 100755 index 0000000..e26734e --- /dev/null +++ b/zsh/modules/bin/tellme @@ -0,0 +1,44 @@ +#! /bin/bash + +# Load config file if it exist. +export CONFIG=${XDG_CONFIG_HOME:-~/.config}/tellme/creds +[ -f $CONFIG ] && export $(grep -v '^#' $CONFIG | xargs) + +usage(){ + echo "You have to tell me something" + exit -1 +} + +setup(){ + echo "It doesn't look like I've been setup yet. I will need the Application & User tokens." + read -r -p " Application Token: " APPLICATION_TOKEN + read -r -p " User Token: " USER_TOKEN + mkdir -p $(dirname $CONFIG) + cat <<-EOF > $CONFIG + application_token=$APPLICATION_TOKEN + user_token=$USER_TOKEN + EOF + chmod 600 $CONFIG + echo "Config setup at $CONFIG" + echo +} + +if [[ -z $application_token || -z $user_token ]] ; then + setup + export $(grep -v '^#' $CONFIG | xargs) +fi + +if [[ $# -eq 0 ]] ; then + usage +fi + +message=$@ +curl -s \ + --form-string "token=$application_token" \ + --form-string "user=$user_token" \ + --form-string "message=$message" \ + https://api.pushover.net/1/messages.json 1>/dev/null + +[[ $? -eq 0 ]] && echo "message sent" || echo "ERROR SENDING NOTIFICATION" + +printf '\a' #Rings bell From 569598683e198704cfb02b9832b5972df532ea4d Mon Sep 17 00:00:00 2001 From: James Patrick Date: Fri, 22 Nov 2019 14:53:31 -0500 Subject: [PATCH 03/20] Fixed bad XDG CONFIG value. Not sure why I thought it would be DIR instead of HOME but I blame poorly executed theft. --- lib/shared.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/shared.mk b/lib/shared.mk index 1dcdb98..a2459de 100644 --- a/lib/shared.mk +++ b/lib/shared.mk @@ -15,7 +15,7 @@ return_val_truthy := && echo true || echo false cmd_exist = $(shell (($$+commands[$1])) $(return_val_truthy) ) # Shortcut for the XDG dir if it exist. default to ~/.confg -XDG_DIR := $${XDG_CONFIG_DIR:-~/.config} +XDG_DIR := $${XDG_CONFIG_HOME:-~/.config} # Some things will OS specific. # With this you can use `$(IS_MAC) && echo "I'm a Mac" || echo "I'm not a Mac"` From a44bfd1a6e462be156442d22823442a4d7b03f27 Mon Sep 17 00:00:00 2001 From: James Patrick Date: Fri, 22 Nov 2019 14:55:05 -0500 Subject: [PATCH 04/20] Specified as and defer tags for autoenv. --- zsh/zplug | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/zsh/zplug b/zsh/zplug index f3e685b..666468f 100644 --- a/zsh/zplug +++ b/zsh/zplug @@ -26,7 +26,9 @@ zplug "zsh-users/zsh-history-substring-search", \ as:plugin, \ defer:2 -zplug "zpm-zsh/autoenv" +zplug "zpm-zsh/autoenv", \ + as:plugin, \ + defer:2 zplug "zsh-users/zsh-autosuggestions", \ as:plugin, \ From 73c40c8e4b4f00379f11f702a06c7f9047cfb0b4 Mon Sep 17 00:00:00 2001 From: James Patrick Date: Fri, 22 Nov 2019 14:56:38 -0500 Subject: [PATCH 05/20] Formatting --- zsh/modules/bin/tellme | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/zsh/modules/bin/tellme b/zsh/modules/bin/tellme index e26734e..0de3437 100755 --- a/zsh/modules/bin/tellme +++ b/zsh/modules/bin/tellme @@ -1,7 +1,8 @@ #! /bin/bash -# Load config file if it exist. export CONFIG=${XDG_CONFIG_HOME:-~/.config}/tellme/creds + +# Load config file if it exist. [ -f $CONFIG ] && export $(grep -v '^#' $CONFIG | xargs) usage(){ From a1e365546beda35f9440dba79eda5372dcaf36e6 Mon Sep 17 00:00:00 2001 From: James Patrick Date: Fri, 22 Nov 2019 14:57:08 -0500 Subject: [PATCH 06/20] Tellme script can now tell if post failed. This is a very fragile implementation of this, but I didn't want to add any dependencies to this script since I want it to be able to portable above all else. If anyone has a better solution I would love to hear it. --- zsh/modules/bin/tellme | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/zsh/modules/bin/tellme b/zsh/modules/bin/tellme index 0de3437..48fe3e2 100755 --- a/zsh/modules/bin/tellme +++ b/zsh/modules/bin/tellme @@ -38,7 +38,8 @@ curl -s \ --form-string "token=$application_token" \ --form-string "user=$user_token" \ --form-string "message=$message" \ - https://api.pushover.net/1/messages.json 1>/dev/null + https://api.pushover.net/1/messages.json \ + | grep "\"status\":1," 1>/dev/null [[ $? -eq 0 ]] && echo "message sent" || echo "ERROR SENDING NOTIFICATION" From 9b48fc991c28ee9608b3eac9843a9544702ef020 Mon Sep 17 00:00:00 2001 From: James Patrick Date: Mon, 25 Nov 2019 12:18:31 -0500 Subject: [PATCH 07/20] Fixed inverted logic. --- zsh/modules/tmux/init.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zsh/modules/tmux/init.zsh b/zsh/modules/tmux/init.zsh index 7aabe74..30f6d23 100644 --- a/zsh/modules/tmux/init.zsh +++ b/zsh/modules/tmux/init.zsh @@ -6,7 +6,7 @@ if (( ! $+commands[tmux] )); then fi # If running as root, stop and return. -if [ "$EUID" -ne 0 ] ; then +if [ "$EUID" -eq 0 ] ; then return 0 fi From e1acc457cdf6916c21a5e35ca82e029ef4eaf323 Mon Sep 17 00:00:00 2001 From: James Patrick Date: Mon, 25 Nov 2019 12:20:54 -0500 Subject: [PATCH 08/20] Added fix for shell scripts. --- zsh/zplug | 1 + 1 file changed, 1 insertion(+) mode change 100644 => 100755 zsh/zplug diff --git a/zsh/zplug b/zsh/zplug old mode 100644 new mode 100755 index 16eb68a..47daf6a --- a/zsh/zplug +++ b/zsh/zplug @@ -34,6 +34,7 @@ zplug "zdharma/zsh-diff-so-fancy", \ use:"bin/{git-dsf,diff-so-fancy}" zplug "${ZDIR}/modules/bin/", \ + from:local, \ as:command, \ use:"*" From 3f28364a66deca3b8405814dd2ba3997b519af2d Mon Sep 17 00:00:00 2001 From: James Patrick Date: Mon, 25 Nov 2019 12:23:38 -0500 Subject: [PATCH 09/20] Added Farge --- sway/config | 2 ++ sway/config.d/keybinds | 6 ++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sway/config b/sway/config index 111ad8b..ce012d8 100644 --- a/sway/config +++ b/sway/config @@ -2,6 +2,7 @@ # # Logo key. Use Mod1 for Alt. set $mod Mod4 +set $ctrl Control # Home row direction keys, like vim set $left h set $down j @@ -21,6 +22,7 @@ set $PIP floating enabled ; sticky enabled ; border pixel 0 for_window [class="mpv"] $PIP for_window [class="pip"] $PIP for_window [window_role="PictureInPicture"] $PIP +for_window [class="feh"] floating enabled ; border pixel 0 # Status Bar: bar { diff --git a/sway/config.d/keybinds b/sway/config.d/keybinds index cfb9207..a1b2837 100644 --- a/sway/config.d/keybinds +++ b/sway/config.d/keybinds @@ -67,11 +67,9 @@ bindsym $mod+Shift+8 move container to workspace 8 bindsym $mod+Shift+9 move container to workspace 9 bindsym $mod+Shift+0 move container to workspace 10 -#bindsym $mod+print exec file=~/Pictures/Screenshots/Screenshot-$(date '+%Y%m%d%H%M%S').mp4 \ -## && wf-recorder -g "$(slurp)" $file \ -## && wl-copy $file \ -## && notify-send -i $file "File copied to clipboard" +# Printscreen functions bindsym print exec $printscreen +bindsym $ctrl+print exec farge ################################################################################ # Layout stuff: From 8cb599fe454ad4129d297529554ffd3cbd5a72af Mon Sep 17 00:00:00 2001 From: James Patrick Date: Mon, 25 Nov 2019 12:27:41 -0500 Subject: [PATCH 10/20] updated linux tts for firefox. Adjusted speed and voice used. --- tridactyl/scripts/speak | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tridactyl/scripts/speak b/tridactyl/scripts/speak index c5e4aab..9d47c29 100755 --- a/tridactyl/scripts/speak +++ b/tridactyl/scripts/speak @@ -7,10 +7,10 @@ case "$OSTYPE" in ;; linux*) mimic \ - --setf duration_stretch=0.5 \ + --setf duration_stretch=0.65 \ -t "$message" \ - -voice 'slt_hts' - #-voice 'kal16' + -voice 'kal16' + #-voice 'slt' ;; *) echo "unsupported OS" From 68ef4c68f3b92b2b20a61827c9dd91fc4d022e93 Mon Sep 17 00:00:00 2001 From: James Patrick Date: Sun, 1 Dec 2019 15:54:52 -0500 Subject: [PATCH 11/20] Added tab complete for company & fuzzy for helm. --- emacs/doom.d/init.el | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/emacs/doom.d/init.el b/emacs/doom.d/init.el index 6992034..9b8a3a1 100644 --- a/emacs/doom.d/init.el +++ b/emacs/doom.d/init.el @@ -13,10 +13,11 @@ ;;japanese :completion - (company ; the ultimate code completion backend - +childframe - ) - helm ; the *other* search engine for love and life + (company ; the ultimate code completion backend. + +childframe ; Use company-box. + +tng) ; Compnay on tab. + (helm ; because sometimes I prefer what I know. + +fuzzy) ; woh typse aynthing write teh first time. ;;ido ; the other *other* search engine... ;;(ivy ; a search engine for love and life ;; +fuzzy From b611b563528d1f7454e7c71b14639a849d620412 Mon Sep 17 00:00:00 2001 From: James Patrick Date: Sun, 1 Dec 2019 15:59:33 -0500 Subject: [PATCH 12/20] Add editconfig and make support. --- emacs/doom.d/init.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/emacs/doom.d/init.el b/emacs/doom.d/init.el index 9b8a3a1..6c231b6 100644 --- a/emacs/doom.d/init.el +++ b/emacs/doom.d/init.el @@ -79,7 +79,7 @@ ;;debugger ; FIXME stepping through code, to help you add bugs ;;direnv ;;docker - ;;editorconfig ; let someone else argue about tabs vs spaces + editorconfig ; let someone else argue about tabs vs spaces ;;ein ; tame Jupyter notebooks with emacs eval ; run code, run (also, repls) flycheck ; tasing you for every semicolon you forget @@ -90,7 +90,7 @@ ;;lsp ;;macos ; MacOS-specific commands magit ; a git porcelain for Emacs - ;;make ; run make tasks from Emacs + make ; run make tasks from Emacs ;;pass ; password manager for nerds ;;pdf ; pdf enhancements ;;prodigy ; FIXME managing external services & code builders From 2cd660a4e98101252c4e63e94c2f028c4a6937e7 Mon Sep 17 00:00:00 2001 From: James Patrick Date: Sun, 1 Dec 2019 16:02:10 -0500 Subject: [PATCH 13/20] Formatting. --- emacs/doom.d/init.el | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/emacs/doom.d/init.el b/emacs/doom.d/init.el index 6c231b6..252cc3f 100644 --- a/emacs/doom.d/init.el +++ b/emacs/doom.d/init.el @@ -20,8 +20,7 @@ +fuzzy) ; woh typse aynthing write teh first time. ;;ido ; the other *other* search engine... ;;(ivy ; a search engine for love and life - ;; +fuzzy - ;;) + ;; +fuzzy) :ui deft ; notational velocity for Emacs @@ -36,8 +35,8 @@ ;;neotree ; a project drawer, like NERDTree for vim ophints ; highlight the region an operation acts on (popup ; tame sudden yet inevitable temporary windows - +all ; catch all popups that start with an asterix - +defaults) ; default popup rules + +all ; catch all popups that start with an asterix + +defaults) ; default popup rules (pretty-code ; replace bits of code with pretty symbols +fira) ; I use firaCode or FiraCode derivatives everywhere, all the time. ;;tabbar ; FIXME an (incomplete) tab bar for Emacs @@ -62,9 +61,8 @@ :emacs (dired ; making dired pretty [functional] - +ranger ; bringing the goodness of ranger to dired - +icons ; colorful icons for dired-mode - ) + +ranger ; bringing the goodness of ranger to dired + +icons) ; colorful icons for dired-mode electric ; smarter, keyword-based electric-indent vc ; version-control and Emacs, sitting in a tree @@ -72,8 +70,8 @@ ;;eshell ; a consistent, cross-platform shell (WIP) ;;shell ; a terminal REPL for Emacs ;;term ; terminals in Emacs - ;;vterm ; another terminals in Emacs - + vterm ; another terminals in Emacs + :tools ;;ansible ;;debugger ; FIXME stepping through code, to help you add bugs @@ -86,7 +84,7 @@ flyspell ; tasing you for misspelling mispelling ;;gist ; interacting with github gists (lookup ; helps you navigate your code and documentation - +docsets) ; ...or in Dash docsets locally + +docsets) ; ...or in Dash docsets locally ;;lsp ;;macos ; MacOS-specific commands magit ; a git porcelain for Emacs @@ -132,10 +130,10 @@ ;;nix ; I hereby declare "nix geht mehr!" ;;ocaml ; an objective camel (org ; organize your plain life in plain text - +dragndrop ; file drag & drop support - +ipython ; ipython support for babel - +pandoc ; pandoc integration into org's exporter - +present) ; using Emacs for presentations + +dragndrop ; file drag & drop support + +ipython ; ipython support for babel + +pandoc ; pandoc integration into org's exporter + +present) ; using Emacs for presentations ;;perl ; write code no one else can comprehend ;;php ; perl's insecure younger brother ;;plantuml ; diagrams for confusing people more From 328a525afddcd54135f9645b3b5ebda423a49fff Mon Sep 17 00:00:00 2001 From: James Patrick Date: Mon, 2 Dec 2019 10:05:32 -0500 Subject: [PATCH 14/20] Switched from update and upgrade to just refresh. Upgrade and update (which is a bit redundant as upgrade does an update.) take a prohibitively long time on both of my machines. Instead I'll manually manage that and just use refresh instead. --- emacs/makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/emacs/makefile b/emacs/makefile index 9671875..f2e4c32 100644 --- a/emacs/makefile +++ b/emacs/makefile @@ -51,8 +51,7 @@ update: ifeq ($(shell [ -e $(EMACSD) ] $(return_val_truthy) ), false) $(report) info "Emacs directory doesn't exist." else ifeq ($(FRAMEWORK), doom) - ~/.emacs.d/bin/doom --yes update - ~/.emacs.d/bin/doom --yes upgrade + ~/.emacs.d/bin/doom --yes refresh $(report) info "Doom updated" else cd $(EMACSD) \ From b21a6d9726a54a662c1d969e80e6d98598ad4c2c Mon Sep 17 00:00:00 2001 From: James Patrick Date: Wed, 4 Dec 2019 00:58:16 -0500 Subject: [PATCH 15/20] Updated readme for project --- README.md | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 557db03..cf0b27e 100644 --- a/README.md +++ b/README.md @@ -1 +1,18 @@ -Hello World +Hi. This is James Patrick's current collection of dotfiles. If you found this +feel free to steal what ever you want, if you have any questions feel free to +contact me. + +# Tenants + +1. The time invested in configuring tools will probably never be recouped by + increased productivity. That isn't a reason not to it. +2. Don't write what already exist. +3. Config to have easy setup and tear down, without destroying anything important. +4. Try to stay lean. More tools begets more maintenance. + 1. The best code is no code. + 2. Its better to have a imperfect tool than to have envs diverge. + 3. Allow for variation between envs. +5. Any rule can be ignored if it has a non-stupid reason. +6. Take lots of screenshots. +7. Don't be a idiot and store large files +8. Do not tightly couple components. From cdfb5e7f3e703edbc598c8748e3c6bbe853ba6a2 Mon Sep 17 00:00:00 2001 From: James Patrick Date: Sun, 1 Dec 2019 23:29:04 -0500 Subject: [PATCH 16/20] Added projectile base dir. --- emacs/doom.d/config.el | 3 +++ 1 file changed, 3 insertions(+) diff --git a/emacs/doom.d/config.el b/emacs/doom.d/config.el index abf6220..d8e0756 100644 --- a/emacs/doom.d/config.el +++ b/emacs/doom.d/config.el @@ -15,4 +15,7 @@ ;; Deft: Set path to Org-mope Directory (setq deft-directory "~/org/") +;; Have projectile automatically check code. +(setq projectile-project-search-path '("~/code/") + (setq doom-localleader-key ",") From 15442e30f0e8fe5c8a99997afbc3dbe22d6ed775 Mon Sep 17 00:00:00 2001 From: James Patrick Date: Sun, 1 Dec 2019 23:29:44 -0500 Subject: [PATCH 17/20] Experimenting with LSPs. --- emacs/doom.d/init.el | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/emacs/doom.d/init.el b/emacs/doom.d/init.el index 252cc3f..9aaf1fe 100644 --- a/emacs/doom.d/init.el +++ b/emacs/doom.d/init.el @@ -85,14 +85,14 @@ ;;gist ; interacting with github gists (lookup ; helps you navigate your code and documentation +docsets) ; ...or in Dash docsets locally - ;;lsp + lsp ;;macos ; MacOS-specific commands magit ; a git porcelain for Emacs make ; run make tasks from Emacs ;;pass ; password manager for nerds ;;pdf ; pdf enhancements ;;prodigy ; FIXME managing external services & code builders - ;;rgb ; creating color strings + ;rgb ; creating color strings ;;terraform ; infrastructure as code ;;tmux ; an API for interacting with tmux ;;upload ; map local to remote projects via ssh/ftp @@ -132,8 +132,9 @@ (org ; organize your plain life in plain text +dragndrop ; file drag & drop support +ipython ; ipython support for babel + +gnuplot ; plot suff +pandoc ; pandoc integration into org's exporter - +present) ; using Emacs for presentations + +pomodoro) ; Because timers are helpful. ;;perl ; write code no one else can comprehend ;;php ; perl's insecure younger brother ;;plantuml ; diagrams for confusing people more @@ -145,11 +146,12 @@ ruby ; 1.step {|i| p "Ruby is #{i.even? ? 'love' : 'life'}"} ;;rust ; Fe2O3.unwrap().unwrap().unwrap().unwrap() ;;scala ; java, but good - sh ; she sells {ba,z,fi}sh shells on the C xor + (sh ; she sells {ba,z,fi}sh shells on the C xor + +lsp) ; this is somehow a thing? ;;solidity ; do you need a blockchain? No. ;;swift ; who asked for emoji variables? ;;terra ; Earth and Moon in alignment for performance. - web ; the tubes + (web +lsp) ; the tubes ;;vala ; GObjective-C :email From 578b14331f81be5bdc0738cdf5662fc75dd5b05c Mon Sep 17 00:00:00 2001 From: James Patrick Date: Wed, 11 Dec 2019 00:52:23 -0500 Subject: [PATCH 18/20] Added emacs modeline like feature. --- lib/helper/mk_link | 3 +++ lib/helper/report | 2 ++ lib/helper/rm_link | 2 ++ lib/post-merge | 2 ++ rofi/scripts/btctl | 1 + rofi/scripts/media_controls | 1 + rofi/scripts/power_menu | 1 + sway/scripts/import_gsetting | 1 + sway/scripts/menu | 1 + sway/scripts/menu_clipman | 1 + sway/scripts/menu_gopass | 3 ++- sway/scripts/printscreen | 3 ++- sway/scripts/sanitize_wob | 2 ++ tridactyl/scripts/speak | 1 + 14 files changed, 22 insertions(+), 2 deletions(-) diff --git a/lib/helper/mk_link b/lib/helper/mk_link index 50a3197..15ce8c6 100755 --- a/lib/helper/mk_link +++ b/lib/helper/mk_link @@ -1,4 +1,6 @@ #! env zsh +# -*- sh -*- + REPORT=`dirname $0`/report if [ -z "$1" ] || [ -z "$2" ] ; then @@ -12,3 +14,4 @@ if [[ -e $2 ]] ; then fi $REPORT info "Symlinked `ln -svf $1 $2`" + diff --git a/lib/helper/report b/lib/helper/report index 2ac3318..758c0b0 100755 --- a/lib/helper/report +++ b/lib/helper/report @@ -1,4 +1,5 @@ #! env zsh +# -*- sh -*- R='\033[0;31m' Y='\033[0;33m' G='\033[0;32m' @@ -21,3 +22,4 @@ if [[ -z $2 ]] ; then else format $1 $2 fi + diff --git a/lib/helper/rm_link b/lib/helper/rm_link index fa951d4..2aa1c6a 100755 --- a/lib/helper/rm_link +++ b/lib/helper/rm_link @@ -1,4 +1,5 @@ #! env zsh +# -*- sh -*- REPORT=`dirname $0`/report if [[ -z $1 ]] ; then @@ -18,3 +19,4 @@ fi $REPORT info "Deleting $1" rm $1 + diff --git a/lib/post-merge b/lib/post-merge index 075e5b4..7e248b5 100755 --- a/lib/post-merge +++ b/lib/post-merge @@ -1,4 +1,5 @@ #!/bin/sh +# -*- zsh -*- local_hook="$HOME"/.git_template.local/hooks/post-merge [ -f "$local_hook" ] && . "$local_hook" @@ -6,3 +7,4 @@ local_hook="$HOME"/.git_template.local/hooks/post-merge .git/hooks/ctags >/dev/null 2>&1 & make update + diff --git a/rofi/scripts/btctl b/rofi/scripts/btctl index 2da5d6b..741605b 100755 --- a/rofi/scripts/btctl +++ b/rofi/scripts/btctl @@ -1,4 +1,5 @@ #!/usr/bin/env bash +# -*- sh -*- # cmds=($(bluetoothctl help | cut -d' ' -f1 | sed 's/[\x01-\x1F\x7F]//g' | sed 's/\[[0-9];[0-9]\+m//g')) # unset "cmds[2]" diff --git a/rofi/scripts/media_controls b/rofi/scripts/media_controls index c0fc4c4..ba18b0e 100755 --- a/rofi/scripts/media_controls +++ b/rofi/scripts/media_controls @@ -1,4 +1,5 @@ #!/usr/bin/env bash +# -*- sh -*- STATUS="$(playerctl status)" MSG="$(playerctl metadata --format '{{xesam:title}} - {{xesam:artist}}')" diff --git a/rofi/scripts/power_menu b/rofi/scripts/power_menu index c1c673d..5f66a9e 100755 --- a/rofi/scripts/power_menu +++ b/rofi/scripts/power_menu @@ -1,4 +1,5 @@ #!/usr/bin/env bash +# -*- sh -*- OPTIONS=" Lock 鈴 Sleep diff --git a/sway/scripts/import_gsetting b/sway/scripts/import_gsetting index 93fb35c..aa654b4 100755 --- a/sway/scripts/import_gsetting +++ b/sway/scripts/import_gsetting @@ -1,4 +1,5 @@ #! /bin/sh +# -*- sh -*- # Lifted from https://github.com/swaywm/sway/wiki/GTK-3-settings-on-Wayland # usage: import-gsettings : : ... diff --git a/sway/scripts/menu b/sway/scripts/menu index aa6f65f..67f38a2 100755 --- a/sway/scripts/menu +++ b/sway/scripts/menu @@ -1,4 +1,5 @@ #! /bin/sh +# -*- sh -*- rofi \ -show drun \ -p run \ diff --git a/sway/scripts/menu_clipman b/sway/scripts/menu_clipman index 2448948..37fd91c 100755 --- a/sway/scripts/menu_clipman +++ b/sway/scripts/menu_clipman @@ -1,2 +1,3 @@ #! /bin/sh +# -*- sh -*- clipman --selector="rofi" --select diff --git a/sway/scripts/menu_gopass b/sway/scripts/menu_gopass index 8abea02..352fe0c 100755 --- a/sway/scripts/menu_gopass +++ b/sway/scripts/menu_gopass @@ -1,4 +1,5 @@ #! /bin/sh +# -*- sh -*- gopass ls --flat \ | rofi -dmenu -p pass -i \ - | xargs --no-run-if-empty gopass show -c \ No newline at end of file + | xargs --no-run-if-empty gopass show -c diff --git a/sway/scripts/printscreen b/sway/scripts/printscreen index e75fec1..b01c230 100755 --- a/sway/scripts/printscreen +++ b/sway/scripts/printscreen @@ -1,6 +1,7 @@ #! /bin/sh +# -*- sh -*- file=~/Pictures/Screenshots/Screenshot-$(date '+%Y%m%d%H%M%S').png grim -g "$(slurp)" $file \ && wl-copy $file \ - && notify-send -i $file "File copied to clipboard" \ No newline at end of file + && notify-send -i $file "File copied to clipboard" diff --git a/sway/scripts/sanitize_wob b/sway/scripts/sanitize_wob index 8e257de..80b86b9 100755 --- a/sway/scripts/sanitize_wob +++ b/sway/scripts/sanitize_wob @@ -1,4 +1,6 @@ #!/bin/bash +# -*- sh -*- +# while read IN do [[ ! $IN =~ ^[+-]?[0-9]+$ ]] && IN=0 diff --git a/tridactyl/scripts/speak b/tridactyl/scripts/speak index 9d47c29..5e7f794 100755 --- a/tridactyl/scripts/speak +++ b/tridactyl/scripts/speak @@ -1,4 +1,5 @@ #!/bin/bash +# -*- sh -*- message="$@" case "$OSTYPE" in From 1bc305b48ee36c0d904f2a397713a4bdd900f054 Mon Sep 17 00:00:00 2001 From: James Patrick Date: Wed, 11 Dec 2019 00:52:41 -0500 Subject: [PATCH 19/20] Added missing semicolon to theme. --- tridactyl/themes/onedark.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tridactyl/themes/onedark.css b/tridactyl/themes/onedark.css index 3be25b0..be64698 100644 --- a/tridactyl/themes/onedark.css +++ b/tridactyl/themes/onedark.css @@ -130,7 +130,7 @@ .TridactylStatusIndicator { background: var(--tridactyl-bg) !important; border: 1px var(--base0B) solid !important; - color: var(--base0B) + color: var(--base0B); border: unset !important; bottom: 0 !important; font-size: 12pt !important; From 0edd5d513a45f866dded7a61b7fa5edf195ea1ba Mon Sep 17 00:00:00 2001 From: James Patrick Date: Wed, 11 Dec 2019 00:53:01 -0500 Subject: [PATCH 20/20] Adding public key system to update script. There should be no issue with this. The SSH server will already advertise the keys to all connecting instances. --- ssh/makefile | 12 +++++++++--- ssh/public_keys/zuk/git.jpatrick.io.pub | 1 + ssh/public_keys/zuk/id_ed25519.pub | 1 + ssh/public_keys/zuk/jpatrick.io.pub | 1 + 4 files changed, 12 insertions(+), 3 deletions(-) create mode 100644 ssh/public_keys/zuk/git.jpatrick.io.pub create mode 100644 ssh/public_keys/zuk/id_ed25519.pub create mode 100644 ssh/public_keys/zuk/jpatrick.io.pub diff --git a/ssh/makefile b/ssh/makefile index 0face91..f49e34e 100644 --- a/ssh/makefile +++ b/ssh/makefile @@ -1,6 +1,6 @@ SRC_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))) -SOURCE := $(SRC_DIR)/config -TARGET := ~/.ssh/config +CONFIG_SRC := $(SRC_DIR)/config +CONFIG_TRGT := ~/.ssh/config JPATRICK_KEY := ~/.ssh/git.jpatrick.io include ../lib/shared.mk @@ -9,10 +9,16 @@ install: | init update init: $(info => Setting up ssh) - $(mk_link) $(SOURCE) $(TARGET) + $(mk_link) $(CONFIG_SRC) $(CONFIG_TRGT) + $(mk_link) $(SRC_DIR)/public_keys ~/.ssh/public_keys $(MAKE) -C $(SRC_DIR) init_jpatrick_key update: + cd ~/.ssh \ + && mkdir -p public_keys/`hostname` \ + && for i in *.pub ; do ; \ + cp $$i public_keys/`hostname`/$$i ; \ + done remove: $(info => Remvoing ssh) diff --git a/ssh/public_keys/zuk/git.jpatrick.io.pub b/ssh/public_keys/zuk/git.jpatrick.io.pub new file mode 100644 index 0000000..79cbfaa --- /dev/null +++ b/ssh/public_keys/zuk/git.jpatrick.io.pub @@ -0,0 +1 @@ +ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHc429ju3N/DoIe7r4F35asaZeNv6/ZWPGXlQiEHUMtf zuk Tue Apr 16 21:54:38 EDT 2019 diff --git a/ssh/public_keys/zuk/id_ed25519.pub b/ssh/public_keys/zuk/id_ed25519.pub new file mode 100644 index 0000000..2924838 --- /dev/null +++ b/ssh/public_keys/zuk/id_ed25519.pub @@ -0,0 +1 @@ +ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIC9pheTZRF6Yo2Od0b8CyxLuazodEtB/5oAEDei8cBvi zuk: Sun 10 Nov 2019 11:50:45 AM EST diff --git a/ssh/public_keys/zuk/jpatrick.io.pub b/ssh/public_keys/zuk/jpatrick.io.pub new file mode 100644 index 0000000..ea0e8ff --- /dev/null +++ b/ssh/public_keys/zuk/jpatrick.io.pub @@ -0,0 +1 @@ +ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICmLHzD7WneJQEHCNgT5k/4wa8rM07yQVu8w7nH3dNU5 zuk: 20190430235108