You are not logged in.

#1 2017-01-28 19:30:48

chris.m
Member
Registered: 2014-04-06
Posts: 24

Galendae - A Styleable Popup Calendar

Galendae is a basic popup calendar. Its colors can be customized through a configuration file. I designed Galendae primarily as a calendar that can be used with tiling window managers, or any setup where your piecing together your own elements to form a 'Desktop Environment'. I previously used gsimplecal for this task, but wanted something that could be styled to match the rest of my setup. Galendae can mostly be used as a drop in replacement for gsimplecal as I used it a lot for inspiration.

https://github.com/chris-marsh/galendae

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

A couple of example screenshots ...
YZXHkhxb.png 0tNQDN6b.png 6M3zpGzb.png
Galendae gives you control over:

    * Background color
    * Foreground color
    * Title month font size and weight
    * Day header font size and weight
    * Date number font sizes and weights

I still have a list of features and changes I want to do with this little program, but I thought it was time to try and get some feedback.

All critque on the program or its code would be very much welcome and appreciated.

Hopefully it might also be useful to some!

Cheers.

Last edited by chris.m (2017-01-29 22:14:58)

Offline

#2 2017-01-28 19:44:33

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

Re: Galendae - A Styleable Popup Calendar

I'm digging through your code now and so far so good with exception of the following. Note that I'm not quite done reading all of your code in it's entirety. but wanted to post before I forget.
1): What is the purpose of the first else statement lines 56-64 in file instance.c, where you have /* Deal with an error */ ? If you dont need it, then I would remove it.

...
            if (EWOULDBLOCK == errno) {
                /* Already running, get the PID */
                read(this->pid_file, this->pid, 10);
            } else {
                /* Deal with an error */
            }
        } else {
            /* Get lock */
            if (this->pid_file) {
...

2) April has 30 days wink

    {"February", 28},
    {"March", 31},
    {"April", 31},
    {"May", 31},
    {"June", 30},

Lines 36-40 gui.c

EDIT: Finished the reading and didn't notice anything else that might be buggy or otherwise. I might have to try this when I have more time to do code stuffs. smile

Last edited by JohnBobSmith (2017-01-28 19:50:26)


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-01-28 20:03:24

chris.m
Member
Registered: 2014-04-06
Posts: 24

Re: Galendae - A Styleable Popup Calendar

JohnBobSmith wrote:

I'm digging through your code now and so far so good with exception of the following. Note that I'm not quite done reading all of your code in it's entirety. but wanted to post before I forget.
1): What is the purpose of the first else statement lines 56-64 in file instance.c, where you have /* Deal with an error */ ? If you dont need it, then I would remove it.

...
            if (EWOULDBLOCK == errno) {
                /* Already running, get the PID */
                read(this->pid_file, this->pid, 10);
            } else {
                /* Deal with an error */
            }
        } else {
            /* Get lock */
            if (this->pid_file) {
...

I had planned to revisit the section, but your right, catching that situation is not needed.

JohnBobSmith wrote:

2) April has 30 days wink

Ha! Bit of a major typo for a calendar app smile

JohnBobSmith wrote:

EDIT: Finished the reading and didn't notice anything else that might be buggy or otherwise. I might have to try this when I have more time to do code stuffs. smile

Thanks.

Offline

#4 2017-01-28 21:08:26

mis
Member
Registered: 2016-03-16
Posts: 234

Re: Galendae - A Styleable Popup Calendar

I was bored...  wink

# Maintainer: Your Name <youremail@domain.com>

pkgname=galendae-git
pkgver=r24.df3c4b0
pkgrel=1
pkgdesc="A basic popup calendar that can be styled to match workspace themes"
arch=('i686' 'x86_64')
url="https://github.com/chris-marsh/galendae"
license=('MIT')
depends=('gtk3')
makedepends=('git')
source=("git+https://github.com/chris-marsh/galendae.git")
md5sums=('SKIP')

pkgver() {
  cd ${pkgname%-git}

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

build() {
  cd ${pkgname%-git}

  make
}

package() {
  cd ${pkgname%-git}

  install -d "$pkgdir"/usr/{bin,share/galendae/examples}

  install -m755 galendae "$pkgdir"/usr/bin/
  install -m644 examples/* "$pkgdir"/usr/share/galendae/examples/

  install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}

Last edited by mis (2017-01-28 21:09:59)

Offline

#5 2017-01-28 22:42:15

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

Re: Galendae - A Styleable Popup Calendar

That pkgbuild looks okay, but you do seem to have a lot of extraneous vertical white space for everything after md5sums=('SKIP'). I would use the following:

# Maintainer: Your Name <youremail@domain.com>

pkgname=galendae-git
pkgver=r24.df3c4b0
pkgrel=1
pkgdesc="A basic popup calendar that can be styled to match workspace themes"
arch=('i686' 'x86_64')
url="https://github.com/chris-marsh/galendae"
license=('MIT')
depends=('gtk3')
makedepends=('git')
source=("git+https://github.com/chris-marsh/galendae.git")
md5sums=('SKIP')

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

build() {
  cd ${pkgname%-git}
  make
}

package() {
  cd ${pkgname%-git}
  install -d "$pkgdir"/usr/{bin,share/galendae/examples}
  install -m755 galendae "$pkgdir"/usr/bin/
  install -m644 examples/* "$pkgdir"/usr/share/galendae/examples/
  install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}

This makes it easier to read and also reserves vertical whitespace for function starts and ends. smile


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

#6 2017-01-29 11:42:19

chris.m
Member
Registered: 2014-04-06
Posts: 24

Re: Galendae - A Styleable Popup Calendar

mis wrote:

I was bored...  wink

# Maintainer: Your Name <youremail@domain.com>
...

Thanks mis! That is really appreciated. I've never been involved in maintaining or uploading to the AUR so that was really helpful. I've been doing a bit of wiki reading this morning and used your pkgbuild to upload to the AUR.

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

Offline

#7 2017-01-29 22:22:06

chris.m
Member
Registered: 2014-04-06
Posts: 24

Re: Galendae - A Styleable Popup Calendar

A small update today, the calendar now includes the leading days from the previous month and trailing days from the following month. These fringe days can be given a custom color.

6M3zpGzb.png

Offline

#8 2017-01-29 23:55:00

stupidus
Member
Registered: 2012-02-27
Posts: 124

Re: Galendae - A Styleable Popup Calendar

Thanks for this project!
It reminded me, that I could add a calender to my lemonbar. However, I have some trouble configuring the positioning.
What does the position parameter in the config do? I tried things such as left, right, top, bottom,... but none of these seem to do anything. How can I get it to open aligned with the right screen edge?
Also, how would it react if I have multiple screens? I cannot test this right now, because I currently don't have access to another screen.

EDIT: I guess, that the position parameter refers to this. At least setting position=mouse will open the window at the position of the cursor. But I think it would still be good to have the possibility to place the window relative to the screen edges.

EDIT2: Actually, I think the best way would be to have the possibility to overwrite config options via the commandline. That way, it would be possible to use the xrandr output to calculate the position of the calender window.

Last edited by stupidus (2017-01-30 09:37:50)

Offline

#9 2017-01-30 12:30:58

chris.m
Member
Registered: 2014-04-06
Posts: 24

Re: Galendae - A Styleable Popup Calendar

stupidus wrote:

Thanks for this project!
It reminded me, that I could add a calender to my lemonbar. However, I have some trouble configuring the positioning.
What does the position parameter in the config do? I tried things such as left, right, top, bottom,... but none of these seem to do anything. How can I get it to open aligned with the right screen edge?
Also, how would it react if I have multiple screens? I cannot test this right now, because I currently don't have access to another screen.

EDIT: I guess, that the position parameter refers to this. At least setting position=mouse will open the window at the position of the cursor. But I think it would still be good to have the possibility to place the window relative to the screen edges.

That is exactly right. I really need to add some documentation for the config file. I plan to expand the available options but for now I will add comments to the example files to explain the available options. In the case of position, Galendae accepts;

    * none          No influence is given over window placement. The window manager will deal with placement.
    * center        Galendae will attempt to position its window in the center of screen
    * mouse       Again, Galendae will position its window by the mouse pointer

I agree that offsetting from screen edges would be an advantage. I did previously attempt this, but GTK was infuriating to get to do what I wanted. I will revisit this soon and hopefully get it working. For now, its easiest to leave position as 'none', meaning the window should be positioned at the top left of the screen. You can then use xoffset and yoffset as (x, y) coordinates to position the window.

stupidus wrote:

EDIT2: Actually, I think the best way would be to have the possibility to overwrite config options via the commandline. That way, it would be possible to use the xrandr output to calculate the position of the calender window.

I haven't tested this yet. I will hopefully get to test it soon.

Thanks for trying the program!

Last edited by chris.m (2017-01-30 12:32:24)

Offline

#10 2017-01-30 19:35:10

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

Re: Galendae - A Styleable Popup Calendar

So I *just* installed the galendae package, and I have yet to run it, because I'm wondering: What the heck does "(1/1) Arming ConditionNeedsUpdate..." mean?? Will google ASAP.

//At the conclusion of makepkg -sri...
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...
[jbs@dmb-gaming-laptop galendae-git]$ 

EDIT:
Google is being fruitless at the moment but I'm not concerned, I've just never seen that before. I'll search harder later. Here is my review or running the program from a terminal:

-No exit button as a GUI, clickable button within the calendar pop-up itself. You should add this window decoration (if that's the correct term?) because I strongly consider it to be a necessity! I would make this the default behavior, then give users the command line argument option to turn it off. EG galendae --no-window-decor.
-Did not test themes, but the calendar is bland right now. Even a black/white/grey gradient would be better than just grey and black. Though for a minimalist calendar you achieved what you set out to do wink
+Having a circle around the current day. Very nice! smile
+Ran without crashing
+Was able cycle through the months successfully.

Overall, an excellent calendar app in very, very early development. smile

Last edited by JohnBobSmith (2017-01-30 19:59:33)


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

#11 2017-01-30 20:31:57

chris.m
Member
Registered: 2014-04-06
Posts: 24

Re: Galendae - A Styleable Popup Calendar

JohnBobSmith wrote:

So I *just* installed the galendae package, and I have yet to run it, because I'm wondering: What the heck does "(1/1) Arming ConditionNeedsUpdate..." mean?? Will google ASAP.

//At the conclusion of makepkg -sri...
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...
[jbs@dmb-gaming-laptop galendae-git]$ 

EDIT:
Google is being fruitless at the moment but I'm not concerned, I've just never seen that before. I'll search harder later. Here is my review or running the program from a terminal:

Thanks for trying it out smile ... I've never seen that message before. The output doesn't look like plain makepkg, I assume your using an AUR helper? My install looks like this. I will try googling that output.

JohnBobSmith wrote:

-No exit button as a GUI, clickable button within the calendar pop-up itself. You should add this window decoration (if that's the correct term?) because I strongly consider it to be a necessity! I would make this the default behavior, then give users the command line argument option to turn it off. EG galendae --no-window-decor.

This was by design. The program can be closed with 'Esc', 'q', or by moving focus to another window. The program also closes itself if you try to run a second instance, so for example, you can setup a single shortcut key to open and close. However, I agree this should be a user option and I'll add that in.

JohnBobSmith wrote:

-Did not test themes, but the calendar is bland right now. Even a black/white/grey gradient would be better than just grey and black. Though for a minimalist calendar you achieved what you set out to do wink
+Having a circle around the current day. Very nice! smile

The default light grey background with black text is very bland. There are two alternative configs provided that are better wink However, gradients might be an idea for a future addition. I have to admit I'm not the best at designing color schemes etc, so I am very willing to accept contributions to add to the examples big_smile

JohnBobSmith wrote:

+Ran without crashing
+Was able cycle through the months successfully.

Overall, an excellent calendar app in very, very early development. smile

Thanks.

Offline

#12 2017-01-30 22:35:50

chris.m
Member
Registered: 2014-04-06
Posts: 24

Re: Galendae - A Styleable Popup Calendar

@JohnBobSmith

New options have been to the config file. Window decorations are now shown by default unless specified otherwise in the config. Also, if you installed from the AUR, a quick way to test the example themes;

$ galendae -c dark.conf

or

$ galendae -c blue.conf

@stupidus

I've added comments to explain the config options;

###
# Galendae dark example config file
###################################
 
### WINDOW SETTINGS

# Stick window to all workspaces: 0=No, 1=Yes
stick=0
# Undecorated window: 0=No, 1=Yes
undecorated=0
# Close the window if it loses focus: 0=No, 1=Yes
close_on_unfocus=0
# Initial window position: 'center', 'mouse' or 'none'
position=none
# Move the window horizontally from its intial position
x_offset=725
# Move the window vertically from its initial position
y_offset=38

### COLORS

# Window background specified with CSS color
background_color=#222222
# Text color specified with CSS color
foreground_color=#dfdfdf
# Dates of previous and following months, colored with CSS
fringe_date_color=#404040

### FONTS

# Month font with CSS size and weight
month_font_size=xx-large
month_font_weight=normal

# Weekday column header font with CSS size and weight
day_font_size=75% 
day_font_weight=normal

# Date number font with CSS size and weight
date_font_size=x-large
date_font_weight=bold

# Arrow font, ie '<' and '>' with CSS size and weight
arrow_font_size = xx-large
arrow_font_weight = bold

Thanks again both for the feedback.

Last edited by chris.m (2017-02-06 21:23:39)

Offline

#13 2017-02-01 00:08:24

LAPB
Member
From: Santa Fe, Argentina
Registered: 2013-05-20
Posts: 1

Re: Galendae - A Styleable Popup Calendar

chris.m wrote:
JohnBobSmith wrote:

So I *just* installed the galendae package, and I have yet to run it, because I'm wondering: What the heck does "(1/1) Arming ConditionNeedsUpdate..." mean?? Will google ASAP.

//At the conclusion of makepkg -sri...
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...
[jbs@dmb-gaming-laptop galendae-git]$ 

EDIT:
Google is being fruitless at the moment but I'm not concerned, I've just never seen that before. I'll search harder later. Here is my review or running the program from a terminal:

Thanks for trying it out smile ... I've never seen that message before. The output doesn't look like plain makepkg, I assume your using an AUR helper? My install looks like this. I will try googling that output.

https://git.archlinux.org/svntogit/pack … a1365f6308
edit, extra info: seems to be related to stateless systems

Last edited by LAPB (2017-02-01 00:34:37)

Offline

#14 2017-02-03 19:42:50

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

Re: Galendae - A Styleable Popup Calendar

Hi, this wasn't showing up in my new posts section, sorry for a slightly late reply.

I'm glad you source dived to some extent to find that git page, LAPB, many thanks. Why on earth /usr/bin/touch -c /usr is useful to anything remains a mystery, and I won't de-rail this thread with that completely separate topic. This is also NOT galendae related. It just happened to be galendae that first triggered it, as I have seen it (ArmingConditionNeedsUpdate) since then. I am not using an AUR helper, because pacman is the *only* package manager the world needs.

chris.m, I'm glad to have been of use with your project! big_smile


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

Board footer

Powered by FluxBB