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/bash | |
GREEN="\033[0;32m" | |
ORANGE="\033[0;33m" | |
RED="\033[0;31m" | |
NOCOLOR="--color" | |
[ "$1" == '--color' ] && shift | |
if [ "$1" == '--nocolor' ]; then | |
GREEN="" |
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 | |
for var in "$@"; do | |
if [[ "$(file --brief -i $var | awk '{print $1}')" == 'text/plain;' && | |
"$(file --brief $var | grep CRLF)" ]]; then | |
dos2unix $var | |
base="$(basename $var)" | |
if [ "${base##*.}" == 'txt' ]; then | |
mv $var "${var%.*}" | |
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
#!/usr/bin/env python | |
''' | |
CustomEdges - Service and KWin script executor | |
Author: Amir Maimon | |
License: CC0 1.0 Universal Public Domain Dedication | |
License text can be found at COPYING or https://creativecommons.org/publicdomain/zero/1.0/ | |
''' | |
from subprocess import call |