Skip to content

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

License

Notifications You must be signed in to change notification settings

Atrate/i3blocks-ufw

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages