You are not logged in.

#1 2017-05-31 12:56:16

nagyation
Member
Registered: 2016-07-11
Posts: 21

Focus - a desktop notification based app that reminds you of your task

What is focus?:

Focus is a really simple program written in C works in background (daemon),which keeps notifying you with a certain sentence every period for certain duration to keep focus,
like reminding you "You will fail at exams" every 5 mins
try it, it's really effective!

How it works:

It's a console app, works with some arguments you can simply use -h for help section:

 focus -h 

or look at the README

Feedback and issue report:

you can welcomely leave a reply here or at github issue section


Install it from:

AUR:

focus-git

Github:

Focus


Thanks to JohnBobSmith for pkgfile help smile

Last edited by nagyation (2017-06-02 14:40:42)

Offline

#2 2017-05-31 13:19:35

JohnBobSmith
Member
From: Canada
Registered: 2014-11-29
Posts: 804

Re: Focus - a desktop notification based app that reminds you of your task

This is an interesting idea, although being spammed/interrupted with random messages seems, at first glance, more distracting than not. I first thought you had some sort of, say, facebook or game blocker. But this is neat. One catch: you should consider making a PKGBUILD for this, instead of a straight make install. This way, the package manager can look after your package's life cycle, including all deps and install locations. Curious, and since I'm feeling generous and I have some free time, I'll look into making a PKGBUILD for you. It'd be good practice for me too. smile

EDIT: All right! Here it is:

# Maintainer: nagyation  <unkown@unkown.???>
pkgname=focus-git
_newpkgname=Focus
pkgver=r42.7626df4
pkgrel=1
pkgdesc="A notification based app that keeps you focused"
arch=(x86_64)
url="https://github.com/nagyation/Focus"
license=('GPL')
depends=('gtk2' 'libnotify')
source=("git+https://github.com/nagyation/Focus.git")
md5sums=('SKIP')

pkgver() {
        cd "$_newpkgname"
        printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
        cd "$_newpkgname"
        make
}

package() {
        cd "$_newpkgname"
        install -D -m644 "License.txt" "${pkgdir}/usr/share/licenses/${_newpkgname}/LICENSE"
        install -D -m755 "focus" "${pkgdir}/usr/bin/focus"
}

I hope I haven't missed anything. Be sure to fill in your email correctly. smile

Last edited by JohnBobSmith (2017-05-31 13:47:04)


I am diagnosed with bipolar disorder. As it turns out, what I thought was my greatest weakness is now my greatest strength.

Everyday, I make a conscious choice to overcome my challenges and my problems. It's not easy, but its better than the alternative...

Offline

#3 2017-05-31 14:05:23

nagyation
Member
Registered: 2016-07-11
Posts: 21

Re: Focus - a desktop notification based app that reminds you of your task

# Maintainer: nagyation  <mnagy1312@gmail.com>
pkgname=focus-git
_newpkgname=Focus
pkgver=r42.7626df4
pkgrel=1
pkgdesc="A notification based app that keeps you focused"
arch=(x86_64)
url="https://github.com/nagyation/Focus"
license=('GPL')
depends=('gtk2' 'libnotify')
source=("git+https://github.com/nagyation/Focus.git")
md5sums=('SKIP')

pkgver() {
        cd "$_newpkgname"
        printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
        cd "$_newpkgname"
        make
}

package() {
        cd "$_newpkgname"
        install -D -m644 "License.txt" "${pkgdir}/usr/share/licenses/${_newpkgname}/LICENSE"
        install -D -m755 "focus" "${pkgdir}/usr/bin/focus"
        install -D -m755 "resources/focus_icon.png" "${pkgdir}/usr/share/focus/focus_icon.png"
}

updated my email,
I didn't try to write PKGBUILD file before,
and yes you've missed the icon but I added it tho, there is a problem with it loading -at least for me- , I'll try to solve this out
and yes as I said it's my really first time to post any app I did, I'm not a forum person, but I'll try to be :D, I'm happy to see a support, thank you

Offline

#4 2017-05-31 14:12:16

JohnBobSmith
Member
From: Canada
Registered: 2014-11-29
Posts: 804

Re: Focus - a desktop notification based app that reminds you of your task

Doh! I knew I would miss something. And your welcome! smile

As for the use of the program... What is the program supposed to do? What is the expected output/behaviour? If I run it I get your help message. But this:

focus -p1 -t "TEST" -b "THIS IS A TEST"

After waiting a minute, didn't seem to do anything? I might go dumpster diving (read your source code) later today if I have time.


I am diagnosed with bipolar disorder. As it turns out, what I thought was my greatest weakness is now my greatest strength.

Everyday, I make a conscious choice to overcome my challenges and my problems. It's not easy, but its better than the alternative...

Offline

#5 2017-05-31 14:16:09

nagyation
Member
Registered: 2016-07-11
Posts: 21

Re: Focus - a desktop notification based app that reminds you of your task

JohnBobSmith wrote:

Doh! I knew I would miss something. And your welcome! smile

As for the use of the program... What is the program supposed to do? What is the expected output/behaviour? If I run it I get your help message. But this:

focus -p1 -t "TEST" -b "THIS IS A TEST"

After waiting a minute, didn't seem to do anything? I might go dumpster diving (read your source code) later today if I have time.

you should put a space, by default it's 10 mins period

 focus -p  1 

[EDITED]
the output is a notification, and an icon on the system tray

Last edited by nagyation (2017-05-31 14:20:24)

Offline

#6 2017-05-31 14:28:32

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: Focus - a desktop notification based app that reminds you of your task

@JonBobSmith

I believe you're missing git in $makedepends.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#7 2017-05-31 14:34:06

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: Focus - a desktop notification based app that reminds you of your task

nagyation wrote:

The code it self isn't the best I just did it because I had the idea while studying for the exams and it helps me somehow :'D

So instead of studying, you spent your time writing code to tell you to study? This is the sort of self-sniping that I do. We should start a club tongue


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#8 2017-05-31 14:43:43

JohnBobSmith
Member
From: Canada
Registered: 2014-11-29
Posts: 804

Re: Focus - a desktop notification based app that reminds you of your task

slithery wrote:

@JonBobSmith

I believe you're missing git in $makedepends.

I wasn't aware that git should be in the $makedepends. Updated PKGBUILD below:

# Maintainer: nagyation  <mnagy1312@gmail.com>
pkgname=focus-git
_newpkgname=Focus
pkgver=r42.7626df4
pkgrel=1
pkgdesc="A notification based app that keeps you focused"
arch=(x86_64)
url="https://github.com/nagyation/Focus"
license=('GPL')
depends=('gtk2' 'libnotify')
makedepends=('git')
source=("git+https://github.com/nagyation/Focus.git")
md5sums=('SKIP')

pkgver() {
        cd "$_newpkgname"
        printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
        cd "$_newpkgname"
        make
}

package() {
        cd "$_newpkgname"
        install -D -m644 "License.txt" "${pkgdir}/usr/share/licenses/${_newpkgname}/LICENSE"
        install -D -m755 "focus" "${pkgdir}/usr/bin/focus"
        install -D -m755 "resources/focus_icon.png" "${pkgdir}/usr/share/focus/focus_icon.png"
}

I am diagnosed with bipolar disorder. As it turns out, what I thought was my greatest weakness is now my greatest strength.

Everyday, I make a conscious choice to overcome my challenges and my problems. It's not easy, but its better than the alternative...

Offline

#9 2017-05-31 14:45:12

nagyation
Member
Registered: 2016-07-11
Posts: 21

Re: Focus - a desktop notification based app that reminds you of your task

Xyne wrote:
nagyation wrote:

The code it self isn't the best I just did it because I had the idea while studying for the exams and it helps me somehow :'D

So instead of studying, you spent your time writing code to tell you to study? This is the sort of self-sniping that I do. We should start a club tongue

yes, it's strangely satisfying when I deceive myself to make an app so then I can study well :'D
I usually get ideas while studying :'D I even have a final exam tomorrow yet I'm here :'D pray for me big_smile

Offline

#10 2017-05-31 14:47:19

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: Focus - a desktop notification based app that reminds you of your task

nagyation wrote:

yes, it's strangely satisfying when I deceive myself to make an app so then I can study well :'D
I usually get ideas while studying :'D I even have a final exam tomorrow yet I'm here :'D pray for me big_smile

My entire site is essentially a testament to random ideas that I've had while I should have been doing something else. Self-deceptive procrastination is a hard drug. Good luck!


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#11 2017-05-31 14:55:03

nagyation
Member
Registered: 2016-07-11
Posts: 21

Re: Focus - a desktop notification based app that reminds you of your task

Xyne wrote:
nagyation wrote:

yes, it's strangely satisfying when I deceive myself to make an app so then I can study well :'D
I usually get ideas while studying :'D I even have a final exam tomorrow yet I'm here :'D pray for me big_smile

My entire site is essentially a testament to random ideas that I've had while I should have been doing something else. Self-deceptive procrastination is a hard drug. Good luck!

Yes indeed big_smile
Thank you, hope you the best smile

Offline

#12 2017-05-31 15:57:08

nagyation
Member
Registered: 2016-07-11
Posts: 21

Re: Focus - a desktop notification based app that reminds you of your task

@JohnBobSmith
I added it to AUR, really thanks for your help smile,
I'm waiting for any suggestions or feedback 

https://aur.archlinux.org/packages/focus-git/

Offline

#13 2017-05-31 16:19:27

JohnBobSmith
Member
From: Canada
Registered: 2014-11-29
Posts: 804

Re: Focus - a desktop notification based app that reminds you of your task

Your welcome.

Shame on someone or some feature or something fierce for the return of the accidental double post bug...


I am diagnosed with bipolar disorder. As it turns out, what I thought was my greatest weakness is now my greatest strength.

Everyday, I make a conscious choice to overcome my challenges and my problems. It's not easy, but its better than the alternative...

Offline

#14 2017-06-02 02:22:30

nagyation
Member
Registered: 2016-07-11
Posts: 21

Re: Focus - a desktop notification based app that reminds you of your task

I want to ask about the versioning of the app? I've just updated the app and updated the pkgbuild, but didn't change the version is that a problem?

Offline

#15 2017-06-02 14:42:21

nagyation
Member
Registered: 2016-07-11
Posts: 21

Re: Focus - a desktop notification based app that reminds you of your task

edited main post for more reasonable one smile

Offline

Board footer

Powered by FluxBB