Compare commits
No commits in common. "96a81d7e5beda77f5c0df243aabbf83405d88a3d" and "9eeeca1faa89819534e60f98dacb66acb420b728" have entirely different histories.
96a81d7e5b
...
9eeeca1faa
6 changed files with 19 additions and 46 deletions
|
@ -1,7 +1,5 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
FILE="$HOME/.config/.bluetooth"
|
|
||||||
|
|
||||||
get_device() {
|
get_device() {
|
||||||
if [[ $(bluetoothctl devices Connected) != "" ]]; then
|
if [[ $(bluetoothctl devices Connected) != "" ]]; then
|
||||||
bluetoothctl devices Connected | awk '{ for (i = 3; i <= NF; i++) { printf("%s ", $i) } printf("\n") }'
|
bluetoothctl devices Connected | awk '{ for (i = 3; i <= NF; i++) { printf("%s ", $i) } printf("\n") }'
|
||||||
|
@ -12,9 +10,9 @@ get_device() {
|
||||||
|
|
||||||
get_state() {
|
get_state() {
|
||||||
if [[ "$(rfkill list | grep -A 1 hci0 | grep -o no)" == "no" ]]; then
|
if [[ "$(rfkill list | grep -A 1 hci0 | grep -o no)" == "no" ]]; then
|
||||||
echo " " > "$FILE"
|
echo " "
|
||||||
else
|
else
|
||||||
echo " " > "$FILE"
|
echo " "
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -25,6 +23,5 @@ if [[ $1 == "icon" ]]; then
|
||||||
while true; do
|
while true; do
|
||||||
sleep 0.1
|
sleep 0.1
|
||||||
get_state
|
get_state
|
||||||
tail "$FILE"
|
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -1,36 +1,16 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
FILE="$HOME/.config/.heart"
|
FILE="$HOME/.config/.heart"
|
||||||
|
if [[ ! -f "$FILE" ]]; then
|
||||||
|
echo > "$FILE"
|
||||||
|
fi
|
||||||
|
|
||||||
toggle() {
|
if grep -q "$FILE"; then
|
||||||
if grep -q "$FILE"; then
|
|
||||||
eww close heart
|
eww close heart
|
||||||
eww update heart-ts=false
|
eww update heart-ts=false
|
||||||
echo > "$FILE"
|
echo > "$FILE"
|
||||||
else
|
else
|
||||||
eww open heart
|
eww open heart
|
||||||
eww update heart-ts=true
|
eww update heart-ts=true
|
||||||
echo >> "$FILE"
|
echo >> "$FILE"
|
||||||
fi
|
fi
|
||||||
}
|
|
||||||
|
|
||||||
[[ "$1" == "toggle" ]] && toggle
|
|
||||||
|
|
||||||
|
|
||||||
startup() {
|
|
||||||
if [[ ! -f "$FILE" ]]; then
|
|
||||||
echo > "$FILE"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ ! -f "$HOME/.config/.bluetooth" ]]; then
|
|
||||||
echo > "$FILE"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if grep -q "$HOME/.config/.bluetooth"; then
|
|
||||||
rfkill block bluetooth
|
|
||||||
fi
|
|
||||||
|
|
||||||
tail -f "$FILE"
|
|
||||||
}
|
|
||||||
|
|
||||||
[[ "$1" == "startup" ]] && startup
|
|
||||||
|
|
|
@ -92,7 +92,7 @@
|
||||||
(defvar heart-ts "default")
|
(defvar heart-ts "default")
|
||||||
(defwidget heart-toggle-on []
|
(defwidget heart-toggle-on []
|
||||||
(eventbox :class "toggle-on"
|
(eventbox :class "toggle-on"
|
||||||
:onclick "$EWW_PATH/heart.sh toggle"
|
:onclick "$EWW_PATH/heart.sh"
|
||||||
:cursor "pointer"
|
:cursor "pointer"
|
||||||
|
|
||||||
(box :class "heart-toggle"
|
(box :class "heart-toggle"
|
||||||
|
@ -103,7 +103,7 @@
|
||||||
)
|
)
|
||||||
(defwidget heart-toggle-off []
|
(defwidget heart-toggle-off []
|
||||||
(eventbox :class "toggle-off"
|
(eventbox :class "toggle-off"
|
||||||
:onclick "$EWW_PATH/heart.sh toggle"
|
:onclick "$EWW_PATH/heart.sh"
|
||||||
:cursor "pointer"
|
:cursor "pointer"
|
||||||
|
|
||||||
(box :class "heart-toggle"
|
(box :class "heart-toggle"
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
; this var starts all scripts needed when eww boots
|
|
||||||
(deflisten heart_icon "$EWW_PATH/heart.sh startup")
|
|
||||||
|
|
||||||
(deflisten notif_icon "$EWW_PATH/notif.sh icon")
|
(deflisten notif_icon "$EWW_PATH/notif.sh icon")
|
||||||
|
(deflisten heart_icon "tail -f $HOME/.config/.heart")
|
||||||
(deflisten mic_icon "$EWW_PATH/mic.sh icon")
|
(deflisten mic_icon "$EWW_PATH/mic.sh icon")
|
||||||
|
|
||||||
(deflisten network_ssid "zscroll -d 0.7 -l 12 -p '. ' -u true \"$EWW_PATH/network.sh ssid\"")
|
(deflisten network_ssid "zscroll -d 0.7 -l 12 -p '. ' -u true \"$EWW_PATH/network.sh ssid\"")
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
networking.firewall.enable = false;
|
networking.firewall.enable = false;
|
||||||
|
|
||||||
security.sudo.extraConfig = ''
|
security.sudo.extraConfig = ''
|
||||||
Defaults timestamp_timeout=600
|
Defaults timestamp_timeout=60
|
||||||
'';
|
'';
|
||||||
|
|
||||||
security.pam.services = {
|
security.pam.services = {
|
||||||
|
|
|
@ -35,8 +35,6 @@
|
||||||
QT_FONT_DPI = "125";
|
QT_FONT_DPI = "125";
|
||||||
};
|
};
|
||||||
|
|
||||||
system.autoUpgrade.channel = "https://nixos.org/channels/nixos-unstable";
|
|
||||||
|
|
||||||
# This value determines the NixOS release from which the default
|
# This value determines the NixOS release from which the default
|
||||||
# settings for stateful data, like file locations and database versions
|
# settings for stateful data, like file locations and database versions
|
||||||
# on your system were taken. It's perfectly fine and recommended to leave
|
# on your system were taken. It's perfectly fine and recommended to leave
|
||||||
|
|
Loading…
Reference in a new issue