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 / README.md
Last active March 22, 2024 20:33
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.

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