Cosmetic fixes

This commit is contained in:
Scott Wallace 2021-12-11 18:35:10 +00:00
parent 9833101e37
commit 5730f8d9cd
Signed by: scott
GPG key ID: AA742FDC5AFE2A72
2 changed files with 12 additions and 4 deletions

View file

@ -15,7 +15,8 @@ LENGTH = 16
def generate(length: int) -> str: def generate(length: int) -> str:
"""Simple function to call OpenSSL """
Simple function to call OpenSSL
Args: Args:
length (int): length of string to return length (int): length of string to return
@ -26,9 +27,16 @@ def generate(length: int) -> str:
if __name__ == '__main__': if __name__ == '__main__':
def main() -> int: def main() -> int:
"""Main function to call""" """
Main function to call
"""
parser = argparse.ArgumentParser() parser = argparse.ArgumentParser()
parser.add_argument('-n', dest='length', default=LENGTH, type=int) parser.add_argument(
'-n',
dest='length',
default=LENGTH,
type=int,
)
args = parser.parse_args() args = parser.parse_args()
sys.stdout.write(generate(args.length)) sys.stdout.write(generate(args.length))

View file

@ -11,4 +11,4 @@ amixer -c ${CARD} sset Mic mute toggle
STATE=$(amixer -c ${CARD} cget name='Mic Capture Switch' | grep -F ': values=' | cut -f2 -d=) STATE=$(amixer -c ${CARD} cget name='Mic Capture Switch' | grep -F ': values=' | cut -f2 -d=)
# Notify # Notify
notify-send -t 3000 "${CARD} Mic" ${STATE^^} -i ${ICONS[${STATE}]} notify-send -t 3000 "${CARD} Mic" "${STATE^^}" -i "${ICONS[${STATE}]}"