Coder Social home page Coder Social logo

poetaman / arttime Goto Github PK

View Code? Open in Web Editor NEW
811.0 8.0 16.0 1.02 MB

arttime is a CLI application that blends beauty of ASCII / text art with functionality of clock / timer / pattern-based time manager in terminal ⏰

License: Other

Shell 100.00%
ascii-art clock terminal time-management timer ansi-art console console-application terminal-app posix

arttime's People

Contributors

ehaupt avatar poetaman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

arttime's Issues

Error: no default array defined: -F

Hello,

This project looks amazing and I really would love to use it! Any help would be greatly appreciated! Thank you!

I run the command arttime and it is correctly in my PATH. Here is the error:

github/arttime/bin/arttime:zparseopts:18: no default array defined: -F

-zcompdir argument for the install script is not working

deckweiss@BIG-Chungus:~/Projects/arttime$ ./install.sh -g -zcompdir /usr/share/zsh/site-functions
./install.sh:zparseopts:22: bad option: -z

deckweiss@BIG-Chungus:~/Projects/arttime$ ./install.sh -g -zcompdir "~/test"
./install.sh:zparseopts:22: bad option: -z

deckweiss@BIG-Chungus:~/Projects/arttime$ ./install.sh -p /usr/share/ -zcompdir /usr/share/zsh/site-functions
./install.sh:zparseopts:22: bad option: -z

Ability to use without the TUI

I would like to embed a random art in my terminal text editor - neovim.
Is it possible to add an option to run this without the TUI - just the output of a random art?

Feature request - Sticky notifications

Hi, first of all great app! Is there a way to configure the notifications to be sticky on Mac OS? Currently it shows up for a second or so, then it dissapears. I would like to have the type of notifications that you have to manually close.

Nothing audible when a notification is seen on FreeBSD

Essentially

pacat /usr/local/lib/libreoffice/share/gallery/sounds/gong.wav

arttime --nolearn -a trafficlightgreen -b trafficlightred -t "I heard the gong. Now I'll set a goal, then see a notification but hear nothing …"

Am I missing something?

(I assume that the intention is for sound, when available, to accompany a notification.)

TIA

Context

% pactl info
Connection failure: Connection refused
pa_context_connect() failed: Connection refused
% pulseaudio --start
W: [(null)] caps.c: Normally all extra capabilities would be dropped now, but that's impossible because PulseAudio was built without capabilities support.
% pactl info
Server String: /var/run/user/1002/pulse/native
Library Protocol Version: 34
Server Protocol Version: 34
Is Local: yes
Client Index: 3
Tile Size: 65472
User Name: grahamperrin
Host Name: mowa219-gjp4-8570p-freebsd
Server Name: pulseaudio
Server Version: 14.2
Default Sample Specification: s16le 2ch 44100Hz
Default Channel Map: front-left,front-right
Default Sink: oss_output.dsp1
Default Source: oss_input.dsp1
Cookie: 99cf:bba2
% pacat /usr/local/lib/libreoffice/share/gallery/sounds/gong.wav
% arttime --nolearn -a trafficlightgreen -b trafficlightred -t "I heard the gong. Now I'll set a goal, then see a notification but hear nothing …"
% pulseaudio --kill
W: [(null)] caps.c: Normally all extra capabilities would be dropped now, but that's impossible because PulseAudio was built without capabilities support.
% date ; uname -aKU
Wed  5 Oct 2022 03:22:32 BST
FreeBSD mowa219-gjp4-8570p-freebsd 14.0-CURRENT FreeBSD 14.0-CURRENT #21 main-n258027-c9baa974717a: Fri Sep 16 15:41:27 BST 2022     grahamperrin@mowa219-gjp4-8570p-freebsd:/usr/obj/usr/src/amd64.amd64/sys/GENERIC-NODEBUG amd64 1400067 1400067
% 

Fancy of fonts

Hi! I'm attracted by the screenshot. And the beautiful font on the terminal gets me. Could you tell me the font name?

Nit: cosmetics after quit

With 34633fc on branch `oldbsdtput':

Do you really want to quit arttime? [y/n]: yfreebsd@freebsd:~/dev/arttime $

Is it possible to have a clear command line prompt after quit?

(I have no idea.)

Feature Request: Allow auto pause after the end of each timer

Hello,

I really like arttime, and would like to use it regularly. Unfortunately, there is one think stoping me from using it regularly for my use case.

Would it be possible to add a option that would auto pause arttime after each timer in a series of timers come to an end and only start the next timer when I unpause?

Alternatively, a new keyword in the goal defining expression that would pause the timer could also be useful. Something like:

g25m;pause;30m;pause;55m;pause;loop4

Thank you for all your work on arttime.

Goals get automatically ordered by length

I have a weird issue where my goals are ordered by increasing time:

>Enter goal ('help' to learn): 10m;1m;10m;1m;loop2

followed by i to show info shows:

  > 1. time: feb. 28, 01:29:01 (pending: 00h 00m 58s), goal: 1m                                                                                 
    2. time: feb. 28, 01:29:01 (pending: 00h 00m 58s), goal: 1m                                                                                 
    3. time: feb. 28, 01:38:01 (pending: 00h 09m 58s), goal: 10m                                                                                
    4. time: feb. 28, 01:38:01 (pending: 00h 09m 58s), goal: 10m                                                                                
       sprint 1/2   

so instead of having several 10m long sprints with 1min inbetweet, it seems to knock off the shortest ones first.

However if I follow the example:

25m;30m;55m;1h;1h25m;1h30m;1h55m;2h25m;loop2

It correctly follows the order from the input, as it is increasing in time:

  > 1. time: feb. 28, 01:54:34 (pending: 00h 24m 58s), goal: 25m                                                                                
    2. time: feb. 28, 01:59:34 (pending: 00h 29m 58s), goal: 30m                                                                                
    3. time: feb. 28, 02:24:34 (pending: 00h 54m 58s), goal: 55m                                                                                
    4. time: feb. 28, 02:29:34 (pending: 00h 59m 58s), goal: 1h                                                                                 
    5. time: feb. 28, 02:54:34 (pending: 01h 24m 58s), goal: 1h25m                                                                              
    6. time: feb. 28, 02:59:34 (pending: 01h 29m 58s), goal: 1h30m                                                                              
    7. time: feb. 28, 03:24:34 (pending: 01h 54m 58s), goal: 1h55m                                                                              
    8. time: feb. 28, 03:54:34 (pending: 02h 24m 58s), goal: 2h25m     

However if I add a shorter time at the end, it ends up to be sorted:
25m;30m;55m;1h;1h25m;1h30m;1h55m;2h25m;25m;loop2

Trial and error

The following input ends up to be sorted by time as well:

 10m;1h;10m;1h;loop2 (mix hours and minutes)
 10m;1m;10m;1m (no loops)
 10m;1m;10m;1m;10m;1m;10m; (longer sequence)
 7m;6m;5m;4m;3m;2m;1m (no recurring sequence)

Have I misunderstood anything?

EDIT:
Seems like its this line responsible for the sorting:

goalarraysorted=("${(o)goalarray[@]}")

I suppose this must be intended and supporting some kind of use case that I don't have (I really cant see how anyone would input these in a different order than what they want) - but maybe there should be a flag to load the time sequences exactly as input?

Feature Request - Labeling The Goals

Is there any existing feature to customize the goal labels ? I'm guessing not, and
if so this seems like a good feature to add ?

Eg - Goal1 could be labelled as 'Complete Writing Function X in Program Y',
or something like that.

Interested in font

Hey, first of all, I love your little program. It looks clean, nice and is really customizable.
Now to the question, in the photos of your Readme, the font and your program fits together very well. Do you know, what font that was?

Not working properly in i3

The main issue is the fact that is not showing popup notifications in i3, also the sound sometimes is not working, how can I check the way arttime launches the system notifications?

Learning the keys

I'll find the keys easier to learn if they're not disorderly.

Alphabetical:

Press these keys to learn:       
a: set a art using default method
b: set b art using default method
c: change art color..............
e: restart goals.................
f: toggle between 12/24 hour time
g: set goals (ex:10s;1h20m;3PM)..
h: toggle displaying help or art.
i: display time and art info.....
j: show random art to select.....
l: clear goals, show start time..
m: change title message..........
p: pause or un-pause goals.......
q: quit arttime..................
r: reset start time & goals......
t: toggle theme..................
x: set a art using fzf...........
y: set b art using fzf...........
z: set or reset timezone.........

Thoughts?

feature request: add `--destdir` option to install.sh

As a package maintainer I have a small request:

During ports/package building on FreeBSD the files need to be installed in a staging area first (or call it a sandbox). After the installation in the sandbox among other things, the package will be created.

The sandbox directory will look something like this:

/usr/ports/deskutils/arttime/work/stage/usr/local/share/arttime/textart/eye2
/usr/ports/deskutils/arttime/work/stage/usr/local/share/arttime/textart/pizza2
/usr/ports/deskutils/arttime/work/stage/usr/local/share/arttime/textart/mirror2
/usr/ports/deskutils/arttime/work/stage/usr/local/share/arttime/textart/freebsd1
...

In order to tell install.sh to install the files under /usr/ports/deskutils/arttime/work/stage I used to modify install.sh as follows: Patch for packaging

You can see that I'm prefixing install paths with $(DESTDIR), an ENV variable that is defined, and set to /usr/ports/deskutils/arttime/work/stage during packaging.

In the past I've just patched the install.sh but since it's changing constantly this has become a bit of an arduous task.

Hence my request:

Could you maybe add an --destdir option to install.sh that by default would be undefined but could be used by packagers such as me.

Supporting a sandbox installation directory is a common practice that is supported by many other build systems.

While looking at the patch I am also completely skipping everything that comes after:

 # Check if path to arttime excutable is on user's $PATH

Since that is not relevant in a sandboxed directory (during package building). While here, could you maybe also think of a install.sh option to skip that? Maybe: --skip-execution-test

Errors on Debian in docker™, make arttime work under docker™

  1. Run this:
    docker run -e TERM -e LC_ALL=C.UTF-8 -it --rm zshusers/zsh:5.8 zsh -c '
      apt update
      apt install -y curl
      curl -fsSL https://gist.githubusercontent.com/poetaman/bdc598ee607e9767fe33da50e993c650/raw/d3d5e29427304d977044b594fbb6cc84616c30d4/arttime_online_installer.sh | zsh
      typeset -p TERM
      exec ~/.local/bin/arttime'
  2. Press q.
  3. Press y.

Expected: no errors.

Actual:

DEPENDS: If you want desktop notifications, you need notify-send.
DEPENDS: If you want desktop sounds, you need one of: 1) pulseaudio daemon
         running, or 2) pipewire daemon running, or 3) vorbis-tools.
basename: missing operand
Try 'basename --help' for more information.
Installation *almost* complete! To start using arttime, follow these steps:
    1) Add /root/.local/bin to your PATH environment variable in appropriate file,
    2) Open a new terminal session, type 'arttime' and press Enter.
To run it right away from this shell, execute arttime by specifying its full path:
       /root/.local/bin/arttime
export TERM=screen-256color
/root/.local/bin/arttime:echoti:500: no such terminfo capability: rmam
/root/.local/bin/arttime:echoti:502: no such terminfo capability: smam
trapexit_blocking:1: command not found: pkill

24h clock styling

I'm from Germany and here the time is 24h based. Would love a future Feature, where you can toggle between the 12 and 24 hour system. (Maybe directly in the "set or reset timezone" menu)

AUR package

please submit a PKGBUILD to the Arch User Repository if possible.

Feature request: Adding custom message to desktop notification

This is possibly linked to #36 - but it would be nice to add a custom message to be displayed on the desktop notification. Say if you have a timer to remember to take a walk and drink a glass of water every other hour in between other types of timers it would be nice to have a specific textual reminder for that. I can have a quick look on the source to see if this is something I am able to contribute to.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.