Skip to content

Instantly share code, notes, and snippets.

View tkapias's full-sized avatar
🏴‍☠️
Working from home

Tomasz Kapias tkapias

🏴‍☠️
Working from home
View GitHub Profile
@tkapias
tkapias / 0-Instructions.md
Last active May 27, 2024 18:17
vim-hexokinase configuration for Liquid Prompt

vim-hexokinase

Installation for vim8

In your vim config folder:

mkdir pack && cd pack
git init
git submodule add --depth=1 https://github.com/RRethy/vim-hexokinase ui/start/vim-hexokinase
@tkapias
tkapias / 11-functions-lservices.bashrc
Last active June 1, 2024 12:05
lservices - colorized and searchable table of all SystemD units & unit-files - extracted functions from my .bashrc
#!/usr/bin/env bash
# sourced by bash(1) for non-login shells.
# ==============================
# FUNCTIONS
# ==============================
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# check required commands
# example: $ checkcmds "fzf eza" "$FUNCNAME"
@tkapias
tkapias / README.md
Last active May 31, 2024 04:44
Calibre's epub Viewer: Custom layout & style

Notes to customize Calibre's Epub Viewer layout and style.

  • I don't share a copy of Calibre's configuration folder (it contains more configuration, like menu layouts).
  • I'm under Debian/Linux, but thoses notes can be adappted to the other versions.

image


Préférences / Styles

@tkapias
tkapias / README.md
Last active May 30, 2024 14:13
Displaying HTML emails in Neomutt's pager

Displaying HTML emails in Neomutt's pager

Neomutt configuration

My neomutt config files are huge and even their path is cusmotized with $VIMINIT.

I'm just sharing parts about auto_view and HTML mailcap, please update your config accordingly.

Customize and Build html2text

@tkapias
tkapias / gh-starred-to-opml.sh
Created February 7, 2024 19:18
Generates OPML 2.0 files to track the syndication of Releases (binaries or tags) from your favorite Github repositories. In their whole or by listings.
#!/usr/bin/env bash
shopt -s extglob
export LC_ALL="C.UTF-8"
export TZ=:/etc/localtime
Help()
{
echo "Generate an OPML 2.0 file to follow releases of starred repositories on Github"
@tkapias
tkapias / lf.sh
Last active October 1, 2023 14:54
List-Fuzzy: function for Bash 5+. List/filter/sort a location in sk/sk-tmux with lsd 1+ and xsel
# List-Fuzzy: lsd pipe to sk/sk-tmux then output to tty and clipboards
lf() {
Help() {
cat <<- HEREDOC
list-fuzzy: List/filter/sort a location in sk/sk-tmux
- inline|vertical output to 'stdout + clipboard'
- use only current or the first submitted path
Syntax: lf [-haefgnosv] [<path>]
@tkapias
tkapias / 11-functions.bashrc
Last active July 21, 2023 11:40
psg: a wrapper to output ps to a pager, colorized and with a filter option
#!/usr/bin/env bash
# executed by bash(1) for non-login shells.
# ==============================
# FUNCTIONS
# ==============================
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# a wrapper to output ps to a pager, colorized and with a filter option
psg() {
@tkapias
tkapias / wtoggle.sh
Last active April 8, 2024 08:23
Toggle or launch a new instance of a window with i3wm on a single screen setup.
#!/usr/bin/env bash
# Example for i3wm exec binding: toggle or run urxvtc in client mode (systemd daemon urxvtd), with setenv to bypass TMUX in my bashrc.
# bindcode $mod+Shift+49 exec --no-startup-id "/home/user/.config/i3/scripts/wtoggle.sh -i -c \\"^URxvt$\\" -n \\"^Terminal\sURxvt$\\" -m \\"urxvtc -title 'Terminal URxvt' -e sh -c 'TMUX=false bash'\\" -s \\"urxvtd\\""
# locale
export LC_ALL="C.UTF-8"
export TZ=:/etc/localtime
Help()
@tkapias
tkapias / fzf-img.sh
Last active September 5, 2023 21:29
fzf-img.sh - Image fuzzy finder with preview using fzf and ueberzug
#!/usr/bin/env bash
# This is just an example how ueberzug can be used with fzf.
# Copyright (C) 2019 Nico Bäurer
# Copyright (C) 2022 Tomasz Kapias
# - Updated:
# - optional PATH as only option
# - internal FDfind query for images
# - display SVGs after caching a converted png
# - Imagemagick's identify infos as header with margin