All Projects → kantord → I3 Gnome Pomodoro

kantord / I3 Gnome Pomodoro

Licence: gpl-3.0
🍅 Integrate gnome-pomodoro into i3

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to I3 Gnome Pomodoro

raiseorlaunch
A run-or-raise-application-launcher for i3 window manager.
Stars: ✭ 35 (-77.99%)
Mutual labels:  i3, workspace, i3wm
I3 Config
i3wm configuration files
Stars: ✭ 81 (-49.06%)
Mutual labels:  workspace, i3, i3wm
3mux
Terminal multiplexer inspired by i3
Stars: ✭ 1,687 (+961.01%)
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 (+685.53%)
Mutual labels:  i3, i3wm
I3 Workspace Groups
Manage i3wm workspaces in groups you control
Stars: ✭ 139 (-12.58%)
Mutual labels:  i3, i3wm
I3ipc Glib
A C interface library to i3wm
Stars: ✭ 72 (-54.72%)
Mutual labels:  i3, i3wm
I3keys
Lists available bindings for i3 or Sway with a graphical or text keyboard
Stars: ✭ 81 (-49.06%)
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 (-43.4%)
Mutual labels:  i3, i3wm
Xsuspender
👀 💻 💤 🔋 Save battery by auto-suspending unfocused X11 applications.
Stars: ✭ 53 (-66.67%)
Mutual labels:  i3, i3wm
Azote
Wallpaper and colour manager for Sway, i3 and some other WMs
Stars: ✭ 138 (-13.21%)
Mutual labels:  i3, i3wm
I3 Autodisplay
i3wm multiple monitors auto configuration
Stars: ✭ 104 (-34.59%)
Mutual labels:  i3, i3wm
Tmux Tilish
Plugin which makes tmux work and feel like i3wm
Stars: ✭ 149 (-6.29%)
Mutual labels:  i3, i3wm
Wmfocus
Visually focus windows by label
Stars: ✭ 132 (-16.98%)
Mutual labels:  i3, i3wm
I3 Config
I3-gaps configuration
Stars: ✭ 67 (-57.86%)
Mutual labels:  i3, i3wm
I3 Linux Config Tokyo Rice
My config files for i3-gaps and Linux, first rice.
Stars: ✭ 58 (-63.52%)
Mutual labels:  i3, i3wm
I3 Polybar Config
My i3 configuration with polybar for HiDPI screen (4k)
Stars: ✭ 84 (-47.17%)
Mutual labels:  i3, i3wm
I3 Wm Config
I3 tiling window manager configuration
Stars: ✭ 109 (-31.45%)
Mutual labels:  i3, i3wm
Matrixlock
Replace i3's lock screen by the Matrix.
Stars: ✭ 42 (-73.58%)
Mutual labels:  i3, i3wm
I3 workspaces
Workspace manager for i3-wm
Stars: ✭ 53 (-66.67%)
Mutual labels:  i3, i3wm
I3lock Fancy Rapid
A faster implementation of i3lock-fancy.
Stars: ✭ 102 (-35.85%)
Mutual labels:  i3, i3wm

i3-gnome-pomodoro

Integrate gnome-pomodoro into i3. Support i3bar, polybar and waybar.

Here's what i3-gnome-pomodoro looks like on my i3bar: Pomodoro 24:45 |  075%    uvsFvTK7SffCNaP9 |  |    100% |    100% |    55°C |  24.6 GB |    01. 07    23.19 |  70%

i3-gnome-pomodoro can integrate with status-one-liner.

You can optionally disable certain workspaces during a pomodoro. They are still accessible when you pause a pomodoro. Workspace 10: mail is disabled during a pomodoro.

About

i3-gnome-pomodoro uses dbus to integrate gnome-pomodoro into i3. Currently it supports the following features:

  • View timer status in a terminal, and therefore
  • Show timer status on i3bar
  • Control pomodoro state in a terminal, and therefore
  • Control pomodoro state using bindsym (keyboard and mouse shortcuts)
  • Optionally suppressing dunst desktop notifications while a pomodoro is active and showing them when the break starts
  • Optionally disabling specific workspaces (such as instant messaging) while you are on a pomodoro. You can still access those workspaces, if you pause the pomodoro.
  • Optionally displaying a nagbar warning if you try to access a workspace that you have disabled during your pomodoro.

Usage and setup

Dependencies

i3-gnome-pomodoro needs the following Python packages to be installed:

  • pygobject
  • click
  • pydbus
  • i3ipc

You can install them using pip install -r requirements.txt. Might require sudo when installing system-wide. Obviously, you'll also need to have gnome-pomodoro installed already. That's it. i3-gnome-pomodoro then should work from the terminal out-of-the-box. But to make it more integrated into i3 and more convenient to use, you might want to set it up with i3bar and put key bindings into your i3 config. So please read along!

I run i3-gnome-pomodoro on Arch Linux with Python 3.6.4, but it should work with other Python 3 binaries as well.

Installation

Just run this script in your terminal to install i3-gnome-pomodoro

command -v gnome-pomodoro > /dev/null && 
(
    cd $(mktemp -d) &&
    $(which git) clone https://github.com/kantord/i3-gnome-pomodoro &&
    cd i3-gnome-pomodoro &&
    sudo $(which pip3) install -r requirements.txt --ignore-installed &&
    sudo rm /usr/bin/i3-gnome-pomodoro >& /dev/null;
    sudo cp pomodoro-client.py /usr/bin/i3-gnome-pomodoro &&
    /usr/bin/i3-gnome-pomodoro status
) || echo "Installation failed. Please make sure you have gnome-pomodoro installed."

Terminal

Timer status can be viewed by simply running ./pomodoro-client.py. Example output:

$ ./pomodoro-client.py status
Pomodoro 15:35

The timer state can be manipulated using the commands pause, resume, start, stop, skip, toggle and reset. For example:

$ ./pomodoro-client.py pause

i3bar

Unfortunately, i3status cannot be used to display a custom feature on i3bar. However, another application can use i3status to collect information and combine it with custom features. A very simple way to do that is to create a script in this fashion:

#!/usr/bin/env bash

i3status -c ~/.i3/i3status.conf | while :
do
  read line
  pomodoro=`~/repos/i3-gnome-pomodoro/pomodoro-client.py status`
  echo "$pomodoro| $line" || exit 1
done

After saving that script, make sure you update your i3 config to set it as your status_command:

bar {
        status_command ~/repos/arch-config/i3status.sh
}

And then restart i3 so the changes be in effect right away:

$ i3-msg restart

If you want to use an i3status replacement, please follow its respective documentation to get information about how you can use i3-gnome-pomodoro.

polybar

I use the following module in polybar:

[module/pomodoro]
type = custom/script
exec = i3-gnome-pomodoro status
interval = 1

with the i3-gnome-pomodoro status --always flag thing like the block below, becomes possible

[module/pomodoro]
type = custom/script
click-left = i3-gnome-pomodoro toggle
click-middle = gnome-pomodoro
click-right = i3-gnome-pomodoro start_stop
exec = i3-gnome-pomodoro status --always
interval = 1

waybar

I use the following module in waybar

config

 "custom/pomodoro": {
    "exec": "i3-gnome-pomodoro status --format=waybar --show-seconds",
     "return-type": "json",
     "interval": 1,
     "format": "Pomodoro {}",
     "on-click": "i3-gnome-pomodoro start",
     "on-middle-click": "i3-gnome-pomodoro toggle",
     "on-right-click": "i3-gnome-pomodoro stop",
 },

style.css

#custom-pomodoro.paused {
  border-bottom: 3px solid @yellow;
}

Refresh rate

i3-gnome-pomodoro displays a countdown timer on i3bar. If you use i3status, setting resfresh_rate in your i3status configuration can probably result in a better user experience. I personally use this configuration:

general {
    interval = 1
}

Keyboard shortcuts

I use the following key bindings in my i3 config:

bindsym $mod+F9 exec "~/repos/i3-gnome-pomodoro/pomodoro-client.py start"
bindsym $mod+F10 exec "~/repos/i3-gnome-pomodoro/pomodoro-client.py toggle"
bindsym $mod+F11 exec "~/repos/i3-gnome-pomodoro/pomodoro-client.py skip"
bindsym $mod+F12 exec "~/repos/i3-gnome-pomodoro/pomodoro-client.py stop"

Suppressing dunst notifications and disabling workspaces

i3-gnome-pomodoro has a daemon that can suppress dunst notifications while a pomodoro is active. After your pomodoro is over, dunst still delivers delayed notifications. To use this daemon, launch it manually when needed or add this to your i3 configuration to launch it on startup:

exec ~/repos/i3-gnome-pomodoro/pomodoro-client.py daemon &

If you want to disable any workspaces during your pomodoro, you can do so by specifying there workspace number. For example, I generally use workspace 10 for IM, Social Media and Workspace 9 for email. Therefore I want them disabled while I'm on a pomodoro. So, I execute my daemon like this:

exec ~/repos/i3-gnome-/pomodoro-client.py daemon 9 10 &

This works even if you label your workspaces. For example, I use the name "9: mail" for my email workspace but I still reference it with "9".

I also like to have a nagbar warning shown when I still try to access a distracting workspace:

exec ~/repos/i3-gnome-/pomodoro-client.py daemon 9 10 --nagbar &
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].