I hereby claim:
- I am miyalys on github.
- I am miyalys (https://keybase.io/miyalys) on keybase.
- I have a public key whose fingerprint is 8F17 AD08 3D5A 002F FEB9 14C5 BACE FC9A 881E 2EB5
To claim this, I am signing this object:
#! /usr/bin/env sh | |
# A hyprland script for a laptop-external-monitor setup, toggling between which is in use | |
# Launch at startup to make hyprland disable the internal monitor if an external monitor is detected and enabled | |
# Additionally it's called with a keybind to switch between a laptop monitor and an external display | |
# Ideally the conditional monitor behaviour was instead done directly in hyprland.conf, but I'm not sure whether that's possible | |
# | |
# Relevant info: | |
# - hyprctl monitors: identifies currently enabled monitors |
#! /usr/bin/env sh | |
# Screenshot program wrapper, pre-setting path. | |
# Allows you to select whether to save to disk or copy to clipboard, and additionally whether to select an area or | |
# capture the full screen. | |
# | |
# Suggested usage: | |
# Make a keybind for it, such as the PrintScreen key. | |
# | |
# Prerequisites: |
#!/usr/bin/env sh | |
# This script switches between whatever sources exist. | |
# Removing pulseaudio (but not libpulse) means removing pacmd, so this is an attempt at switching the default via pactl instead. | |
# Cycles through all sources and sets whatever is the next one as the default. | |
# Pass -g to just print the current default source | |
CUR_DEFAULT="$(pactl info | grep 'Default Source' | cut -d':' -f 2)" | |
SOURCES="$(pactl list short sources | cut -d' ' -f 2)" |
#! /usr/bin/env sh | |
# This script switches between whatever sinks exist. | |
# Removing pulseaudio (but not libpulse) means removing pacmd, so this is an attempt at switching the default via pactl instead. | |
# Sinks can be specified by name or index. Index changes sometimes when you disconnect and reconnect, restart or whatever, so names are better as they are persistent. | |
# Annoyingly the command used to switch audio over to a new sink cannot take a name as its argument, otherwise I'd only need the name here. | |
# TODO: Trigger a zenity or dmenu dialog with entr that asks whether to switch monitor and/or sound to hdmi? Could do | |
# the same for mounting. |
# Description: | |
# 1. Check if inside git repository. | |
# 2. If so list all branches except the current including its remote equivalent. | |
# 3. Remove duplicates that are both local and remote. | |
# 4. Send it to fzf, and checkout the branch chosen from there. | |
git config --global alias.co '! git rev-parse --is-inside-work-tree > /dev/null 2>&1 && git branch -a | sed -e "\,HEAD\|$(git branch --show-current),d" | sed "s,remotes/origin/,," | sort | uniq | fzf | xargs -r git checkout' | |
# Here's a cowsay/lolcat version for the adventurous: | |
# git config --global alias.co '! a=$(git rev-parse --is-inside-work-tree > /dev/null 2>&1 && git branch -a | sed -e "\,HEAD\|$(git branch --show-current),d" | sed "s,remotes/origin/,," | sort | uniq | fzf | xargs -r git checkout); [ -n "$a" ] && echo "$a" | cowsay -n | lolcat' |
# /usr/bin/env sh | |
# You've heard of exa/lsd, sd and fd. But what about a modern cd? | |
# This isn't really it. Try autojump/z/fasd? | |
# But maybe this does make plain old cd 5% better, on a good day? | |
# Description: Just a vaguely intelligent cd | |
# Specifically it can handle cd'ing to a path even if it has a filename | |
# at the end, in which case it cd's to the directory which contains it |
// ==UserScript== | |
// @name Rasmus Pandekage | |
// @namespace rasmuspandekage | |
// @include * | |
// @version 0.2 | |
// ==/UserScript== | |
// Just the source for the Chrome extension Rasmus Pandekage by tykfyr, | |
// so you can easily add it as a script for GreaseMonkey or Tampermonkey, including in other browsers than Chrome. | |
// Original extension link: https://chrome.google.com/webstore/detail/rasmus-pandekage/pfhcceonfnhnmmfgkeblckhfphmiiafi?hl=da |
# Origin: https://www.facebook.com/AndersSamuelsenLA/posts/10157429519542366 | |
import random | |
nouns = ["kærlighed", "tro", "håb", "fællesskab", "glæde", "lykke", "lyksaglighed", "salighed", "smidighed", "fleksibilitet", "ekstase"] | |
#se = ["fremad", "videre", "længere"] | |
adverbs = ["bedre", "hurtigere", "kærligere", "rarere", "blødere", "smukkere", "pænere", "frækkere", "flottere", "finere", "ædlere", "højere", "smartere"] | |
def a(): | |
elem = random.choice(adverbs) | |
adverbs.remove(elem) |
# Based off this answer http://stackoverflow.com/a/17880517/1172409 | |
# Ideally one wouldn't parse the output of iw scan (it may be subject to change), | |
# but dealing with learning libnl which iw uses seems overly complicated - more so than updating this in case iw does change. | |
# A few things that could be improved: | |
# Better padding solution for prettier pretty printing. | |
# Sort APs based off signal strength from best to worst. | |
# Usage - iw must be run as root (suggestion: add as an alias in bashrc): | |
# iw wlp8s0 scan | awk -f scan.awk |
I hereby claim:
To claim this, I am signing this object: