Commit Graph

22 Commits

Author SHA1 Message Date
Marty Oehme 274cc8026a
sh: Add distrobox alias and enable displaying host
Add a simple alias to quickly use distrobox with `db` alias, and modify
pure prompt initialization slightly so that it displays a hostname when
in a distrobox container (akin to operating from ssh or normal container
usage).

HACKY implementation makes use of both an internal pure prompt api
(see here https://github.com/sindresorhus/pure/issues/585)
and a distrobox env var that I am not sure how exposed it is either.
Powerlevel10k uses a similar method though, so maybe it is fine
(see here 33916e91a7/internal/p10k.zsh (L8336)).
2023-01-10 16:55:25 +01:00
Marty Oehme 8912a09a39
scripts: Change nxsiv-rifle to uoeia
I rewrote and extended the nsxiv-rifle script recently, and this change
now: removes the old script, adds the new one as a submodule into the
repository and links a working binary into the path.

The new script is essentially still just an image grabber-and-opener,
but supports more image viewers, is a little more advanced and can for
example replace arbitrary parts of urls (and is documented a little more
nicely).

Make qutebrowser use new script and remove leftover references to
nsxiv-rifle. Qutebrowser also gets a third option of viewing images, now
there are:

,i -> open selected link in imageviewer
,I -> open current page in imageviewer
,<C-i> -> open selected image in imageviewer
2023-01-08 21:05:16 +01:00
Marty Oehme 5d2ed8174c
sh: Add hidden file inclusive ls tree view 2023-01-07 14:54:55 +01:00
Marty Oehme 3ece309f67
sh: Add imv to iv image alias 2023-01-07 14:54:32 +01:00
Marty Oehme 179840e4c0
sh: Add vim personal knowledge base alias
Added alias `vw` to open the index page of my PKB (essentially the start
page of my wiki) using my zettelkasten.nvim plugin.
2022-08-10 09:01:09 +02:00
Marty Oehme aa47068fd0
scripts: Add nsxiv-rifle script
Opens basically any path, local or remote in nsxiv.
Can take multiple paths to open all of them.

Additionally, alias whichever version of the image viewer is available
on the system as `iv`, using `nsxiv-rifle`, `nsxiv`, `sxiv` in order of
preference.
2022-08-06 22:12:00 +02:00
Marty Oehme 6c20ac04b1
sh: Group directories first in ls views
Switch ls (exa) views to group any folders in current view and display
them before any files (works for l, L, ll, LL).
2022-06-13 17:50:36 +02:00
Marty Oehme 72c0a5d5f2
sh: Add short py alias for repl
Added `py` alias for any of `ptipython`, `ipython`, `python` found in
that order.
If python is not installed, will not create the alias.
2022-04-11 12:52:19 +02:00
Marty Oehme a27d86942b
sh: Use exist program
Fix sh module packages to make more extensive use of the exist program
that also ships with the sh module.
Simplifies intent of the code and makes it much easier to read.
2022-01-30 11:37:18 +01:00
Marty Oehme 0d40c1bf67
sh: Add missing vim aliases
Added some simple aliases that were missing from the vi → vim → neovim
chain.
Can be useful for the odd moment when one does not know which exact vim
is installed.
2022-01-11 17:27:28 +01:00
Marty Oehme 0b2c6c9b4b
bibtex: Fix default pandoc compilation target
Moved previous default (paper) compilation target for pandoc to its own
file (paper.latex) and saved the current default as a backup file.

This should fix some issues with compilation to PDF, especially with
vertical spacing and quotes which would fail intermittently otherwise.
2021-06-02 23:23:16 +02:00
Marty Oehme ebdfb17bb1
sh: Added date stamps to history command
Prepending history with datestamps (which are already correctly saved in
my shell history), so I know WHEN I last run a command (roughly) and can
also search for the dates using `fzfhistory`.
2021-03-27 22:19:43 +01:00
Marty Oehme 9a476e4228
sh: Add flexible vi/vim/nvim invocation
`v` used to call nvim and nothing else.
Now, it checks for nvim and calls that,
checks for vim and calls that,
or checks for vi and calls that before failing.
2021-03-05 14:03:46 +01:00
Marty Oehme c4612a04c1
fzf: Fix fzf for paru and remove default preview
The `nl` preview was still stuck in the default fzf options for a while
and does not work with most things that it is intended for. Removing it
is vastly preferable to the half useless preview window on any fzf
invocation.
A true default preview window may either be possible through a separate
script looking for the right command to invoke, or for individual fzf
invocations which then simple use the correct commands in the first
place (see e.g. `fzfyay`, or `fzfyayrns`).

`fzfyay` and `fzfyayrns` now also respect paru if it is installed on the
system. They will default to yay and fall back to paru.
2020-12-25 16:04:58 +01:00
Marty Oehme fb9f3b83a4
sh: Add fuzzy ripgrep-all search
Added function to fuzzily search through any documents using rga.
Function code adapted from https://github.com/phiresky/ripgrep-all

Can be interactively searched, should be reasonably fast once indexing
is finished.
2020-11-25 11:36:21 +01:00
Marty Oehme a85a39fc40
sh: Fix fzfhistory alias
Alias previously would only search the x last history entries (~20),
this fixes it to search through the complete shell history.
2020-09-25 11:26:57 +02:00
Marty Oehme b280e4f9ae
sh: Unify fzf function names, add fzfman function
`fzfman` will gather all manpage topics and display them in a fzf list
to choose from. Selection will open the corresponding manpage.

Other fzf- functions have been standardized in their naming scheme:
fzf and the function without any spaces, e.g.

`fzfhistory`, `fzfyay`, `fzfyayrns`.
2020-07-23 15:33:02 +02:00
Marty Oehme d5b7646611
Add make recursive dir alias, fix tmux alias
Fixes tmux session function alias and renames function to be a bit more
descriptive.

Added basic `md` alias to recursively `mkdir` directories.
2020-02-16 14:21:42 +01:00
Marty Oehme 348a167390 Fix tmux vim navigator movement
Fixes tmux xdg-compliance (and, more importantly, Tmux Plugin Manager's)
by setting the environment variable TMUX_PLUGIN_MANAGER_PATH to follow
xdg specifications. Tmux, due to not being xdg-compliant, needs to be
aliased to start with the `-f` option pointing into the configuration
directory.

Fixes tmux vim nagigator's controls being overwritten by other control
schemes in tmux.
2020-02-06 20:49:15 +01:00
Marty Oehme 2c374249d4 Move git aliases to git stow module 2020-02-04 10:06:33 +01:00
Marty Oehme 87308cbce9 Add git merge merge request on sucess alias
Works for gitlab.com, will merge a MR when the pipeline has finished
running sucessfully.
2020-02-02 16:13:51 +01:00
Marty Oehme 6380affb6f Add basic XDG compliant sh architecture
The only file left in $HOME is .zshenv, which sets up zsh to source everything from XDG_CONFIG_HOME/zsh.
Shell files are split into sh and zsh directories, for global assignments (which should be posix compliant, work on any posix shell) like environemnt variables, xdg vars, and global aliases. zsh contains zsh specific customization (prompt customization, plugin loading, zsh completions).

Zsh initialization will pull from sh directory first, loading the respective mirror to its startup file (`.zprofile` loads `sh/profile` and `profile.d/*`, `.zshenv` loads `sh/env` and `sh/env.d/*` and `zsh/env.d/*`, `.zshrc` loads `sh/alias`, `sh/alias.d/*` and `zsh/alias.d/*`)

Once all is done, it will have loaded both global variables, aliases and settings, and zsh-only specifications. Other stow modules, if they want to add shell functionality, can include their aliases and functions in one of the above directories to automatically be picked up by zsh.
2020-02-02 15:08:40 +00:00