From 283a9f0c158bb8ceeb11891f7aabd84c8e77039d Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Thu, 13 Oct 2022 15:57:13 +0200 Subject: [PATCH 01/17] vimwiki: dth @ DK023900WSL --- .config/alacritty/alacritty.yml | 4 +- .config/nvim/init.vim | 24 ++++--- README.md | 7 +- firefox-scrolling.md | 5 ++ makefile | 2 +- scripts/24-bit-color.sh | 109 ++++++++++++++++++++++++++++++++ ubuntu.md | 3 + 7 files changed, 141 insertions(+), 13 deletions(-) create mode 100644 scripts/24-bit-color.sh diff --git a/.config/alacritty/alacritty.yml b/.config/alacritty/alacritty.yml index 7a0ef5a..f1b30be 100644 --- a/.config/alacritty/alacritty.yml +++ b/.config/alacritty/alacritty.yml @@ -158,5 +158,5 @@ schemes: # colors: *gruvbox_material_medium_light # colors: *gruvbox_material_soft_light -# colors: *gruvbox_material_soft_light -colors: *gruvbox_material_soft_dark +colors: *gruvbox_material_soft_light +# colors: *gruvbox_material_soft_dark diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index 2102cd2..75ea859 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -1,5 +1,7 @@ let mapleader ="," +" set termguicolors + if ! filereadable(system('echo -n "${XDG_CONFIG_HOME:-$HOME/.config}/nvim/autoload/plug.vim"')) echo "Downloading junegunn/vim-plug to manage plugins..." silent !mkdir -p ${XDG_CONFIG_HOME:-$HOME/.config}/nvim/autoload/ @@ -11,7 +13,7 @@ call plug#begin(system('echo -n "${XDG_CONFIG_HOME:-$HOME/.config}/nvim/plugged" Plug 'tpope/vim-surround' " surround for parentheses, brackets, quotes, XML tags etc Plug 'tpope/vim-fugitive' " git helper Plug 'preservim/nerdtree' " file tree -Plug 'jreybert/vimagit' " git diffing with :Magit +" Plug 'jreybert/vimagit' " git diffing with :Magit Plug 'lukesmithxyz/vimling' " toggle deadkeys, IPA, prose-mode Plug 'junegunn/goyo.vim' " prose mode but better Plug 'vimwiki/vimwiki' " take notes in vimwiki @@ -22,25 +24,31 @@ Plug 'tpope/vim-commentary' " comment out word / line with 'gc' Plug 'ap/vim-css-color' " show css colors Plug 'editorconfig/editorconfig-vim' " editor-config extension for vim Plug 'scrooloose/syntastic' " syntax checker -Plug 'airblade/vim-gitgutter' " show git diff insertions / deletions -Plug 'junegunn/vim-emoji' " emoji autocomplete + emojis in gitgutter +" Plug 'airblade/vim-gitgutter' " show git diff insertions / deletions +" Plug 'junegunn/vim-emoji' " emoji autocomplete + emojis in gitgutter Plug 'rrethy/vim-illuminate' " highlight other uses of the current word under the cursor " Plug 'jupyter-vim/jupyter-vim' " one day we'll start using jupyter in vim Plug 'junegunn/fzf', { 'do': { -> fzf#install() } } " fuzzy-finder +Plug 'ibhagwan/fzf-lua', {'branch': 'main'} +" optional for icon support +Plug 'kyazdani42/nvim-web-devicons' call plug#end() +" fuzzy find with ctrl + P +nnoremap lua require('fzf-lua').files() + " show invisibles set fileencoding=utf-8 set list set listchars=tab:→\ ,nbsp:␣,trail:•,precedes:«,extends:» " vim-emoji setup -set completefunc=emoji#complete -let g:gitgutter_sign_added = emoji#for('small_blue_diamond') -let g:gitgutter_sign_modified = emoji#for('small_orange_diamond') -let g:gitgutter_sign_removed = emoji#for('small_red_triangle') -let g:gitgutter_sign_modified_removed = emoji#for('collision') +" set completefunc=emoji#complete +" let g:gitgutter_sign_added = emoji#for('small_blue_diamond') +" let g:gitgutter_sign_modified = emoji#for('small_orange_diamond') +" let g:gitgutter_sign_removed = emoji#for('small_red_triangle') +" let g:gitgutter_sign_modified_removed = emoji#for('collision') " syntastic recommended settings diff --git a/README.md b/README.md index dd58025..e09d007 100644 --- a/README.md +++ b/README.md @@ -46,8 +46,10 @@ Here's what I've done so far: * get local admin rights * [install powertoys](https://docs.microsoft.com/en-us/windows/powertoys/install#install-with-windows-executable-file-via-github) * remap CAPS LOCK to L-CTRL +* install glasswire network monitor +* install basic miktex (for LaTeX) * install [alacritty](https://alacritty.org/) (use the installer, not portable) -* install [wsl](https://docs.microsoft.com/en-us/windows/wsl/install#install-wsl-command) +* install [wsl](https://docs.microsoft.com/en-us/windows/wsl/install#install-wsl-command) + WSL specifics * fix wsl dns issue via [stackoverflow](https://askubuntu.com/questions/91543/apt-get-update-fails-to-fetch-files-temporary-failure-resolving-error/91595#comment1911934_91595) * write wsl.conf: * `sudo touch /etc/wsl.conf` @@ -59,8 +61,9 @@ Here's what I've done so far: * add content `echo "nameserver 8.8.8.8" | sudo tee /etc/resolv.conf > /dev/null` * add alacritty config: `/mnt/c/Users//AppData/Roaming/alacritty/alacritty.yml` * add private folder symlink: `ln -s -f /mnt/c/Users//Private ~/Private` +* follow Ubuntu guide: * `apt install neovim` (NVIM v0.4.3) - consider - * `apt install texlive` + * `apt install texlive texlive-latex-extra` * setup [ssh github](ubuntu.md#setup-ssh-key-for-github) * install [zsh + omz](ubuntu.md#apt-package) * clone this (dotfiles) repo and `cd dotfiles` diff --git a/firefox-scrolling.md b/firefox-scrolling.md index 18de015..489ab9c 100644 --- a/firefox-scrolling.md +++ b/firefox-scrolling.md @@ -11,3 +11,8 @@ mousewheel.default.delta_multiplier_y: 10 ``` > [source](https://www.reddit.com/r/firefox/comments/mq9g52/linux_firefox_performancemacos_like_mouse_wheel/) + +## other firefox config + +* new tabs open next to current tab + * `browser.tabs.insertAfterCurrent = true` diff --git a/makefile b/makefile index b13a2b9..44da630 100644 --- a/makefile +++ b/makefile @@ -5,7 +5,7 @@ setup_zshrc: ln -s -f ~/dotfiles/.zshrc ~/.zshrc setup_alacritty_wsl: - ln -s -f ~/dotfiles/.config/alacritty/alacritty.yml /mnt/c/Users/dnth/AppData/Roaming/alacritty/alacritty.yml + cp ~/dotfiles/.config/alacritty/alacritty.yml /mnt/c/Users/dnth/AppData/Roaming/alacritty/alacritty.yml setup_alacritty: mkdir -p ~/.config/alacritty diff --git a/scripts/24-bit-color.sh b/scripts/24-bit-color.sh new file mode 100644 index 0000000..b557f8c --- /dev/null +++ b/scripts/24-bit-color.sh @@ -0,0 +1,109 @@ +#!/bin/bash +# This file was originally taken (by JohnMorales) from iterm2: +# https://github.com/gnachman/iTerm2/blob/master/tests/24-bit-color.sh +# This file was then taken by (DannyDannyDanny) from JohnMorales: +# https://github.com/JohnMorales/dotfiles/blob/master/colors/24-bit-color.sh +# +# This file echoes a bunch of 24-bit color codes +# to the terminal to demonstrate its functionality. +# The foreground escape sequence is ^[38;2;;;m +# The background escape sequence is ^[48;2;;;m +# range from 0 to 255 inclusive. +# The escape sequence ^[0m returns output to default +# +# The script can be run using if cloned locally +# $ bash /scripts/24-bit-color.sh +# +# Alternatively download the script and pipe it into bash: +# $ curl -s https://raw.githubusercontent.com/DannyDannyDanny/dotfiles/main/scripts/24-bit-color.sh | bash + +setBackgroundColor() +{ + #printf '\x1bPtmux;\x1b\x1b[48;2;%s;%s;%sm' $1 $2 $3 + printf '\x1b[48;2;%s;%s;%sm' $1 $2 $3 +} + +resetOutput() +{ + echo -en "\x1b[0m\n" +} + +# Gives a color $1/255 % along HSV +# Who knows what happens when $1 is outside 0-255 +# Echoes "$red $green $blue" where +# $red $green and $blue are integers +# ranging between 0 and 255 inclusive +rainbowColor() +{ + let h=$1/43 + let f=$1-43*$h + let t=$f*255/43 + let q=255-t + + if [ $h -eq 0 ] + then + echo "255 $t 0" + elif [ $h -eq 1 ] + then + echo "$q 255 0" + elif [ $h -eq 2 ] + then + echo "0 255 $t" + elif [ $h -eq 3 ] + then + echo "0 $q 255" + elif [ $h -eq 4 ] + then + echo "$t 0 255" + elif [ $h -eq 5 ] + then + echo "255 0 $q" + else + # execution should never reach here + echo "0 0 0" + fi +} + +for i in `seq 0 127`; do + setBackgroundColor $i 0 0 + echo -en " " +done +resetOutput +for i in `seq 255 -1 128`; do + setBackgroundColor $i 0 0 + echo -en " " +done +resetOutput + +for i in `seq 0 127`; do + setBackgroundColor 0 $i 0 + echo -n " " +done +resetOutput +for i in `seq 255 -1 128`; do + setBackgroundColor 0 $i 0 + echo -n " " +done +resetOutput + +for i in `seq 0 127`; do + setBackgroundColor 0 0 $i + echo -n " " +done +resetOutput +for i in `seq 255 -1 128`; do + setBackgroundColor 0 0 $i + echo -n " " +done +resetOutput + +for i in `seq 0 127`; do + setBackgroundColor `rainbowColor $i` + echo -n " " +done +resetOutput +for i in `seq 255 -1 128`; do + setBackgroundColor `rainbowColor $i` + echo -n " " +done +resetOutput diff --git a/ubuntu.md b/ubuntu.md index abc0434..7eec102 100644 --- a/ubuntu.md +++ b/ubuntu.md @@ -96,6 +96,9 @@ open terminal, run one code snippet at the time and check that no errors occur: sudo apt install git -y # version control # sudo apt install neovim -y # brew install nvim to get version 0.7 +# install neovim - src: https://vi.stackexchange.com/a/38348 + + # sudo apt install librewolf -y # add librewolf repo first sudo apt install qutebrowser -y # minimal vim-binding browser sudo apt install gnome-tweaks -y # tool to remap caps to ctrl From e0e6ce3410cf5d222c72fd4162048ca916161624 Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Thu, 13 Oct 2022 15:57:45 +0200 Subject: [PATCH 02/17] vimwiki: dth @ DK023900WSL --- ubuntu.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ubuntu.md b/ubuntu.md index 7eec102..5e99aaa 100644 --- a/ubuntu.md +++ b/ubuntu.md @@ -96,7 +96,7 @@ open terminal, run one code snippet at the time and check that no errors occur: sudo apt install git -y # version control # sudo apt install neovim -y # brew install nvim to get version 0.7 -# install neovim - src: https://vi.stackexchange.com/a/38348 +# install neovim - [src](https://vi.stackexchange.com/a/38348) # sudo apt install librewolf -y # add librewolf repo first From 6435d88b342f47c4402ca3b4b61c7783152f6076 Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Thu, 13 Oct 2022 15:57:48 +0200 Subject: [PATCH 03/17] vimwiki: dth @ DK023900WSL --- ubuntu.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ubuntu.md b/ubuntu.md index 5e99aaa..cd9945d 100644 --- a/ubuntu.md +++ b/ubuntu.md @@ -96,7 +96,7 @@ open terminal, run one code snippet at the time and check that no errors occur: sudo apt install git -y # version control # sudo apt install neovim -y # brew install nvim to get version 0.7 -# install neovim - [src](https://vi.stackexchange.com/a/38348) +# install neovim [src](https://vi.stackexchange.com/a/38348) # sudo apt install librewolf -y # add librewolf repo first From d50bae6f136b521d47a091531d7767df3f155073 Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Thu, 13 Oct 2022 15:58:47 +0200 Subject: [PATCH 04/17] vimwiki: dth @ DK023900WSL --- ubuntu.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ubuntu.md b/ubuntu.md index cd9945d..7cae282 100644 --- a/ubuntu.md +++ b/ubuntu.md @@ -95,9 +95,12 @@ open terminal, run one code snippet at the time and check that no errors occur: # replace alacritty with stterm sudo apt install git -y # version control -# sudo apt install neovim -y # brew install nvim to get version 0.7 -# install neovim [src](https://vi.stackexchange.com/a/38348) +# install neovim [src](https://vi.stackexchange.com/a/38348) +#sudo apt-get install software-properties-common +sudo add-apt-repository ppa:neovim-ppa/stable +sudo apt-get update +sudo apt-get install neovim # sudo apt install librewolf -y # add librewolf repo first sudo apt install qutebrowser -y # minimal vim-binding browser From e9beeda25dd08e9e2cbf843737ee2462ae6516ce Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Thu, 13 Oct 2022 15:58:52 +0200 Subject: [PATCH 05/17] vimwiki: dth @ DK023900WSL --- ubuntu.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ubuntu.md b/ubuntu.md index 7cae282..b293fdb 100644 --- a/ubuntu.md +++ b/ubuntu.md @@ -96,7 +96,7 @@ open terminal, run one code snippet at the time and check that no errors occur: sudo apt install git -y # version control -# install neovim [src](https://vi.stackexchange.com/a/38348) +# install neovim: [src](https://vi.stackexchange.com/a/38348) #sudo apt-get install software-properties-common sudo add-apt-repository ppa:neovim-ppa/stable sudo apt-get update From 60caa5fe79450108a7875cda5b6b5708a29b4a51 Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Thu, 13 Oct 2022 15:59:03 +0200 Subject: [PATCH 06/17] vimwiki: dth @ DK023900WSL --- ubuntu.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ubuntu.md b/ubuntu.md index b293fdb..09bc996 100644 --- a/ubuntu.md +++ b/ubuntu.md @@ -100,7 +100,7 @@ sudo apt install git -y # version control #sudo apt-get install software-properties-common sudo add-apt-repository ppa:neovim-ppa/stable sudo apt-get update -sudo apt-get install neovim +sudo apt-get install neovim -y # sudo apt install librewolf -y # add librewolf repo first sudo apt install qutebrowser -y # minimal vim-binding browser From 7bb9716f15628ed60de39d3be2437ee65d5d4f04 Mon Sep 17 00:00:00 2001 From: Daniel Thoren Date: Mon, 24 Oct 2022 19:35:35 +0200 Subject: [PATCH 07/17] :bug: fix dont load linuxbrew if not present --- .zshrc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.zshrc b/.zshrc index 5cc5239..fdf6de8 100644 --- a/.zshrc +++ b/.zshrc @@ -113,7 +113,9 @@ bindkey -v [ -f ~/.fzf.zsh ] && source ~/.fzf.zsh # make brew accessible -eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" +if [ -d "$HOME/linuxbrew/.linuxbrew" ] ; then + eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" +fi # set PATH so it includes user's private ~/.local/bin if it exists # lvim is installed to this directory (at least on ubuntu) From 129dfd32e6a4924fbbf1d0ff4d668f6d8670058e Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Sun, 13 Nov 2022 17:12:56 +0100 Subject: [PATCH 08/17] vimwiki: dth @ DK023900WSL --- .config/nvim/init.vim | 3 --- README.md | 4 +++- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index 75ea859..6670a0d 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -35,9 +35,6 @@ Plug 'kyazdani42/nvim-web-devicons' call plug#end() -" fuzzy find with ctrl + P -nnoremap lua require('fzf-lua').files() - " show invisibles set fileencoding=utf-8 set list diff --git a/README.md b/README.md index e09d007..9a8dcd4 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,9 @@ Here's what I've done so far: * get local admin rights * [install powertoys](https://docs.microsoft.com/en-us/windows/powertoys/install#install-with-windows-executable-file-via-github) * remap CAPS LOCK to L-CTRL -* install glasswire network monitor +* ~~install glasswire network monitor~~ (glasswire sucks) +* install portmaster network monitor + * https://safing.io/blog/2022/10/27/portmaster-reaches-1.0/ * install basic miktex (for LaTeX) * install [alacritty](https://alacritty.org/) (use the installer, not portable) * install [wsl](https://docs.microsoft.com/en-us/windows/wsl/install#install-wsl-command) + WSL specifics From a3584c6211713fd74dc463cd14944bce9a3eb922 Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Mon, 14 Nov 2022 13:29:35 +0100 Subject: [PATCH 09/17] :sparkles: add lfcd script :boom: no check for LF --- .zshrc | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.zshrc b/.zshrc index fdf6de8..fd5a8c6 100644 --- a/.zshrc +++ b/.zshrc @@ -125,3 +125,18 @@ fi alias pbpaste="powershell.exe -noprofile Get-Clipboard" alias pbcopy="clip.exe" + +# on exit from lf this function changes directory to last browser fir in lf +lfcd () { + tmp="$(mktemp)" + lf -last-dir-path="$tmp" "$@" + if [ -f "$tmp" ]; then + dir="$(cat "$tmp")" + rm -f "$tmp" + if [ -d "$dir" ]; then + if [ "$dir" != "$(pwd)" ]; then + cd "$dir" + fi + fi + fi +} From f9d8dc4836c87418c1f238f8617bbe147ca6f5f7 Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Tue, 29 Nov 2022 13:41:25 +0100 Subject: [PATCH 10/17] vimwiki: dth @ DK023900WSL --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9a8dcd4..9e5c66b 100644 --- a/README.md +++ b/README.md @@ -67,13 +67,13 @@ Here's what I've done so far: * `apt install neovim` (NVIM v0.4.3) - consider * `apt install texlive texlive-latex-extra` * setup [ssh github](ubuntu.md#setup-ssh-key-for-github) + * install [brew](ubuntu#brew) * install [zsh + omz](ubuntu.md#apt-package) * clone this (dotfiles) repo and `cd dotfiles` * configure git (inspired by `make setup_git`) * TODO: remove email from this file * install [build-essential](https://askubuntu.com/a/753113/882709) to get `make` * run `make setup_locale setup_zshrc setup_tmux_a setup_nvim setup_editorconfig setup_client_mynetwork` - * TODO: move up: install [brew](ubuntu#brew) (should be done before install zsh / omz) + * configure nvim clipboard to use system clipboard - had to setup some yank * Next steps: - * TODO: configure nvim clipboard to use system clipboard * TODO: nvim + tmux pasteboard should play with windows pasteboard From 76df32b4f3e0bf2b4ff82f5b33bf43672a9e49c5 Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Tue, 29 Nov 2022 13:45:45 +0100 Subject: [PATCH 11/17] vimwiki: dth @ DK023900WSL --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 9e5c66b..19ebb85 100644 --- a/README.md +++ b/README.md @@ -75,5 +75,6 @@ Here's what I've done so far: * install [build-essential](https://askubuntu.com/a/753113/882709) to get `make` * run `make setup_locale setup_zshrc setup_tmux_a setup_nvim setup_editorconfig setup_client_mynetwork` * configure nvim clipboard to use system clipboard - had to setup some yank + * autohotkey: shift and space * Next steps: * TODO: nvim + tmux pasteboard should play with windows pasteboard From df3e5a7dbedd632717d1c4bc18891f1838bf863c Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Tue, 29 Nov 2022 13:46:23 +0100 Subject: [PATCH 12/17] vimwiki: dth @ DK023900WSL --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 19ebb85..c698bdc 100644 --- a/README.md +++ b/README.md @@ -71,10 +71,11 @@ Here's what I've done so far: * install [zsh + omz](ubuntu.md#apt-package) * clone this (dotfiles) repo and `cd dotfiles` * configure git (inspired by `make setup_git`) - * TODO: remove email from this file + * TODO: remove email from makefile * install [build-essential](https://askubuntu.com/a/753113/882709) to get `make` * run `make setup_locale setup_zshrc setup_tmux_a setup_nvim setup_editorconfig setup_client_mynetwork` * configure nvim clipboard to use system clipboard - had to setup some yank - * autohotkey: shift and space + * install autohotkey: + * TODO: shift and space * Next steps: * TODO: nvim + tmux pasteboard should play with windows pasteboard From c910a9624ece72b823fb1c6271688abf6304a912 Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Wed, 30 Nov 2022 14:02:51 +0100 Subject: [PATCH 13/17] vimwiki: dth @ DK023900WSL --- README.md | 2 +- sas-cae.ahk | 116 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 117 insertions(+), 1 deletion(-) create mode 100644 sas-cae.ahk diff --git a/README.md b/README.md index c698bdc..b264543 100644 --- a/README.md +++ b/README.md @@ -75,7 +75,7 @@ Here's what I've done so far: * install [build-essential](https://askubuntu.com/a/753113/882709) to get `make` * run `make setup_locale setup_zshrc setup_tmux_a setup_nvim setup_editorconfig setup_client_mynetwork` * configure nvim clipboard to use system clipboard - had to setup some yank - * install autohotkey: + * install autohotkey: `sa` * TODO: shift and space * Next steps: * TODO: nvim + tmux pasteboard should play with windows pasteboard diff --git a/sas-cae.ahk b/sas-cae.ahk new file mode 100644 index 0000000..feb0f89 --- /dev/null +++ b/sas-cae.ahk @@ -0,0 +1,116 @@ +; this file contains two mods: shift-and-space and control-and-escape + +; shift-and-space script +; source: https://stackoverflow.com/a/39226212 +#InputLevel, 10 ;set send level for the following code to 10 +$Space:: +#InputLevel ;set it back to default value of 0 for any remaining code +now := A_TickCount +while GetKeyState("Space", "P") ; to find out whether space-bar is held + if (A_TickCount-now > 100) ; this time is tested on asker's computer + { + SendInput {Shift Down} + KeyWait, Space + SendInput {Shift Up} + return + } + + +SendInput {Space} ; if key detected to be tapped, send space as per normal +return + + +; control-and-escape script +; source: https://gist.github.com/nocaoper/b872f97cda29bd8f0f2617606abd9fe4 +LShift & Capslock:: +SetCapsLockState, % (State:=!State) ? "on" : "alwaysoff" +Return + +g_AbortSendEsc := false + +#InstallKeybdHook +SetCapsLockState, alwaysoff +Capslock:: +g_DoNotAbortSendEsc := true +Send {LControl Down} +KeyWait, CapsLock +Send {LControl Up} +if ( A_PriorKey = "CapsLock") +{ + if(g_DoNotAbortSendEsc){ + Send {Esc} + } +} +return + +~*^a:: +~*^b:: +~*^c:: +~*^d:: +~*^e:: +~*^f:: +~*^g:: +~*^h:: +~*^i:: +~*^j:: +~*^k:: +~*^l:: +~*^m:: +~*^n:: +~*^o:: +~*^p:: +~*^q:: +~*^r:: +~*^s:: +~*^t:: +~*^u:: +~*^v:: +~*^w:: +~*^x:: +~*^y:: +~*^z:: +~*^1:: +~*^2:: +~*^3:: +~*^4:: +~*^5:: +~*^6:: +~*^7:: +~*^8:: +~*^9:: +~*^0:: +~*^Space:: +~*^Backspace:: +~*^Delete:: +~*^Insert:: +~*^Home:: +~*^End:: +~*^PgUp:: +~*^PgDn:: +~*^Tab:: +~*^Return:: +~*^,:: +~*^.:: +~*^/:: +~*^;:: +~*^':: +~*^[:: +~*^]:: +~*^\:: +~*^-:: +~*^=:: +~*^`:: +~*^F1:: +~*^F2:: +~*^F3:: +~*^F4:: +~*^F5:: +~*^F6:: +~*^F7:: +~*^F8:: +~*^F9:: +~*^F10:: +~*^F11:: +~*^F12:: + g_DoNotAbortSendEsc := false + return From c54c943e3b54fea7a689ca98ff1f8d70982fb5ff Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Wed, 30 Nov 2022 14:03:51 +0100 Subject: [PATCH 14/17] vimwiki: dth @ DK023900WSL --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b264543..dcf500e 100644 --- a/README.md +++ b/README.md @@ -75,7 +75,7 @@ Here's what I've done so far: * install [build-essential](https://askubuntu.com/a/753113/882709) to get `make` * run `make setup_locale setup_zshrc setup_tmux_a setup_nvim setup_editorconfig setup_client_mynetwork` * configure nvim clipboard to use system clipboard - had to setup some yank - * install autohotkey: `sa` - * TODO: shift and space + * install autohotkey + * install script: shift and space + caps and escape: `sas-cae.ahk` * Next steps: * TODO: nvim + tmux pasteboard should play with windows pasteboard From 625a1bdacad1642075417b66c5b8ecd0c946e043 Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Wed, 30 Nov 2022 14:07:49 +0100 Subject: [PATCH 15/17] vimwiki: dth @ DK023900WSL --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index dcf500e..dbfc5ec 100644 --- a/README.md +++ b/README.md @@ -74,8 +74,8 @@ Here's what I've done so far: * TODO: remove email from makefile * install [build-essential](https://askubuntu.com/a/753113/882709) to get `make` * run `make setup_locale setup_zshrc setup_tmux_a setup_nvim setup_editorconfig setup_client_mynetwork` - * configure nvim clipboard to use system clipboard - had to setup some yank + * configure nvim clipboard to use system clipboard - had to setup some windows yank script * install autohotkey - * install script: shift and space + caps and escape: `sas-cae.ahk` + * add script: shift and space + caps and escape: `sas-cae.ahk` * Next steps: - * TODO: nvim + tmux pasteboard should play with windows pasteboard + * TODO: tmux pasteboard should play with windows pasteboard From 46ef363c73f562e3e3865907c2d1870a7a7fde6d Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Wed, 28 Dec 2022 14:19:57 +0100 Subject: [PATCH 16/17] vimwiki: dth @ DK023900WSL --- .config/nvim/init.vim | 2 +- README.md | 1 + sas-cae.ahk | 2 +- ubuntu.md | 2 ++ 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index 6670a0d..75abcc4 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -13,7 +13,7 @@ call plug#begin(system('echo -n "${XDG_CONFIG_HOME:-$HOME/.config}/nvim/plugged" Plug 'tpope/vim-surround' " surround for parentheses, brackets, quotes, XML tags etc Plug 'tpope/vim-fugitive' " git helper Plug 'preservim/nerdtree' " file tree -" Plug 'jreybert/vimagit' " git diffing with :Magit +Plug 'jreybert/vimagit' " git diffing with :Magit Plug 'lukesmithxyz/vimling' " toggle deadkeys, IPA, prose-mode Plug 'junegunn/goyo.vim' " prose mode but better Plug 'vimwiki/vimwiki' " take notes in vimwiki diff --git a/README.md b/README.md index dbfc5ec..73312bf 100644 --- a/README.md +++ b/README.md @@ -79,3 +79,4 @@ Here's what I've done so far: * add script: shift and space + caps and escape: `sas-cae.ahk` * Next steps: * TODO: tmux pasteboard should play with windows pasteboard +* install node 18 and npm diff --git a/sas-cae.ahk b/sas-cae.ahk index feb0f89..a3ca434 100644 --- a/sas-cae.ahk +++ b/sas-cae.ahk @@ -7,7 +7,7 @@ $Space:: #InputLevel ;set it back to default value of 0 for any remaining code now := A_TickCount while GetKeyState("Space", "P") ; to find out whether space-bar is held - if (A_TickCount-now > 100) ; this time is tested on asker's computer + if (A_TickCount-now > 120) ; this time is tested on asker's computer { SendInput {Shift Down} KeyWait, Space diff --git a/ubuntu.md b/ubuntu.md index 09bc996..b7953b5 100644 --- a/ubuntu.md +++ b/ubuntu.md @@ -72,6 +72,7 @@ copy their public keys to this machine. * disable password authentication ## stterm +> :bomb: remove stterm - it'll never work on a windows machine * install requirements * `sudo apt install libfontconfig1-dev` * `sudo apt install libx11-dev` @@ -108,6 +109,7 @@ sudo apt install gnome-tweaks -y # tool to remap caps to ctrl # sudo apt install alacritty -y # add alacritty repo first # replace alacritty with stterm sudo apt install tmux -y # terminal multiplexer +sudo apt install jq -y # lightweight and flexible command-line JSON processor sudo apt install make -y # utility to maintain shell program groups sudo apt install curl -y # file transfer helper sudo apt install ffmpeg -y # audio/video converter From 4a47b4bda92644d8b8b4cdc3294242add014cce0 Mon Sep 17 00:00:00 2001 From: DannyDannyDanny Date: Mon, 9 Jan 2023 09:04:59 +0100 Subject: [PATCH 17/17] vimwiki: dth @ DK023900WSL --- server.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.md b/server.md index c8a6f10..ceb560b 100644 --- a/server.md +++ b/server.md @@ -1,7 +1,7 @@ # HOME SERVERS ## Roadmap - +* [ ] read [HN: What'ts on your home server](https://news.ycombinator.com/item?id=34271167) * [.] auto-setup ssh + ngrok on all machines * [X] client machines automation * [X] read ssh commands in [ubuntu](ubuntu.md)