aboutsummaryrefslogtreecommitdiff
path: root/.scripts/adblock
diff options
context:
space:
mode:
authorMarvin Borner2022-11-01 14:13:08 +0100
committerMarvin Borner2022-11-01 14:13:08 +0100
commit29c894db157e9b2bb2a392e0abb83ac700a839d5 (patch)
tree1e630bfabf1d94b61a88ab7b6e8b631113b6f7fd /.scripts/adblock
parent600de714ba13c1ccd54357554898db909de5af81 (diff)
sync
Diffstat (limited to '.scripts/adblock')
-rwxr-xr-x.scripts/adblock7
1 files changed, 3 insertions, 4 deletions
diff --git a/.scripts/adblock b/.scripts/adblock
index e02cf92..3fdbb97 100755
--- a/.scripts/adblock
+++ b/.scripts/adblock
@@ -1,10 +1,9 @@
#!/bin/bash
-if grep -Fxq "##START" /etc/hosts
-then
+if grep -Fxq "##START" /etc/hosts; then
sudo sed -i "/##START/,/##END/s/#\(.\)/\1/" /etc/hosts
- echo Enabled adblock!
+ notify-send "Enabled adblock!"
else
sudo sed -i "/#START/,/#END/s/./#&/" /etc/hosts
- echo Disabled adblock!
+ notify-send "Disabled adblock!"
fi