olimorris / tmux-pomodoro-plus Goto Github PK
View Code? Open in Web Editor NEW๐ Incorporate the Pomodoro technique into your tmux workflow
License: MIT License
๐ Incorporate the Pomodoro technique into your tmux workflow
License: MIT License
Can't override the default keybind. Similar to the previous issue here #6
# Pomodoro
set -g @pomodoro_start 'h' # Start a Pomodoro with tmux-prefix + p
set -g @pomodoro_cancel 'H' # Cancel a Pomodoro with tmux-prefix key + P
When I press tmux-prefix + p
It starts the menu. It also works with the new keybind I created.
Greetings, I have seen the style of your status bar and I would like to know if it is possible for you to share it, I would be very grateful, I have been looking to replace mine for several days since I have a lot with it and I have loved yours. Thank you very much in advance
Hi, great project!
Whenever I do any action like starting or canceling the Pomodoro I noticed it refreshes everything in my "status-right", in this quick vid I have some custom indicators that also get refreshed when I start / cancel the pomodoro.
Maybe this is the expected behavior (is it?) but I was wondering if I can get only Pomodoro to refresh and not all items on "status-right" .. any idea?
Hi ๐,
Hi I'm pretty new to tmux and I'm trying to get this extension to work with the catppuccin theme.
I have tried to do the following: set -g status-left "#[fg=#000000]%R#{pomodoro_status}"
# ...
## Theme settings
set -g status-left "#[fg=#000000]%R#{pomodoro_status}"
set -g @catppuccin_flavour 'frappe'
set -g @catppuccin_date_time "%H:%M"
set -g @pomodoro_notifications 'on' # Enable desktop notifications from your terminal
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
# ...
set -g @plugin 'olimorris/tmux-pomodoro-plus'
set -g @plugin 'catppuccin/tmux'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'
I can see the timer in the status bar for about 1/2 second when I reload the config. Then it disappears. I suspect this is to do with the catppuccin theme but I'm not sure (https://github.com/catppuccin/tmux/blob/main/catppuccin.tmux#L149).
P.S. I looked at your comment here: #11 (comment). But I was wondering if there was a way to do it without keeping my own copy of the theme.
Any help would be greatly appreciated. Thanks!
Full tmux config: https://gitlab.com/hmajid2301/dotfiles/-/blob/tweaks/tmux/tmux.conf
Context that i'm using the tmux-pomodoro-plus
tmux next-3.4
zsh 5.8 (x86_64-ubuntu-linux-gnu),
Plugin configuration in .tmux.conf
set -g status-left "#{pomodoro_status}"
Case:
When i start with p, with the function bellow
do_interpolation() {
local string="$1"
local interpolated="${string/$pomodoro_status_interpolation_string/$pomodoro_status}"
echo "$interpolated"
}
`set -g status-left "#{pomodoro_status}" is not working, and by not working i meand, the icon is not showing
Possible fix:
if i replace with following function
do_interpolation() {
local string="$1"
local interpolated="$string$pomodoro_status_interpolation_string$pomodoro_status"
echo "$interpolated"
}
The left icon in the status bar already appear when p.
I intentionally use the default key bindings for tmux and when adding this plugin, the Pomodoro timer menu is working as expected, but when I start a timer, the pomodoro status is not displayed in the status bar.
I am just getting into tmux this problem is probably related to my lack of tmux configuration knowledge. Nonetheless, I would really apricate your help.
Here is my .tmux.config:
# fix tpm when tmux is installed with homebrew on macOS
set-environment -g PATH "/opt/homebrew/bin:/usr/local/bin:/bin:/usr/bin"
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
#set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'olimorris/tmux-pomodoro-plus'
# shell config
set-option -g default-shell /bin/zsh
set-option -g history-limit 25000
set -g mouse on
# for neovim
set -sg escape-time 10
# vi for copy mode
setw -g mode-keys vi
# pomodoro timer
#set -g @pomodoro_toggle 'p' # conflicts with tmux default binding
set -g @pomodoro_on "#[fg=$text_red]๐
"
set -g @pomodoro_complete "#[fg=$text_green]๐
"
set -g @pomodoro_pause "#[fg=$color_yellow]๐
"
set -g @pomodoro_prompt_break "#[fg=$color_green]๐ค ? "
set -g @pomodoro_prompt_pomodoro "#[fg=$color_gray]๐ค ? "
set -g @pomodoro_granularity 'on'
set -g @pomodoro_interval_display "[%s/%s]"
# status bar
set -g status-right "#(pomodoro_status)"
set -g status-style "fg=#665c54"
set -g status-left-style "fg=#928374"
set -g status-bg default
set -g status-position bottom
set -g status-interval 1
set -g status-left ""
# disable status
# set -g status off
# set -g status on
# count the panes from 1
set -g base-index 1
setw -g pane-base-index 1
# reload configuration
bind-key -r r source-file ~/.tmux.conf
# term colors, these are the correct ones according to neovim checkhealth
set-option -g default-terminal "screen-256color"
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
#macOS
run '/opt/homebrew/opt/tpm/share/tpm/tpm'
# auto install and update plugins on tmux start
run '/opt/homebrew/opt/tpm/share/tpm/bin/install_plugins'
# linux
#run '~/.tmux/plugins/tpm/tpm'
How about a Pause feature? Instead of cancelling a Pomodoro completely, you just freeze the time until you Unpause it back on.
First off - this plugin is fantastic. I love it! Thank you so much for your hard work on it :)
I had a thought:
I've been setting a pomodoro, and I have it configured to notify the system when the timer ends, but I typically work with "Do Not Disturb" on - and so I miss the notification, and I'm typically so focused on my work - that I completely miss the fact that the status bar has changed.
I did some cursory Googling and found that you can send messages in tmux, as well as open popups, etc.
What if there were some configurations available to be able to run custom commands at the end of a timer? (ex: end of a focus timer, break timer, long break timer).
Given those options, I think I'd like to replicate the visual features of the Mac App Tadam:
https://apps.apple.com/us/app/tadam/id531349534?mt=12
Hey, how is going? I really like the plugin, you did a nice job.
After using it a couple of weeks, the feeling is like something is missing, specifically, a pomodoro cycles counter or the name you wanna call it but if the user can't set the number of pomodoros it wanna make, the break time is useless. Why should I need a break session if it is the next pomodoro, if any, is not going to start after the break?
So, I think a pomodoros counter would be nice and also a long break session timer where, for example, after 4 pomodoros there is a long break before continue.
Thanks in advance.
Hi, I am trying out pomodoro to avoid situations where I wake up after hours of coding with a killing neck pain ๐ . Is there a way to lock keyboard while on a break? At work I'm using Wellnomics Workpace which locks keyboard and mouse to enforce breaks.
Would something like this be possible in Tmux? If not to block keyboard out right, maybe keep focusing a dummy window to make it effectively impossible to do anything. It would also be useful to have a grace period where the lock is only enabled after user stops typing for couple seconds so they can finish their sentence (again, Workpace feature).
Thanks for this nice plugin!
pomodoro_show_intervals
mentioned in README does not show the intervals in status line. Seems the doc is outdated and pomodoro_interval_display
should be used instead.
This issue is used to announce breaking changes (and possibly other critical info). Users are strongly encouraged to subscribe to this issue to get notified of such changes.
Every breaking change is added as a new comment.
Just went through the code and couldn't find anything for long breaks, are these to be implemented or can we create a new issue for it?
set -g @pomodoro_start C-a
set -g @pomodoro_cancel C-a
It cannot work. How about:
set -g @pomodoro_toggle C-a
? Thank you.
I have <tmux-prefix> p
and <tmux-prefix> P
already bound to something else.
If I try to set new keybindings with:
set -g @pomodoro_start 'h'
set -g @pomodoro_cancel 'H'
I still get the old p
P
hooked to tmux-pomodoro-plus
.
This seems to have broken sound on macOS due to these lines.
It checks if the sound is 'on'
but then uses that as the sounds name but on
is not a sound name.
Originally posted by @mskelton in #2 (comment)
Hey! First of all, thank you for this, I've been looking for something like this plugin for a long & luckily stumbled upon this.
I wanted to know if it's possible to show not only the minutes but also the seconds, like in any typical pomodoro plugins (ex: https://flowapp.info/)
I would be happy to raise a PR for the same if you agree.
PS: On a separate note, I absolutely loved your tmux theme, & that's something I ended up copying with little modifications. I would highly recommend making it available through TPM, as the ones which are available are not that great. :)
Config:
set -g @pomodoro_start 't' # Start a Pomodoro with tmux-prefix + p
set -g @pomodoro_cancel 'T' # Cancel a Pomodoro with tmux-prefix key + P
set -g @pomodoro_mins 30 # The duration of the pomodoro
set -g @pomodoro_break_mins 3 # The duration of the break after the pomodoro
set -g @pomodoro_on " ๐
" # The formatted output when the pomodoro is running
set -g @pomodoro_complete " โ
" # The formatted output when the break is running
set -g @pomodoro_notifications 'on' # Enable desktop notifications from your terminal
set -g @pomodoro_sound 'on' # Sound for desktop notifications (Run ls /System/Library/Sounds
for a list of sounds to use on Mac)
I tried to make it work with this theme dracula/tmux
(which comes with a status bar) but it didn't show the pomo thing.
I am using the default configurations on linux.
Thanks in advance ๐
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.