Skip to content

Instantly share code, notes, and snippets.

View uncomfyhalomacro's full-sized avatar
🇵🇭
Manifesting 🌠

Soc Virnyl S. Estela uncomfyhalomacro

🇵🇭
Manifesting 🌠
View GitHub Profile
@uncomfyhalomacro
uncomfyhalomacro / SOS.md
Created March 19, 2022 00:53 — forked from vodik/SOS.md
_Never_ -Sy when installing!

Once upon a time there was a user that wanted to install firefox.

The user tried to do pacman -S firefox but it didn't work. The all mighty pacman reported that firefox-3.2.4-1.i686.pkg.tar.gz could not be found on his mirror. So the user tried pacman -Sy firefox. It worked and the user rejoiced since he could once again go and troll /h/.

But all was not good. The user had made a grave error!

See, when the user told the almighty pacman to -Sy firefox, pacman did

@uncomfyhalomacro
uncomfyhalomacro / colorpicker.sh
Created March 2, 2022 09:24
Colorpicker script using wayshot and slurp with ImageMagick
#!/bin/bash
shopt -s lastpipe
COLOR="$(wayshot -s "$(slurp -p -f '%x %y %w %h')" --stdout | magick identify -format '#%[hex:p{0,0}]\n%[pixel:p{0,0}]' -)"
SRGB="$(echo "${COLOR}" | tail -n +2)"
HEX="$(echo "${COLOR}" | head -n +1)"
RESULT="${SRGB} ${HEX}"
[ -z "${COLOR}" ] && exit
notify-send -a "Colorpicker" "Color on selected pixel: ${RESULT}" "Hex value copied to clipboard"
@uncomfyhalomacro
uncomfyhalomacro / arch-tricks.md
Last active January 13, 2022 09:59 — forked from juancarlospaco/arch-tricks.md
Arch Linux Tips & Tricks

Required Packages

sudo pacman -S xdelta3 ccache axel

pacman.conf

@uncomfyhalomacro
uncomfyhalomacro / .tmux.conf
Created December 27, 2021 06:25
minimal tmux conf
set-option -ga terminal-overrides ",xterm-256color:Tc"
set -g default-terminal "screen-256color"
set -g mouse on
set-window-option -g aggressive-resize
bind-key = select-layout even-horizontal
bind-key \\ select-layout even-vertical
@uncomfyhalomacro
uncomfyhalomacro / README.md
Created December 6, 2021 07:23 — forked from progandy/README.md
Sway output mirror and screencast

Sway output mirror and screencast

Mirror

wf-recorder

With wf-recorder it is possible to record one output. When ffmpeg is compiled with sdl support, then it is possible to use "sdl" as the muxer and replay the recorded video instead of writing it to a file.

@uncomfyhalomacro
uncomfyhalomacro / README.md
Created December 4, 2021 06:40 — forked from gbrlsnchs/README.md
Void Linux Installation Guide (UEFI + chroot + brtfs + LUKS-encrypted root and swapfile)

Installation guide for Void Linux with LUKS-encrypted btrfs root

NOTE

I have ported this Gist to a handbook. I'll not maintain this Gist anymore, but will keep it here for future references. You can access the respective chapter in the handbook here.

Introduction

In this guide you will find:

  • btrfs with Zstandard compression
  • LUKS-encrypted root and swapfile
  • GRUB with UEFI
#!/usr/bin/env bash
# Launcher for executables inside desktop files
shopt -s lastpipe
source ~/.bashrc
IFS=$'\n' read -r -d '' -a desktops <<< "$(find /usr/share/applications/ $HOME/.local/share/applications/ $HOME/.local/share/flatpak/exports/share/applications/ -name "*.desktop" 2> /dev/null)"
for i in "${desktops[@]}"; do echo "$(cat "${i}" | awk -F: '/^Name=/{sub(/^Name=/, ""); print; exit}')" ; done | fzf -e -i --prompt='launch: ' | read -r cmd
for i in "${desktops[@]}"
do
#!/bin/sh
shopt -s lastpipe
firefoxprofile=("personal" "social" "school")
printf "%s\n" "${firefoxprofile[@]}" | fzf -e -i --prompt='launch firefox profile: ' | read -r profile
command="firefox -P \"${profile}\""
[ -z "${profile}" ] && exit
#!/bin/sh
shopt -s lastpipe
clipman pick -t STDOUT | fzf -e -i --prompt="clipboard: " | read -r hmm
[ -z "${hmm}" ] && exit
#!/bin/sh
# Uses fd - https://github.com/sharkdp/fd
# Uses epub2txt2 - https://github.com/kevinboone/epub2txt2
# Uses pdftotext from poppler
DOC="$HOME/Documents"
export DOC
tmp_pdf_file="$(mktemp)"