Commit graph

53 commits

Author SHA1 Message Date
4f75888dfe
sh: Remove docker xdg configuration
Podman rebels if it finds an explicitly set DOCKER_CONFIG file pointing
to a non-existent (due to using podman) configuration file. Since we are
not using docker anyway, this removes the env var.
2023-01-07 14:56:09 +01:00
5d2ed8174c
sh: Add hidden file inclusive ls tree view 2023-01-07 14:54:55 +01:00
3ece309f67
sh: Add imv to iv image alias 2023-01-07 14:54:32 +01:00
2e6c1026fb
sh: Ensure environment editor is available
When setting the environment variable EDITOR in the shell, ensure that
the editor being set is actually available: It first tries nvim, then
falls back to micro, then nano (one of which really every distribution
should have).
2022-12-20 23:05:20 +01:00
c6f243c2c1
sh: Fix missing python configuration
Python complains if you point it to a different configuration file (as
we do with the changes to XDG directories) but it doesn't exist. So, we
simply check for its existence and create it if necessary when setting
up an environment.
2022-12-08 21:34:40 +01:00
cf7d890787
sh: Add timg aliases
Added shell aliases for 'image listings' which aims to mimic the `ls`
command in a very simple way.

Invoke it via `il` to display a grid of all images residing in current
directory. Images are being detected not by their extension but by
running a `file` operation on, so in very large directories this might
take a little (though, your terminal will probably buckle under the
weight of displaying thousands of images anyway, so use with care).

`IL` provides the same functionality but recurses into an arbitrary
amount of subdirectories. Very useful to get an overview of a certain
directory and its children but, again, think for a second before using
since this could easily spew thousands of pictures into your term.
2022-11-25 17:02:48 +01:00
fdc85e5569
sh: Replace kitty invocations with wezterm 2022-11-25 17:02:48 +01:00
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
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
03ec445076
sh: Fix XDG directory use for an array of apps 2022-06-28 11:30:46 +02:00
e25ce19719
sh: Add new XDG_STATE_HOME env var from spec
The XDG BASE DIRECTORY spec now includes a provision for 'state' stuff,
that does not quite fit into either the permanent nature of
XDG_DATA_HOME, nor into the impermanence and deletable nature of
XDG_CACHE_HOME - i.e. longer running logs or history files. Things you
don't necessarily need backed up at all times, but things that should
also not change every time the tmpfs is flushed, should you run your
.cache directory under one.

More here: https://teddit.net/r/linux/comments/ny34vs/new_xdg_state_home_in_xdg_base_directory_spec/
and here: https://wiki.debian.org/XDGBaseDirectorySpecification#state
2022-06-28 10:21:14 +02:00
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
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
3cee46358e
sh: Add serve alias to create a quick file server
Quickly put up a file server in the current directory by typing `serve`
and the rest is figured out automatically.

Makes use of `sfz`, `gossa`, `rossa` in that order to set up the file
server.
2022-01-30 11:41:00 +01:00
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
5ee71ae705
sh: Fix graphical session start for ssh sessions
The autostart function would accidentally start multiple new graphical
sessions in one terminal when connected to the machine over sshd.

This should fix multiple starts while keeping the old functionality and
speed of checking intact.
2022-01-28 10:15:47 +01:00
6fabac6cd8
kitty: Switch to kitty terminal emulator
Finally made the switch from alacritty to kitty. I have been thinking
about this for a while. Both, fundamentally, serve my purposes just
fine. Both are fast, customizable, gpu accelerated, and so on.
Kitty feels a little faster on the input, but this should not provide
major differences.

One big difference, however, is now very apparent and I can feel it:
Alacritty, on wayland, does not support any picture preview. It does not
support sixel, and things like w3mimg or ueberzug are based on and
require X11 to run.
Kitty brings its own graphics display library and it seems both pretty
stable and fast.
I have not done much more with it than use it in things like vifm image
previews but it should be much more stable than things like ueberzug,
much faster than things like sixel. Time will tell.

Switched other modules to make use of kitty instead of alacritty:
vifm uses kitty previews,
river spawns kitty instances,
systemd units use kitty instances,
waybar presents extra mouse-click interactions through kitty,
and styler contains a processor to style kitty permanently.

I would love to converge this all a bit more on the `$TERMINAL` env var,
but this is unfortunately difficult for things like systemd and waybar.
For waybar I currently see no real way except for a custom
`ideal-terminal` script which just goes down the list of terminal
emulators I want to run, depending on which is installed,
since it does not read env vars,
while for systemd it might be feasible to import user environment
variables,
but also connected to additional complexity and overhead which it does
not seem worth for the currently two simple service units it affects.

Also removed some obsolete sxhkd and sh settings from the move to
wayland.
2022-01-16 15:18:07 +01:00
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
6ac552d3d5
Switch to wayland
Added a simple wayland configuration.
Currently set up simple wayland configuration based on river window
manager and waybar.
Rivercarro is the layout manager, being the same in principle as rivertile,
the default layout manager for river, only it comes with smart gaps
(gaps turn off if there is only one window open)
and monocle mode (give one window all space).

Runs `keyd` in the background to replace the old `xcape` capslock switching
(capslock is escape and if held control).
Uses `swaybg` to set a wallpaper.

Added powermenu and lockscreen scripts.
Improved lockscreen script to detect and work for wayland.
Moved old rofi mode 'powermenu' to more general powermenu script,
which works with any rofi-like selector (dmenu, bemenu, wofi, etc.)
Loses some of its design quality but since it was wonky anyway,
and I rarely see the menu,
we could repurpose its functionality for a more general powermenu
concept.
Currently hardcoded for `bemenu` but can be easily swapped and possibly
even extended back to rofi.
Fixed file upload link sharing to clipboard.

Updated rofi-pass to pass-pick.
Made rofi-pass universal and less integrated to rofi - that's also the
reason for the name change.
`pass-pick` works with rofi (default), bemenu or dmenu. In theory it
should also work with any other picker that contains a stdin listing
function similar to dmenu.
It has been definitely tested both on rofi and bemenu.
The best user experience still reigns on rofi, where available keys are
displayed on the picker and the keys themselves make the most sense.
But all functions can be reached from bemenu as well, though the key
mappings are more arbitrary and can not be changed as in rofi.
The autofilling tool works with both xdotool and ydotool, so should work
both on X11 and on Wayland. Ydotool ideally requires its daemon to be
running, otherwise some of the typing may get gut off. Otherwise no
change should be necessary.

Updated qutebrowser open_download for bemenu.
Updated download opening script to work with both rofi and bemenu.
Prefers original rofi implementation but works with both, and can be set
to use a custom dmenu-like file picker as well.

Add brightnessctl and removed custom audio / brightness scripts since they
became unnecessary.

Updated bootstrap script to include system files:
With `keyd` taking its configuration from the `/etc` directory and not
home, a second stow stage was necessary. These stow files are in a
module called `system-packages` inside the top-level `bootstrap` stow
package.
They will not be installed by the default dotfile stow invocation but
have been integrated as an extra step into the install script.
Installing this module requires sudo privileges!

Switched vifm überzug to sixel graphics rendering.
überzug relies on X11 functionality to work, while sixel does not.
Unfortunately, alacritty does not work with sixel graphics yet, only
foot does (somewhat).

Waybar currently runs the gruvbox dark soft color scheme.
Added the old polybar archupdates script to waybar and extended it to
output json format with additional metadata that waybar can read.
Can still output the old plaintext format that polybar expects.
Added a wireguard connection to waybar,shows if currently
connected to either a wireguard or tun VPN service.
If so, shows an icon in the waybar - that can be hovered over to show
the full assigned IP address.
Added an upcoming event display to waybar,
a simple event indicator to show upcoming events on the calendar, on
hovering over it the tooltip lists all upcoming events.

Added `screenshot` script to take simple screenshots and
rectangle region shots of the current output.
Can be invoked through the river shortcut PrintScr:
`PrintScr` - Fullscreen screenshot
`Mod+PrintScr` - Region screenshot
`Shift+PrintScr` - Fullscreen screenshot and file upload
`Mod+Shift+PrintScr` - Region screenshot and file upload

Extended `sharefile` to take paths through stdin and make
use of `fd` if it is found on the system.
2021-11-30 22:30:07 +01:00
e617d4ae1e
xdg: Reorder xdg home directories slightly
Moved pictures and videos back to home directory since they are, first,
not part of a 'media' collection and, second, on a different share to
my personal media assortment.
2021-11-16 12:09:46 +01:00
31a2c283df
fasd: Fix directory display to work on all shells
Fixed printing of ingested directories to use printf which works on all
shells instead of zsh specific print.
2021-07-07 10:28:15 +02:00
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
c9c0490cbf
xdg: Move xdg media directories
Moved all directories with media contents (pictures, videos, music) to a
single coherent media directory.
2021-04-18 13:04:59 +02:00
0d978f7673
sh: Update xdg directory auto creation
Improved the automatic directory creation somewhat:
It now looks for either a file existing there (could be a directory,
could be an actual file), or a symbolic link pointing somewhere else.

Only if none of those things are at the xdg location will it try to
create a new directory there.

Additionally, it will set the correct permissions for the whole folder
chain being created, NOT just for the last folder in the chain.

vifm: Switch to new xdg directory structure
2021-04-18 13:04:01 +02:00
f4400da743
repo: Update linting for 4-spaced shell scripts 2021-04-04 20:52:52 +02:00
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
bcd90e7048
sh: Fix mkdir issue after removing XDG env vars
Fixed bug introduced in 15f5f0b when removing the environment variable
for two XDG directories, but not their creation.
The test would check an empty directory for its existence and, not
finding '' to be a directory, attempt to create it instead - resulting
in the attempt to create a directory of an empty string.
2021-03-22 21:05:15 +01:00
15f5f0b5c9
sh: Remove xdg dirs for template, public
Removed the template and public configurations of XDG directories in my
home dir. They clutter up the place and, so far, I've never needed them.
2021-03-16 11:57:36 +01:00
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
ed881273b8
taskwarrior: Move xdg env variable to module 2021-02-19 16:54:39 +01:00
b0bfbf730a
taskwarrior: Prepare xdg compliance
Add environment variables telling taskwarrior to make use of xdg
compliant directory structure for its configuration and its data.
2021-02-19 16:54:38 +01:00
696953d3f7
shell: Switch to xterm TERM variable
Move any and all display to xterm-256color color variable, to enable
always the same color display.
2021-02-19 16:12:06 +01:00
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
ec3c5759f7
paru: Change to match yay display
Renamed the syu file to yay, since it more explicitly captures the
concept in my mind.

Added `--bottomup` option to any paru operation since that is the way I
expect it to work: the 'closest' option is also closest to the
commandline.
2020-12-24 21:49:36 +01:00
8cb3252cf1
sh: Switch yay to paru
Removed outdated `syu` symlink which just hooks into topgrade.
Replaced it with simple function that tries for topgrade, paru, yay,
pacman, in that order. Can still be invoked with simple `syu` command,
but *only* through interactive terminal use.

Switched git pre-commit hook to default to paru instead of yay when
compiling installed package lists for dotfile commits.
2020-12-22 19:54:38 +01:00
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
ca692d30d0
sh: Add default fzf options and binds
tab and shift-tab will select up and down,
ctrl-g moves to the first entry,
ctrl-t toggles the preview window on and off,
ctrl-d/ctrl-u scroll through the preview window.

By default, a preview window of the contents of whatever file is
currently selected will be displayed.

I would rather have the preview hidden by default, but it is hidden in
the default options it becomes hard to show it automatically again for
individual commands, so this seems a better compromise.
2020-10-08 11:09:13 +02:00
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
717f2a13d6
X: Remove xdg-user-dirs, manually set dirs with sh
We already have a file which is strictly dedicated to xdg setting
environment variables and taking care of folder creations.

Using xdg-user-dirs as an application was basically doubling up on that.
Also, I don't need my directories localized - I just want them to point
to exactly where they should.
2020-07-29 08:13:31 +02:00
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
6a22991026
[sh] Fix comparison error for autostart x script
When no virtual terminal is set (as an XDG value by e.g. the linux
installation), fixes error complaining about comparing nothing with an
integer.
2020-06-25 09:40:54 +02:00
6e75d1b485
[sh] Fix static analysis error
Fixed shellcheck error for updated version in ssh-agent configuration.
2020-06-19 16:09:11 +02:00
75a8978a0a
[bash] Fix sourcing of xdg vars and terminfo
Fixed setting up the initial variable pointing to the xdg directory to
enable bash to source its files from the `.config environment`
2020-05-28 18:06:54 +02:00
3a40925615
[sh] Default TERM to xterm if no terminfo exists 2020-05-28 14:22:31 +02:00
11a6eda0ce
[sxhkd] Fix shortcuts, Add bib-due overview
Changed sxhkd being hard-coded to use alacritty as a terminal. Though I
don't see myself switching soon, changed the shortcut to make use of the
already existing environment variable "$TERMINAL" which gets set as part
of my basic env settings on the machine.

Added pre-defined filter for styler entries, removing 256 color versions
of base16 themes, as well as all atelier styles. I never use -256
versions of the themes so they can be hidden. If I want to use an
atelier style (which is rarely), I can quickly remove the pre-defined
filter since it is the last one added.

Added a mapping to academia mode which shows *all* due papers, to get an
overview at a glance. Uses F3, so that academia mappings go F1->F3 from
most restricted to most encompassing views.
2020-05-28 10:30:58 +02:00
7c78936e5b
[sh] Add easy font listing alias
Added `fontfamilies` alias which tries to remove duplicate entries from
the `fc-list` command and display them. Can be used for easy finding of
installed font-families, thus the name.
2020-05-27 20:55:20 +02:00
9b362cae38
[sh] Fix linter errors 2020-05-19 17:59:13 +02:00
1ae92cfc2a
[bash] Fix bash profile initialization
Removed automatic initializations of zsh functions.
Fixed not calling correct folders for bash aliases, environment
variables and profile settings.
2020-05-19 17:34:28 +02:00
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
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