You are not logged in.
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!
It's a console app, works with some arguments you can simply use -h for help section:
focus -h
or look at the README
you can welcomely leave a reply here or at github issue section
AUR:
Github:
Thanks to JohnBobSmith for pkgfile help
Last edited by nagyation (2017-06-02 14:40:42)
Offline
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.
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.
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
# 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
Doh! I knew I would miss something. And your welcome!
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
Doh! I knew I would miss something. And your welcome!
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
@JonBobSmith
I believe you're missing git in $makedepends.
Offline
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
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
@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
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
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
Offline
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
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 Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
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 meMy 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
Thank you, hope you the best
Offline
@JohnBobSmith
I added it to AUR, really thanks for your help ,
I'm waiting for any suggestions or feedback
Offline
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
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
edited main post for more reasonable one
Offline