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
# | |
# bspwm hotkeys | |
# | |
super + c | |
echo "$(bspc query -D -d)" > /tmp/bspwmdtop_swap | |
#Not done yet. | |
super + v | |
bspc desktop $(bspwc query -D -d) -n tmp; \ |
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
{ | |
"Version":"2012-10-17", | |
"Statement":[ | |
{ | |
"Sid":"NameForBucketPolicy", | |
"Effect":"Allow", | |
"Principal":{ | |
"AWS":[ | |
"arn:aws:iam::111111111111:user/iam_user", | |
"arn:aws:iam::222222222222:user/iam_user", |
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 | |
# panel | |
# Start a panel on every monitor | |
# This script makes the assumption that monitors names are arranged left to right, named in increasing int value(1 2 3..) | |
# if this is not the case, you can override this with the num_mon variable below. | |
# Read the theme for display settings | |
. ~/.bspwm_theme | |
# Add panel scripts to path |
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
#!/bin/sh | |
# panel_bar | |
# a script to interpret panel fifo information(workspace/window titles/system info) | |
# clickable area aliases | |
AC='%{A:' # start click area | |
AB=':}' # end click area cmd | |
AE='%{A}' # end click area | |
# Shell commands for clickable areas |
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
# functions | |
function swap() { | |
# Swap 2 filenames around, if they exist (from Uzi's bashrc). | |
local TMPFILE=tmp.$$ | |
[ $# -ne 2 ] && echo "swap: 2 arguments needed" && return 1 | |
[ ! -e $1 ] && echo "swap: $1 does not exist" && return 1 | |
[ ! -e $2 ] && echo "swap: $2 does not exist" && return 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
#!/bin/bash | |
if [ $# -eq 0 ]; then | |
echo -e " \n \t ERROR: No arguments provided" | |
echo -e " \t USAGE: img2sf <path/to/image> <path/to/output>\n" | |
exit 1 | |
fi | |
imgw=$(convert -print "%w\n" "$1" /dev/null) |
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
# Run node_exporter | |
start on startup | |
script | |
/usr/bin/node_exporter | |
end script |
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
network() { | |
eth0=$(cat /sys/class/net/eth0/carrier 2>/dev/null) | |
wlan0=$(cat /sys/class/net/wlan0/carrier 2>/dev/null) | |
vpn=$(cat /sys/class/net/ppp0/carrier 2>/dev/null) | |
if [[ $vpn -eq 1 ]]; then | |
echo -e '\uf084' | |
ping -W 1 -c 1 8.8.8.8 >/dev/null 2>&1 && echo -e '\uf00c ' || echo -e '\uf00d' | |
elif [[ $eth0 -eq 1 ]] && [[ $vpn -ne 1 ]]; then | |
echo -e '\uf0ac' |
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
#!/bin/bash | |
# Objective- print the following array in reverse order: | |
# var arr = (1,2,3,4) | |
# I buckled under pressure! | |
# Colors to make it pretty.. | |
red=$(tput setaf 1) | |
grn=$(tput setaf 2) | |
yel=$(tput setaf 3) |
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
#!/bin/bash | |
# This script will print a colorized list of files and folders from the current directory | |
# and show the user:group ownership, as well as the file permissions in a human-readable format | |
# TODO: add options to show/hide hidden files | |
LSOWN=$(ls -ACl --group-directories-first . | awk '{print $9}' | sed 1d) | |
CLIST=$(ls -AFCl --group-directories-first --color=always . | awk '{print $9}' | sed 1d) | |
statlist () { |
OlderNewer