This file contains hidden or 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 python | |
| from __future__ import print_function | |
| import os | |
| from sys import argv, exit | |
| import re | |
| from time import sleep | |
| import requests |
This file contains hidden or 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 | |
| if [[ $EUID -ne 0 ]]; then | |
| # Find this script in the filesystem so we can re-run it. (There are probably better ways of doing this.) | |
| self="$(cd $(dirname $(pwd -P)/${BASH_SOURCE[0]}) && pwd -P)/$(basename ${BASH_SOURCE[0]})" | |
| admin_prompt="Hax requires root plz" | |
| exec 10>&1 11>&2 # Copy stdout and stderr so we can bypass osascript's control of the terminal. | |
| osascript -e "do shell script \"$self >&10 2>&11\" \ |
This file contains hidden or 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
| { | |
| "global": { | |
| "check_for_updates_on_startup": true, | |
| "show_in_menu_bar": false, | |
| "show_profile_name_in_menu_bar": false | |
| }, | |
| "profiles": [ | |
| { | |
| "complex_modifications": { | |
| "parameters": { |
This file contains hidden or 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 zsh | |
| set -o pipefail | |
| pending=$(checkupdates) | |
| printf '%s\n' "${pending[@]}" | |
| pending_names=( $(echo $pending | cut -d' ' -f1) ) | |
| ignores=( $(pacconf IgnorePkg) ) |
This file contains hidden or 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 zsh | |
| # Poor soul's `docker-machine env` equivalent using ssh forwarding. | |
| # Assumes that the remote docker is listening on tcp://127.0.0.1:2375. | |
| LOCAL_DOCKER_PORT=${LOCAL_DOCKER_PORT:-22375} | |
| pidfile="/var/run/user/$(id -u)/docker-forward-session.pid" | |
| existing_session=$(cat $pidfile 2>/dev/null) | |
| if [[ $1 == stop ]]; then |
This file contains hidden or 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
| #!/bin/env bash | |
| device=$(bluetoothctl paired-devices | grep -iE "$1" | cut -d' ' -f2) | |
| if [[ -n $2 ]]; then | |
| command=$(bluetoothctl help | cut -d' ' -f1 | grep -iE "$2" | head -n1 | perl -pe 's/\e([^\[\]]|\[.*?[a-zA-Z]|\].*?\a)//g') | |
| else | |
| command="connect" | |
| fi | |
| echo "Command: bluetoothctl $command $device" |
This file contains hidden or 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 | |
| pid=$(cat /proc/*/stat 2>/dev/null | awk '{if ($4 == focused_pid) { print $1 }}' focused_pid="$(swaymsg -t get_tree | jq 'recurse(.nodes[]?) | select(.focused).pid')") | |
| directory=$(readlink "/proc/$pid/cwd") | |
| swaymsg "exec 'cd $directory; exec \$term'" |
This file contains hidden or 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 | |
| # Bless jq, it even does the math for us | |
| swaymsg "[con_id=$(swaymsg -t get_tree | jq "recurse(.nodes[]; .nodes) | .nodes | select(any(.focused)) | .[$1-1].id")]" focus |
OlderNewer