Commit graph

1051 commits

Author SHA1 Message Date
Jonathan Hodgson
1daa851d98 Adds sudo writes to nvim
If in nvim and the SUDO_ASKPASS environment variable is set then a WW
mapping will expand to

:w !sudo -A tee % >/dev/null

If in not-neo vim, the -A is omitted.

The environment variable is also set. Some unused environment variables
were also removed.

https://stackoverflow.com/questions/2600783/how-does-the-vim-write-with-sudo-trick-work
https://github.com/neovim/neovim/issues/12103
2021-11-16 14:29:20 +00:00
Jonathan Hodgson
ab27433fc4 FZF: adds git bindings and toggle preview
I have added a default binging of ctrl+/ to toggle the preview in fzf

I have added some git key bindings for git stuff. They are all in the
form with ctrl+g ctrl+<something>. Most are what they want, for example
branches are ctrl+g ctrl+b however commits are not. I assume this is
because I can't overwrite what ctrl+c does, even if prefixed. I will
look into this at some point but for now commits are ctrl+g ctrl+h.

Largely stolen the code from here:
https://gist.github.com/junegunn/8b572b8d4b5eddd8b85e5f4d40f17236
although with minor tweaks.

I might change the initial ctrl+g binding as it is awkward on colemak
although we'll see how often I use it.
2021-11-16 11:45:45 +00:00
Jonathan Hodgson
0c0a7f81ec Sets repdef environment variable in projects 2021-11-16 11:21:21 +00:00
Jonathan Hodgson
f8432aa2ac list contents if I try and cat a directory 2021-11-16 11:20:15 +00:00
Jonathan Hodgson
2781826696 Adds .local/bin to path for pip 2021-11-16 11:19:37 +00:00
Jonathan Hodgson
39f6345cdb Stops forcing colour for jq 2021-11-16 11:18:45 +00:00
Jonathan Hodgson
cb209aad2b Adds script for generating pdf containing js 2021-11-16 10:48:18 +00:00
Jonathan Hodgson
9b2507423c Adds httpie wrappers for ntlm auth 2021-11-16 10:46:23 +00:00
Jonathan Hodgson
ccdb250923 Adds audiobookbay script 2021-11-16 10:45:44 +00:00
Jonathan Hodgson
ebd344348e Starts making yt work with yt-dlp 2021-11-16 10:45:15 +00:00
Jonathan Hodgson
207fc59dc8 Bin: Analyse-headers: makes includesubdomains check case insensitive 2021-11-16 10:44:00 +00:00
Jonathan Hodgson
a16861a350 Delete uberw3m submodule and wrapper script 2021-11-16 10:43:03 +00:00
Jonathan Hodgson
65298f395e Starts adding wayland support to my screenshot script 2021-11-16 10:36:28 +00:00
Jonathan Hodgson
792d9d8eaf Makes the screen layouts scripts slightly more robust
I should probably re-work all of them at some point but these changes
allow for external monitors with a resolution other than 1920x1080. When
switching to laptop only, I disable all other monitors by listing all
rather than hard coding common ones
2021-11-16 10:34:36 +00:00
Jonathan Hodgson
850ad9d3fb Adds "simple" shell for keybinding
I have been experimenting with running a terminal on a black and white
e-ink display. A lot of things are difficult to see when converted from
colour to black and white.
2021-11-16 10:32:29 +00:00
Jonathan Hodgson
c79f3d960a Adds wl-clip support to password manager 2021-11-16 10:30:24 +00:00
Jonathan Hodgson
97adb85009 Adds pacman hook to remove the grc default aliases file 2021-11-16 10:27:25 +00:00
Jonathan Hodgson
c144f1fde5 Moves and tweaks some systemd timers / services 2021-11-16 10:26:21 +00:00
Jonathan Hodgson
3ad5bd900c NEWSBOAT: Adds graeme's blog 2021-11-08 20:46:01 +00:00
Jonathan Hodgson
401fa12a5d Improvements to hashcat completion
The main args completion no longer uses a bash while loop for splitting
up the arguments making it much faster.

I have also removed the use of FZF for looking up modes. This has been
moved into the overidepartialcompletion file in includes.
2021-11-04 19:38:13 +00:00
Jonathan Hodgson
d967936fde Functions: adds httpie helpers for xsrf
The functions are wrappers around http and https and set the
x-xsrf-token header based on the value of the Xsrf-token cookie in the
session file.

Currently, the cookie name and header name are hard coded. I may look to
specify those in an argument at some point although for now it's
probably fine.
2021-10-26 00:10:52 +01:00
Jonathan Hodgson
92b5ac3e4c BIN: Work on fzf-remind 2021-10-10 08:55:57 +01:00
Jonathan Hodgson
e7ba662158 REM: tweaks 2021-10-10 08:43:35 +01:00
Jonathan Hodgson
b99abb8c5b VIM: Adds functions for proselint and languagetool 2021-10-07 22:13:50 +01:00
Jonathan Hodgson
6d0ff5eb98 Merge branch 'master' of ssh://git.jonathanh.co.uk:2222/jab2870/Dotfiles 2021-10-04 11:07:44 +01:00
Jonathan Hodgson
f74efd09f2 Updates newsboat urls 2021-10-04 11:07:29 +01:00
Jonathan Hodgson
64c6291a20 Merge branch 'master' of ssh://git.jonathanh.co.uk:2222/jab2870/Dotfiles 2021-09-27 16:05:36 +01:00
Jonathan Hodgson
764dcb9a67 Adds sxmo_contacts overide 2021-09-27 16:05:27 +01:00
Jonathan Hodgson
0a724f3de5 ZSH: adds aws key regex to currenWordCompletions 2021-09-27 13:27:40 +01:00
Jonathan Hodgson
0536e53e19 Stops disabling auto focus and adds more search prefixes
Adds some search prefixes for subreddits

Stops disabling autofocus due to it breaking regex101.com

https://github.com/tridactyl/tridactyl/issues/3919
2021-09-27 13:00:14 +01:00
Jonathan Hodgson
158b0befb3 Adds some more options to the change command function 2021-09-07 17:07:25 +01:00
Jonathan Hodgson
d78eb40a89 Adds some telemetry env variables and composer to path 2021-09-07 17:06:25 +01:00
Jonathan Hodgson
35cf3a8472 SHELLS: adds a few aliases 2021-09-07 17:05:36 +01:00
Jonathan Hodgson
30329fbaff VIM: Fixes lsp config 2021-09-07 17:00:35 +01:00
Jonathan Hodgson
cc5ce87113 VIM: Closes preview window after completion 2021-09-07 16:59:55 +01:00
Jonathan Hodgson
873fce2089 Sets default fold method to indent 2021-09-07 16:59:24 +01:00
Jonathan Hodgson
23511b8c80 Updates vim plugins 2021-09-07 16:58:09 +01:00
Jonathan Hodgson
20427c78a5 Updates zsh plugins 2021-09-07 16:56:43 +01:00
Jonathan Hodgson
20f09041a7 BIN: Adds screen record script 2021-09-07 16:13:41 +01:00
Jonathan Hodgson
4b74958f9b Adds regex to current word completion 2021-09-07 14:00:06 +01:00
Jonathan Hodgson
aa8cc6a3e2 BIN: nessusComplianceFilter: various improvements 2021-09-02 11:34:44 +01:00
Jonathan Hodgson
b7c3e8d551 ZSH: make find file only give 1 result 2021-08-31 11:04:46 +01:00
Jonathan Hodgson
a654ca73fb ZSH: adds ^n keybinding to expand current word's filename
This is useful if I want to edit a script but I'm not in my scripts
directory. It will look for a file with the name I have typed and
replace it.

for example:
    vim yt<^n>
will be replaced with
    vim /home/jonathan/.bin/yt

The script will first try `which <filename>`, searching the path. If
that fails, it will do `locate "*/filename"` which will search for the
file elsewhere
2021-08-31 10:46:58 +01:00
Jonathan Hodgson
02a44619f3 ZSH: fixes issue for creaing directory with ~ in path
The alt-m key binding is used to create a directory for the current
"word". This change makes it work if it has something like ~ in the
name.

${~var} is used to turn on GLOB_SUBST. The string resulting from the
expansion will be interpreted as a pattern anywhere that is possible,
such as filenames expanding `~`

man zshexpn
2021-08-31 10:42:56 +01:00
Jonathan Hodgson
f030d0da98 ZSH: Completion: Hashcat: fix broken mode selection
Hashcat has changed the way it displays modes. Update the completion
script to reflect this.
2021-08-24 15:58:23 +01:00
Jonathan Hodgson
e4d2386912 ZSH: prompt: show branch on older versions of git 2021-08-23 15:24:34 +01:00
Jonathan Hodgson
8377a506be ZSH: checks for project in prompt 2021-08-23 15:22:05 +01:00
Jonathan Hodgson
69dd8e61c6 ZSH: checks for project in prompt 2021-08-23 15:19:48 +01:00
Jonathan Hodgson
a11fbf7516 ZSH: checks for commands existance before running 2021-08-23 15:16:56 +01:00
Jonathan Hodgson
94b45836f8 BIN: Deletes open-youtube and puts functionality in yt
The yt script now accepts a --url option which will take a url as an
option like

yt --url youtube.com/watch?v=blar
or
echo youtube.com/watch?v=blar | yt --url

It will also use rofi rather than fzf if not being run from a terminal
or the --rofi flag is given

I have updated the files that used to use open-youtube to reflect this
2021-07-30 13:14:50 +01:00