Skip to content

Instantly share code, notes, and snippets.

@brunomiguel
brunomiguel / XScreenManage.sh
Last active March 18, 2024 01:55
Manage screensaver and screen blanking statuses on X11
function XScreenManage {
if ! command -v notify-send &> /dev/null; then
echo -e "Warning: notify-send could not be found. Please install it using\
your distribution native package manager. On Arch Linux, you can install it\
with \"sudo pacman -Sy libnotify\""
return 1 2>/dev/null
fi
local blanking() {
@brunomiguel
brunomiguel / toot-for-zsh.sh
Last active November 28, 2022 01:40
Toot with images from ZSH using the toot command line client for Mastodon (I'm using it as a function on my .zshrc)
# Toot with images from the command line
# License: GPLv3 (https://www.gnu.org/licenses/gpl-3.0.txt)
function tooti {
# Allow using trap inside a function
set -o localoptions -o localtraps
# Check if toot is in $PATH
if ! type toot > /dev/null; then
echo -e "\n\e[0;93mWarning: toot not found in \$PATH\n"
echo -e "Please install it using your package manager or from https://github.com/ihabunek/toot\n"
@brunomiguel
brunomiguel / mastodon-tweaks.css
Last active November 15, 2022 18:16
Tweaks para o Mastodon
:root,
html,
body {
font-family: "inter", rubik, sans-serif !important;
}
body.theme-mastodon-light {
background: #f4f8fa !important;
}
@brunomiguel
brunomiguel / gist:6c77708813f457f48ea1e492f4c74d6f
Created January 21, 2022 09:55
picom-ibhagwan-git config
# ░█▀█░▀█▀░█▀▀░█▀█░█▄█░░░░█▀▀░█▀█░█▀█░█▀▀
# ░█▀▀░░█░░█░░░█░█░█░█░░░░█░░░█░█░█░█░█▀▀
# ░▀░░░▀▀▀░▀▀▀░▀▀▀░▀░▀░▀░░▀▀▀░▀▀▀░▀░▀░▀░░
#
# X compositor configuration
# ░█▀▀░█░█░█▀█░█▀▄░█▀█░█░█
# ░▀▀█░█▀█░█▀█░█░█░█░█░█▄█
# ░▀▀▀░▀░▀░▀░▀░▀▀░░▀▀▀░▀░▀
@brunomiguel
brunomiguel / discord-theme-improvements.css
Last active February 16, 2022 16:26
My personal changes to Discord's theme, to be used with Stylus browser extension
* {
-webkit-font-smoothing: subpixel-antialiased !important;
text-rendering: optimizelegibility !important;
-moz-osx-font-smoothing: grayscale !important;
/*font-smooth: grayscale !important;*/
font-smooth: always !important;
}
:root {
--text-link: hsl(212,calc(var(--saturation-factor, 1)*100%),43.9%);
@brunomiguel
brunomiguel / better-tweetdeck-css-changes.css
Created November 12, 2021 17:23
Better Tweetdeck CSS changes
/* I'm using FiraGo (https://github.com/bBoxType/FiraGO) as the default font in the browser */
* {font-family: sans-serif !important;}
/* adds a bit of padding to the card showing a tweet */
article {
padding: 10px 5px !important
}
/* I prefer light borders */
html.dark .stream-item, html.dark .column-header {
@brunomiguel
brunomiguel / dark-aur.css
Last active September 30, 2021 17:41
AUR Dark Theme, to be used with the browser addon Stylus. This is an alpha version
* {
font-family: sans-serif !important;
}
body {
background: #222 !important;
color: #eee;
}
a:visited {
#! /usr/bin/env bash
UPTIME_DAYS=$(expr `cat /proc/uptime | cut -d '.' -f1` % 31556926 / 86400)
UPTIME_HOURS=$(expr `cat /proc/uptime | cut -d '.' -f1` % 31556926 % 86400 / 3600)
UPTIME_MINUTES=$(expr `cat /proc/uptime | cut -d '.' -f1` % 31556926 % 86400 % 3600 / 60)
# Basic info
HOSTNAME=`uname -n`
ROOT=`df -Ph | grep -w nbd0p1 | awk '{print $4}' | tr -d '\n'`
@brunomiguel
brunomiguel / .bashrc
Last active September 19, 2018 06:46
Simple bash PS1 prompt
if [ "$color_prompt" = yes ]; then
PS1="\[\033[01;32m\]\u@\h\[\033[01;34m\]:\w\[\033[00m\]\n\\$: \[$(tput sgr0)\]"
else
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
fi
unset color_prompt force_color_prompt