This is a follow-up to: https://github.com/karelzak/util-linux/pull/117#issuecomment-55868722 > With the high availability of wide screens and high-resolution emulated > terminals and terminal window managers it's sometimes useful to change > the output of cal(1) yearly views to more stretched out ones > horizontally. > > This patch adds a new -l/--landscape flag that stretches out the yearly > view to 3x4 and 4x3 months in Julian mode and 4x3 and 6x2 in regular > mode. The flag can be used up to two times. Thank you for your response, Karel :) "It would be better to make it completely dynamical and fill-in all terminal horizontally if possible. It means to determine the number of the months dynamically according to terminal width rather than hardcode number of months (or require more -l options (ctl.landscape++))." I don't think the filling in the terminal completely is a logical approach. I feel that calendar year output has to be rectangular. T here are always 12 months and the only way to arrange them into a nice rectangular shape is 1x12, 2x6, 3x4, 4x3, 6x2, 12x1, other shapes don't make much sense UI-wise, do they? All the printed mini calendars I get are always laid out in 3x4, 4x3 or 6x2 (rare). This is what actually inspired me to hack cal in the first place. Someone asked me to put together a simple mini calendar from print, it had to be in landscape mode (4x3 months). cal would only output 3x4 so I couldn't just copy and paste into GIMP. I couldn't even find a tool online that would output nice text to paste in. Ended up downloading the source and hacking a quick 4x3 mode for a once-off purpose, writing down "cal landscape mode" in my todo list. I did pick the most useful extensions of 4x3 and 6x2 for regular, and 3x4 and 4x3 for the Julian one. I have a 1080p monitor and 6x2 is the largest it goes without wrapping on a 12pt mono font for a regular calendar (Julian is a bit wider even so 6x2 barely fits). If 12x1 is really useful (i.e. full length with month wrapping) adding another -l to extend would work. But not having the flexibility of wrapping to predefined sizes seems like a missing feature. I mean we could resize the terminal window and wrap along the edges, but that's not good UI. Forcing the user to resize the terminal window to get perfect rectangular layouts seems like a hack. I did pick the repetition of the flag to stretch out the layout akin to the way verbose flags work in many programs, by repeating -vvvv one gets more verbosity out of the program. And by repeating -lll one gets more lanscape out of cal. Hope this makes sense. I appreciate your feedback and hope to sort this feature out with more input and brainstorming. Regards, Gennady Kovshenin On Wed, Sep 17, 2014 at 3:18 PM, Karel Zak <notifications@xxxxxxxxxx> wrote: > > Hi Gennady, > don't care about po/ stuff, it's automatically updated before release. > > The request to make cal(1) more friendly to large screens makes sense, but your -l implementation does not seem to be user-friendly. > > It would be better to make it completely dynamical and fill-in all terminal horizontally if possible. It means to determine the number of the months dynamically according to terminal width rather than hardcode number > of months (or require more -l options (ctl.landscape++)). > > See lib/ttyutils.c and get_terminal_width(). > > Note the best way to discuss new features is util-linux@xxxxxxxxxxxxxxx mailing > list. You don't have to subscribe to send to the list. > > — > Reply to this email directly or view it on GitHub. -- To unsubscribe from this list: send the line "unsubscribe util-linux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html