aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorGravatar Matheus R <matheusrbarros03@gmail.com> 2021-04-23 23:43:08 +0000
committerGravatar Matheus R <matheusrbarros03@gmail.com> 2021-04-23 23:43:08 +0000
commit59fcab1b0cacc328c2a8c22cde55633e50bd7bcb (patch)
tree8c1c011eb2d6ab6d7e846b493760238fc1b0bde7 /bin
parent7d08a54a14ebd4e992f07be4d3a22a5ee8c58bcd (diff)
Criados scripts sound_check e url_handler, além de ajustes nas dotfiles
Diffstat (limited to 'bin')
-rwxr-xr-xbin/sound_check13
-rwxr-xr-xbin/url_handler14
2 files changed, 27 insertions, 0 deletions
diff --git a/bin/sound_check b/bin/sound_check
new file mode 100755
index 0000000..91b281b
--- /dev/null
+++ b/bin/sound_check
@@ -0,0 +1,13 @@
+#!/bin/env dash
+
+# mutes the microphone and send a notification
+
+# default sink state: 1 if muted, 0 if else
+mute="$(pulsemixer --get-mute)"
+
+[ "$mute" -eq 0 ] && notify-send "Alto-falante" "Mudo"
+
+[ "$mute" -eq 1 ] && notify-send "Alto-falante" "Som reativado"
+
+# (un)mutes the speaker
+pulsemixer --toggle-mute
diff --git a/bin/url_handler b/bin/url_handler
new file mode 100755
index 0000000..ce261df
--- /dev/null
+++ b/bin/url_handler
@@ -0,0 +1,14 @@
+#!/bin/env bash
+
+# manage the program in which the url should be displayed in
+# intended use with programs such as urlscan or urlview
+
+urlname="$(basename "$1")"
+
+case "$urlname" in
+ *.jpg) urlImage "$1";;
+ *.jpeg) urlImage "$1";;
+ *.png) urlImage "$1";;
+ *.html) "$BROWSER_CLI"-I "UTF-8" -T text/html "$1";;
+ *) "$BROWSER" "$1"
+esac