Atrate / i3blocks-ufw

Read-only mirror from GitLab. A simple bash script designed for i3blocks that tells you whether UFW (a Linux firewall) is active or not.

Home Page:https://gitlab.com/Atrate/i3blocks-ufw

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

i3blocks-ufw

License: GPL v3 Contributor Covenant

A simple bash script designed for i3blocks that tells you whether UFW (a Linux firewall) is active or not.

Installation

You will need to create a file in sudoers.d so that your user can execute sudo ufw status without entering their password.

In /etc/sudoers.d/ufwstatus:

Cmnd_Alias      UFWSTATUS = /usr/sbin/ufw status

%group          ALL=NOPASSWD: UFWSTATUS

where group is any group your user belongs to. Depending on the system configuration it can be users, your username, sudo, wheel or something else.


In ~/.config/i3blocks/config:

[ufw]
command=<path/to/script>/i3blocks-ufw.sh
interval=60                                     # You can set a lower interval but it will use more CPU
#SHOW_INACTIVE=true
#SHOW_ACTIVE=false
#COLORIZE=false                                 # It seems formatting doesn't work in i3blocks
#BOLDEN=false                                   # but you can still set it to true for e.g. Polybar
#COL_GOOD='\033[0;0;32m'
#COL_BAD='\033[0;31m'
#MSG_ACTIVE="$COL_GOOD$BOLD UFW ON$NA"
#MSG_INACTIVE="$COL_BAD$BOLD UFW OFF!$NA"

Contributing

For guidelines on how to contribute please refer to CONTRIBUTING.md. Please keep in mind that all pull/merge requests should be submitted to the GitLab repo, since repos on e.g. GitHub are just mirrors.

License

This project is licensed under the GPL-3.0-or-later.

About

Read-only mirror from GitLab. A simple bash script designed for i3blocks that tells you whether UFW (a Linux firewall) is active or not.

https://gitlab.com/Atrate/i3blocks-ufw

License:GNU General Public License v3.0


Languages

Language:Shell 100.0%