From b84ab65b936e34e1c8094a0386eec1c544270a3a Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Fri, 18 Nov 2016 16:18:22 -0600 Subject: [PATCH 1/7] Fix tasks_from_directory --- dotfiles/lib/python/imalison.py | 24 ++++++++++++------------ tasks/imalison.py | 1 + 2 files changed, 13 insertions(+), 12 deletions(-) create mode 120000 tasks/imalison.py diff --git a/dotfiles/lib/python/imalison.py b/dotfiles/lib/python/imalison.py index 3ea633e8..28127eb2 100644 --- a/dotfiles/lib/python/imalison.py +++ b/dotfiles/lib/python/imalison.py @@ -29,14 +29,14 @@ def command_exists(command, run=run): def build_task_factory(ns): - def task(function): - ns.add_task(ctask(function)) + def task(function, *args, **kwargs): + ns.add_task(ctask(function, *args, **kwargs)) return function return task -def namespace_and_factory(): - ns = Collection() +def namespace_and_factory(*args, **kwargs): + ns = Collection(*args, **kwargs) return ns, build_task_factory(ns) @@ -48,17 +48,17 @@ def extension_checker(extension): def tasks_from_directory(directory_path, file_predicate=extension_checker("sh")): - ns, make_task = namespace_and_factory() - + ns, make_task = namespace_and_factory(os.path.basename(directory_path)) def task_from_file(filepath): - @make_task() def run_script(ctx): ctx.run(filepath) - return run_script + return make_task(run_script, name=os.path.basename(filepath).split(os.path.extsep)[0]) - filepaths = filter(os.path.isfile, - [os.path.join(directory_path, filename) - for filename in os.listdir(directory_path)]) + filepaths = filter( + os.path.isfile, + [os.path.join(directory_path, filename) + for filename in os.listdir(directory_path)], + ) - map(task_from_file, filepaths) + list(map(task_from_file, filepaths)) return ns diff --git a/tasks/imalison.py b/tasks/imalison.py new file mode 120000 index 00000000..1fd67b65 --- /dev/null +++ b/tasks/imalison.py @@ -0,0 +1 @@ +../dotfiles/lib/python/imalison.py \ No newline at end of file From feabc97f8d7535423eefe3688afdddce22924081 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Fri, 18 Nov 2016 16:19:06 -0600 Subject: [PATCH 2/7] [Linux] Add support for distribution distributed nvm --- dotfiles/lib/shellpath.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/dotfiles/lib/shellpath.sh b/dotfiles/lib/shellpath.sh index 52e6c727..7b9d2110 100644 --- a/dotfiles/lib/shellpath.sh +++ b/dotfiles/lib/shellpath.sh @@ -63,9 +63,13 @@ function _python_setup { function _node_setup { # node/nvm - export NVM_DIR="/Users/imalison/.nvm" - [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm - export NODE_PATH="/usr/local/lib/node_modules/" + if [ -e /usr/share/nvm/init-nvm.sh ]; then + source /usr/share/nvm/init-nvm.sh + else + export NVM_DIR="$HOME/.nvm" + [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm + export NODE_PATH="/usr/local/lib/node_modules/" + fi } function _java_setup { From 8c9d16a17f3610384debab400af91bddad7d2430 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Fri, 18 Nov 2016 16:19:40 -0600 Subject: [PATCH 3/7] [Linux] Add comment about path issues --- dotfiles/xprofile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dotfiles/xprofile b/dotfiles/xprofile index 4b2c66c4..584d065d 100644 --- a/dotfiles/xprofile +++ b/dotfiles/xprofile @@ -1,3 +1,5 @@ # -*- mode: sh; -*- + +# If there are issues with path, check /etc/profile for hard overrides of PATH. source "$HOME/.lib/shellenv.sh" load_xkb_map.sh From 8577cddd5f044ed9345186bd7cf114e3c32ed2fe Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Fri, 18 Nov 2016 16:20:07 -0600 Subject: [PATCH 4/7] [Compton] Decrease shadow radius --- dotfiles/config/compton.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dotfiles/config/compton.conf b/dotfiles/config/compton.conf index 2aca5eba..fdc4510b 100644 --- a/dotfiles/config/compton.conf +++ b/dotfiles/config/compton.conf @@ -54,7 +54,7 @@ glx-swap-method = "undefined"; ################################# # Enabled client-side shadows on windows. -shadow = true; +shadow = false; # Don't draw shadows on DND windows. no-dnd-shadow = true; # Avoid drawing shadows on dock/panel windows. @@ -62,7 +62,7 @@ no-dock-shadow = true; # Zero the part of the shadow's mask behind the window. Fix some weirdness with ARGB windows. clear-shadow = true; # The blur radius for shadows. (default 12) -shadow-radius = 15; +shadow-radius = 5; # The left offset for shadows. (default -15) shadow-offset-x = -5; # The top offset for shadows. (default -15) From 8f7817c0b5bd41862d3b98b374964f57ddc83d4e Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Fri, 18 Nov 2016 16:20:32 -0600 Subject: [PATCH 5/7] [Emacs] Fix whitespace --- dotfiles/emacs.d/README.org | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dotfiles/emacs.d/README.org b/dotfiles/emacs.d/README.org index 69467b47..1570b0d4 100644 --- a/dotfiles/emacs.d/README.org +++ b/dotfiles/emacs.d/README.org @@ -26,7 +26,8 @@ heading text, and don't change when new headings are added to the document, I wrote a custom version of ~org-export-get-reference~. See how [[Use my own default naming scheme for org-headings][this link]] (which is just a normal internal link in the original -document) takes you to http://ivanmalison.github.io/dotfiles/#usemyowndefaultnamingschemefororgheadings. +document) takes you to +http://ivanmalison.github.io/dotfiles/#usemyowndefaultnamingschemefororgheadings. In case you haven't noticed, that is where you should go grab the code that does this. From 8429e14c0576dd60367c201d305e9df75018dda4 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Fri, 18 Nov 2016 16:32:52 -0600 Subject: [PATCH 6/7] [KeepassX] Add keepassxc.ini --- dotfiles/config/keepassxc/keepassxc.ini | 49 +++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 dotfiles/config/keepassxc/keepassxc.ini diff --git a/dotfiles/config/keepassxc/keepassxc.ini b/dotfiles/config/keepassxc/keepassxc.ini new file mode 100644 index 00000000..b970fe17 --- /dev/null +++ b/dotfiles/config/keepassxc/keepassxc.ini @@ -0,0 +1,49 @@ +[General] +AutoSaveAfterEveryChange=false +AutoSaveOnExit=false +AutoTypeEntryTitleMatch=true +GlobalAutoTypeKey=0 +GlobalAutoTypeModifiers=0 +LastDatabases=/home/imalison/SparkleShare/config/db.kdbx, /home/imalison/SparkleShare/config/creds/keepass.key +LastKeyFiles=@Variant(\0\0\0\x1c\0\0\0\x1\0\0\0T\0/\0h\0o\0m\0\x65\0/\0i\0m\0\x61\0l\0i\0s\0o\0n\0/\0S\0p\0\x61\0r\0k\0l\0\x65\0S\0h\0\x61\0r\0\x65\0/\0\x63\0o\0n\0\x66\0i\0g\0/\0\x64\0\x62\0.\0k\0\x64\0\x62\0x\0\0\0\n\0\0\0h\0/\0h\0o\0m\0\x65\0/\0i\0m\0\x61\0l\0i\0s\0o\0n\0/\0S\0p\0\x61\0r\0k\0l\0\x65\0S\0h\0\x61\0r\0\x65\0/\0\x63\0o\0n\0\x66\0i\0g\0/\0\x63\0r\0\x65\0\x64\0s\0/\0k\0\x65\0\x65\0p\0\x61\0s\0s\0.\0k\0\x65\0y) +LastOpenedDatabases=/home/imalison/SparkleShare/config/db.kdbx +MinimizeOnCopy=false +OpenPreviousDatabasesOnStartup=true +RememberLastDatabases=true +RememberLastKeyFiles=true +ShowToolbar=true +UseGroupIconOnEntryCreation=false + +[GUI] +EntryListColumnSizes=150, 150, 173 +EntrySearchColumnSizes=@Invalid() +Language=system +MainWindowGeometry=@ByteArray(\x1\xd9\xd0\xcb\0\x2\0\0\0\0\x1\xe0\0\0\0\x19\0\0\x3\xbf\0\0\x3\x83\0\0\x1\xe0\0\0\0\x19\0\0\x3\xbf\0\0\x3\x83\0\0\0\0\0\0\0\0\x5\xa0) +MinimizeOnClose=true +MinimizeOnStartup=false +MinimizeToTray=true +ShowTrayIcon=true +SplitterState=@Invalid() + +[Http] +AlwaysAllowAccess=false +AlwaysAllowUpdate=false +BestMatchOnly=false +Enabled=true +Host=localhost +MatchUrlScheme=true +Port=19455 +SearchInAllDatabases=false +ShowNotification=true +SortByUsername=false +SupportKphFields=true +UnlockDatabase=true + +[security] +autotypeask=true +clearclipboard=true +clearclipboardtimeout=10 +lockdatabaseidle=false +lockdatabaseidlesec=10 +lockdatabaseminimize=false +passwordscleartext=false From 1e8efaed1a8d9f3961838865525f4d10fb18aa14 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Fri, 18 Nov 2016 18:45:19 -0600 Subject: [PATCH 7/7] [Emacs] Add array multi-line support to sh-mode --- dotfiles/emacs.d/README.org | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/dotfiles/emacs.d/README.org b/dotfiles/emacs.d/README.org index 1570b0d4..6e499d07 100644 --- a/dotfiles/emacs.d/README.org +++ b/dotfiles/emacs.d/README.org @@ -2027,7 +2027,17 @@ I don't use auto-complete at all, so I have set up a hook to automatically disab ** multi-line #+BEGIN_SRC emacs-lisp (imalison:use-package multi-line - :bind ("C-c d" . multi-line)) + :bind ("C-c d" . multi-line) + :config + (progn + ;; This only works for array respacing + (multi-line-defhook sh + (make-instance + 'multi-line-strategy + :find multi-line-lisp-find-strategy + :respace (multi-line-default-respacers + (multi-line-clearing-reindenting-respacer + multi-line-force-first-and-last-respacer)))))) #+END_SRC ** comment-dwim-2 #+BEGIN_SRC emacs-lisp