This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
usage() { | |
echo "Usage: $(basename "$0") [-d DEFAULT_BORDER_PX] [-m MAXIMIZED_BORDER_PX]" | |
} | |
get_waybar_height() { | |
# Waybar's config is JSONC, ie it contains comments. We need to strip | |
# these for jq. | |
grep -v '//' ~/.config/waybar/config | jq -er '.height' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Monitor D-Bus for XDG Portals screencasting events | |
# Requires: busctl and jq | |
echo_debug() { | |
if [[ -z "$DEBUG" ]] | |
then | |
return 0 | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://wiki.hyprland.org/Configuring/Binds/ | |
$mod = SUPER | |
# hyprland binds | |
bind = $mod SHIFT, C, exec, $bin_dir/kill-active.sh | |
bind = $mod SHIFT, K, exec, hyprctl kill | |
bind = $mod SHIFT, Q, exec, $bin_dir/leave.sh | |
bind = $mod SHIFT, R, exec, $bin_dir/reload-config.sh | |
bind = $mod ALT, R, forcerendererreload, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Feb 10 16:07:48 ge2 hyprland[2382428]: Welcome to Hyprland! | |
Feb 10 16:07:48 ge2 hyprland[2382428]: [LOG] Instance Signature: 84ab8d11e8951a6551d1e1bf87796a8589da6d47_1707577668 | |
Feb 10 16:07:48 ge2 hyprland[2382428]: [LOG] Hyprland PID: 2382428 | |
Feb 10 16:07:48 ge2 hyprland[2382428]: [LOG] ===== SYSTEM INFO: ===== | |
Feb 10 16:07:48 ge2 hyprland[2382428]: [LOG] System name: Linux | |
Feb 10 16:07:48 ge2 hyprland[2382428]: [LOG] Node name: ge2 | |
Feb 10 16:07:48 ge2 hyprland[2382428]: [LOG] Release: 6.7.4 | |
Feb 10 16:07:48 ge2 hyprland[2382428]: [LOG] Version: #1-NixOS SMP PREEMPT_DYNAMIC Mon Feb 5 20:17:12 UTC 2024 | |
Feb 10 16:07:48 ge2 hyprland[2382428]: [LOG] GPU information: | |
Feb 10 16:07:48 ge2 hyprland[2382428]: 00:02.0 VGA compatible controller [0300]: Intel Corporation Raptor Lake-P [Iris Xe Graphics] [8086:a7a0] (rev 04) (prog-if 00 [VGA controller]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
usage() { | |
echo "$(basename $0) VM" | |
} | |
get_vm_id() { | |
qm list | awk '/'"${1}"'/ { print $1 }' | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/homeassistant_cli/plugins/raw.py b/homeassistant_cli/plugins/raw.py | |
index 46c544e..62e6a1a 100644 | |
--- a/homeassistant_cli/plugins/raw.py | |
+++ b/homeassistant_cli/plugins/raw.py | |
@@ -61,7 +61,9 @@ def get(ctx: Configuration, method): | |
def post(ctx: Configuration, method, json): | |
"""Do a POST request against api/<method>.""" | |
if json: | |
- data = json_.loads(json) | |
+ data = json_.loads( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Generic PulseAudio wrapper commands | |
if (( ! $+commands[pactl] )) | |
then | |
return | |
fi | |
pulseaudio::list() { | |
local invert | |
local friendly_name | |
local monitor |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"meta": { | |
"theme": "elegant", | |
"canonical": "https://gist.github.com/pschmitt/0ab646d4a39b16393db354c6e1082305", | |
"version": "0.1", | |
"easter-egg": "Hello, recruiter! You made it. I'm honnestly amazed you actually just ran this random command you've seen on a resume! Cheers!" | |
}, | |
"basics": { | |
"name": "Philipp Schmitt", | |
"label": "Cloud Automation Engineer / DevOps", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wifi-scan() { | |
setopt localoptions pipefail errreturn | |
local device="$(wifnames | tail -1)" | |
local raw | |
zparseopts -D -K -E \ | |
r=raw -raw=raw | |
if [[ -z "$device" ]] |
NewerOlder