[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Fwd: [STUMP] [PATCH] Allow access to time without invoking external
From: |
Matt Spear |
Subject: |
Re: Fwd: [STUMP] [PATCH] Allow access to time without invoking external date |
Date: |
Mon, 7 Mar 2011 20:51:50 -0800 |
Yes...%d in the mode-line works for me...sorry I just started using
stumpwm. I think it may be worth applying the patch as it gives
flexibility and helps hide some details from outside time.
Also it means I can do a time-based screenshot command cleanly:
(defcommand sshot2 () ()
"Take a screenshot"
(run-shell-command (format nil "import
/home/batman/~A.jpg" (time-format "%y-%m-%e-%H-%M-%S"))))
Thanks!!
Matt Spear
address@hidden
PS. I just noticed I missed a call in mode-line, I've attached a
patch that has just that change.
On Sun, Mar 6, 2011 at 11:41 PM, Ben Spencer <address@hidden> wrote:
> On Sun, Mar 06, 2011 at 10:53:00AM -0800, Matt Spear wrote:
>> Sorry, wasn't clear. I wanted to have:
>> (setf *screen-mode-line-format*
>> (list "[^B%n^b] %W ^> [%b] ^3*"
>> '(:eval (stumpwm:time-format "%a %m/%e/%Y %I:%M%p"))))
>>
>> so that I didn't have to invoke any external programs in the modeline
>> update. I've included the patch for fixing the time.lisp to use the
>> new function.
>
> Can't you just use %d in the modeline string and then set
> *time-modeline-string* appropriately?
>
> The patch looks fine and reduces redundancy in time.lisp so happy to
> apply it if it is useful.
>
> Ben
>
> _______________________________________________
> Stumpwm-devel mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/stumpwm-devel
>
time.patch
Description: Text Data