All Projects → rjekker → I3 Battery Popup

rjekker / I3 Battery Popup

Licence: mit
A script that shows warning messages to the user when the battery is almost empty. For i3wm users.

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to I3 Battery Popup

Xsuspender
👀 💻 💤 🔋 Save battery by auto-suspending unfocused X11 applications.
Stars: ✭ 53 (-72.11%)
Mutual labels:  i3, i3wm, battery
I3wsr
Change i3-wm workspace names based on content
Stars: ✭ 107 (-43.68%)
Mutual labels:  i3, i3wm
I3 Autodisplay
i3wm multiple monitors auto configuration
Stars: ✭ 104 (-45.26%)
Mutual labels:  i3, i3wm
Dotfiles
My [NeoVim + Tmux + Fish Shell] Setup /w install scripts
Stars: ✭ 180 (-5.26%)
Mutual labels:  i3, i3wm
I3 Polybar Config
My i3 configuration with polybar for HiDPI screen (4k)
Stars: ✭ 84 (-55.79%)
Mutual labels:  i3, i3wm
Connmap
connmap is an X11 desktop widget that shows location of your current network peers on a world map (tested only with i3wm). Made with C and libcairo.
Stars: ✭ 90 (-52.63%)
Mutual labels:  i3, i3wm
Azote
Wallpaper and colour manager for Sway, i3 and some other WMs
Stars: ✭ 138 (-27.37%)
Mutual labels:  i3, i3wm
I3ipc Glib
A C interface library to i3wm
Stars: ✭ 72 (-62.11%)
Mutual labels:  i3, i3wm
Sgtk Menu
GTK launchers for sway & other WMs w/ menu, dmenu, application grid and button bar
Stars: ✭ 112 (-41.05%)
Mutual labels:  i3, i3wm
3mux
Terminal multiplexer inspired by i3
Stars: ✭ 1,687 (+787.89%)
Mutual labels:  i3, i3wm
Tmux Tilish
Plugin which makes tmux work and feel like i3wm
Stars: ✭ 149 (-21.58%)
Mutual labels:  i3, i3wm
I3lock Fancy
i3lock script that takes a screenshot of the desktop, blurs the background and adds a lock icon and text
Stars: ✭ 1,249 (+557.37%)
Mutual labels:  i3, i3wm
I3 Config
i3wm configuration files
Stars: ✭ 81 (-57.37%)
Mutual labels:  i3, i3wm
I3lock Fancy Rapid
A faster implementation of i3lock-fancy.
Stars: ✭ 102 (-46.32%)
Mutual labels:  i3, i3wm
I3keys
Lists available bindings for i3 or Sway with a graphical or text keyboard
Stars: ✭ 81 (-57.37%)
Mutual labels:  i3, i3wm
I3 Workspace Groups
Manage i3wm workspaces in groups you control
Stars: ✭ 139 (-26.84%)
Mutual labels:  i3, i3wm
I3 Gnome Pomodoro
🍅 Integrate gnome-pomodoro into i3
Stars: ✭ 159 (-16.32%)
Mutual labels:  i3, i3wm
I3 Linux Config Tokyo Rice
My config files for i3-gaps and Linux, first rice.
Stars: ✭ 58 (-69.47%)
Mutual labels:  i3, i3wm
I3 Config
I3-gaps configuration
Stars: ✭ 67 (-64.74%)
Mutual labels:  i3, i3wm
I3 Wm Config
I3 tiling window manager configuration
Stars: ✭ 109 (-42.63%)
Mutual labels:  i3, i3wm

i3-battery-popup

A script that shows messages to the user when the battery is almost empty. I wrote this because I use i3wm, was frustrated by the lack of a nice battery notification, and as a nice exercise in shell scripting.

What it does

This script regularly checks your battery charge and shows you a nice warning in a popup if you are about to completely drain your battery. It improves on other battery warning scripts like this one by:

  • Using a Tk-based popup (if you want) which you can configure to show on all workspaces. i3's nagbar doesn't do that.
  • Or using a nice notify-send desktop notification
  • Using the nagbar if you prefer that - or if you don't have Tk.
  • Optionally playing a sound to warn you when the battery gets low.
  • Doing what you want: you can tell it at which battery percentages you want to be warned. Currently it will try to show you 2 messages before the lower limit is reached.
  • Supporting multiple batteries. My laptop has 2 batteries, for example.

How to use it

  • Download the script and make sure it's on your PATH
  • Call the script in your i3 config file: exec --no-startup-id i3-battery-popup

Installing on Arch Linux

There's now a package on Arch Linux's AUR: https://aur.archlinux.org/packages/i3-battery-popup-git

Showing the message everywhere

If you have wish installed this script will show you a popup window. To get wish, you probably need to install tk on your Linux distribution.

The nice thing is that we can make the popup window sticky; that doesn't work with i3-nagbar. To make the popup sticky so it shows everywhere, add this to your i3 config:

for_window [title="Battery Warning"] sticky enable

screenshot

Desktop notification

Specify -n to use those nice pretty desktop notifications in the top right corner of your screen. I guess it depends on something like libnotify but I'm not really sure. Please correct me if I'm wrong.

screenshot 2

Options

  • -L sets the percentage at which the first popup shows. Default is 10

  • -l : The percentage at which the second popup shows. Default: half of the percentage given by -L

  • -m : The message to show to the User

  • -t : The time interval the script waits before checking the battery again. Give this a value in seconds: 10s, or in minutes: 5m. Default: 5m

  • -n : Use notify-send for desktop notification

  • -i : Specify the icon to use with -n

  • -N : Don't use Tcl/Tk dialog. Use i3-nagbar.

  • -s : Play a sound with paplay when notifying. Takes a path to a sound as argument. The file must exist. Default: no sound.

  • -v : Specifies the percentage of the volume of the sound played with -s option. This value must be an integer greater than 0 and smaller than 100. Default: 100

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].