Commit graph

46 commits

Author SHA1 Message Date
94cd954df9
sh: Reintegrate clip script
Brought back an old universal clipping script and updated it to work
better - well, at all. Can now decide between wl-copy, xclip and xsel
and will do so in that order.
Can take clipping material from the following arguments (will clip any
and all following arguments) or from stdin. Stdin has precedence.
Not much more to say really, but makes writing other applications a bit
more universal when they rely on this universal little tool.
2022-02-11 21:32:16 +01: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
cf85357f5c
sh: Add minimum version checker
Added another building block program. This program will be required
going forward in other modules. `version_at_least` takes two version
numbers and returns true if the second is higher than the first.

That means primarily it is useful to check if a program fulfills a
minimum required version, e.g.: `version_at_least 2.1 $(my_program -v)`.
Will be primarily useful for git version checking in the near future.

It has a second possibility of checking for ordered version numbers
passed in but this is of less use. Check source for more information.
2021-11-23 10:30:57 +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
3bf5becbe2
sh: Add internet-check base script
Added script to sh base package to allow checking for internet
connectivity. Checks both through system virtual filesystem and, as a
fallback, through pinging google dns.

Added a simple readme to sh module.
2021-09-24 11:16:29 +02: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
b7e13d649d
[sh] Add wording argument to exist script
Added optional third argument to exist script which can be used to
identify the program or process that needs the command exist looks for.
This makes it easier to identify *who* called exist and is missing
something.
2020-05-11 16:52:51 +02:00
393dd4e042
[sh] Remove dimswitch,clean homedir,improve exist
Removed dimswitch script. I liked it but it has been utterly superseded
by styler; if wanting to switch light and dark I can just switch to
light or dark base16 theme and do not have to rely on alacritty config
file hacking through dimswitch (well, now just through styler, yay.)

exist script will print message to stdout even if it prints to notify,
this makes more sense since now passing a loudness factor just adds it
to the message, instead of replacing printed message with libnotify.

Added stow ignores to top-level files. Not entirely sure if it is
needed, but they were linked on my system and the change shouldn't hurt.
2020-02-23 22:39:51 +01: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
145548c01a
Change ifinstalled script to exist
Renamed ifinstalled to exist, moved it into base shell module. It can be
called with just a command name to check for, or with an additional
libnotify urgency level (low, normal, critical).

If called with an urgency as the second argument, the user will be
notified of the missing command with the corresponding urgency.
2020-02-08 20:23:30 +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
2c374249d4 Move git aliases to git stow module 2020-02-04 10:06:33 +01:00
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
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