Skip to content

Instantly share code, notes, and snippets.

View dardo82's full-sized avatar
🏠
Working from home

Michele Venturi dardo82

🏠
Working from home
View GitHub Profile
@dardo82
dardo82 / locale.conf
Last active February 25, 2025 16:31
LANG conf
LANG=it_IT.UTF-8
LC_ADDRESS=it_IT.UTF-8
LC_IDENTIFICATION=it_IT.UTF-8
LC_MEASUREMENT=it_IT.UTF-8
LC_MESSAGES=en_US.UTF-8
LC_MONETARY=it_IT.UTF-8
LC_NAME=it_IT.UTF-8
LC_NUMERIC=it_IT.UTF-8
LC_PAPER=it_IT.UTF-8
LC_TELEPHONE=it_IT.UTF-8
@dardo82
dardo82 / xfm
Created February 8, 2025 17:16
XFCE4 apps
#!/usr/bin/env zsh
NAWW="_NET_ACTIVE_WINDOW(WINDOW):"
ICON_DIR="/usr/share/icons/hicolor/128x128/apps"
spiral () {
local AWL=$(xprop -root | awk "/${(q)NAWW}/"'{print $5}')
xseticon -id "${AWL/,}" "$1"
}
xfce4 () {
@dardo82
dardo82 / paru.conf
Created January 15, 2025 06:07
paru Conf
# /etc/paru.conf
# "man paru.conf" for options.
[options]
Provides
BottomUp
PgpFetch
SudoLoop
@dardo82
dardo82 / .lynx.cfg
Created January 15, 2025 04:48
lynx CONF
DEFAULT_INDEX_FILE:http://scout.wisc.edu/
STARTFILE:https://lynx.invisible-island.net/
HELPFILE:file:///usr/share/doc/lynx/lynx_help/lynx_help_main.html
SET_COOKIES:TRUE
ACCEPT_ALL_COOKIES:TRUE
PERSISTENT_COOKIES:TRUE
COOKIE_FILE:~/.lynx_cookies
COOKIE_SAVE_FILE:~/.lynx_cookies
@dardo82
dardo82 / .tmux_history
Created January 14, 2025 13:37
Tmux History
command:set-option history-file ~/.tmux_history
command:set-option prompt-history-limit 1000
command:set-option lock-after-time 100
command:0
command:set-option lock-after-time 300
command:300
command:set-option prefix C-S
command:C-b
command:set-option prefix C-s
command:C-s
@dardo82
dardo82 / .tmux.conf
Created January 14, 2025 13:35
Tmux Conf
set-option -g mouse "on"
set-option -g prefix "C-x"
set-option -g lock-after-time "300"
set-option -g prompt-history-limit "1000"
set-option -g history-file "~/.tmux_history"
set-option -g status-interval "1"
set-option -g status-style "bg=blue, fg=white"
@dardo82
dardo82 / .mailcap
Created January 14, 2025 13:29
MailCap
# MailCap
audio/*; /usr/bin/play %s; needsterminal
video/*; /usr/bin/mpv %s; needsterminal
image/*; /usr/bin/fbi%s; needsterminal
text/html; /usr/bin/w3m %s; needsterminal
application/pdf; /usr/bin/fbgs -xxl %s; needsterminal
@dardo82
dardo82 / fb-term-bg.sh
Last active March 1, 2025 04:36
FBterm with BG
#!/usr/bin/env zsh
BG_DIR="/usr/share/backgrounds"
OSID=$(awk -F= "/LIKE/"'{print $2}' /etc/os-release)
BG="$BG_DIR/**/*${(C)OSID}*.png"; BG=$(eval echo "$BG")
FONT_NAME=$( awk -F= "/FONT/"'{print $2}' /etc/vconsole.conf)
FONT_ALIAS=$(fc-list | awk "/$FONT_NAME/"'{print $2}')
FONT_SIZE="${${FONT_NAME#*-}:1:2}"
export FBTERM_BACKGROUND_IMAGE="1"
@dardo82
dardo82 / find-dl-file-pkg-repo.sh
Created November 17, 2024 07:43
DL files by name from Arch PKG repo
#!/bin/zsh
mkdir -p $1; cd $1; pwd
PKG_LIST=$(paru -F -x ".*$1(-.[a-z]+)?(.sh|$)" | \
awk -F '/| ' "/^[a-z]/"'{print $2}')
for PKG in $PKG_LIST; do
paru -S -d -d -w $PKG
mv -v $PKG_DIR/$PKG-* .
tar --one-top-level --wildcards --zstd -x \*$1\* -v -f $PKG-*
@dardo82
dardo82 / Kodi-Icon.sh
Last active October 11, 2022 07:43
FrontRow Kodi Icon
#!/bin/sh
BASE="FrontRow.png"; LOGO="Kodi.png"; PNG="${LOGO%.*}-$BASE"
ICNS=${PNG/.png/.icns}; SIZE=$(file "$BASE" | cut -d' ' -f5)
for n in {0..3}; do eval S$n="$[$SIZE/(2**$n)]"; done
DIM="${S2}x${S2}"; POS="+$[($S2+$S3)]+$[($S0/3)-$S3]"
convert $BASE \( $LOGO -geometry $DIM$POS \) \
-compose soft-light -composite $PNG