[Solved] I3 WM: date and time in statusbar?

Hey, just recently switched from xmonad to I3 and so far I really like it (never got around to learn haskell). The only thing still missing is to display at least the current time and maybe also the date in the statusbar. I at least couldn't find anything in the docs or manpage, so maybe there is no way to do that?
Last edited by JonathanArcher (2010-04-06 19:37:41)

What does i3-msg bb do?
I start the script from xinitrc. Here's mine:
.xinitrc:
exec i3 --force-xinerama &
sh startup.sh
and the startup script:
i="1"
feh --bg-scale /media/sdb1/Documents/wall2copia.png
while [ $i = 1 ]
do
DATE=$(date)
MEMINFO=$(sed -n -e '3d' -e '1,4p' /proc/meminfo | awk '{printf "%d ", $2 }')
UPTIME=$(uptime | sed 's/.*://; s/,//g')
QUALITY=$(sed -e '1,2d' /proc/net/wireless | cut -d" " -f6,7)
UNAME=$(uname -a | cut -d" " -f1,2,3)
TEMPS=$(sensors | awk '/C/ { print $3}' | xargs | cut -d" " -f1,2,3,4)
echo "^fg(white)$DATE^fg(grey) | $UNAME | ^fg(white)^i(mem.xbm)^fg(grey) T/F/C $MEMINFO | ^fg(white)^i(net-wifi.xbm) $QUALITY ^fg(grey)| ^fg(white)^i(cpu.xbm)^fg(grey) $UPTIME | ^fg(white)^i(temp.xbm)^fg(grey) $TEMPS"
sleep 5
done | dzen2 -x 150 -y 1005 -w 1050 -bg black -fg grey -fn fixed

Similar Messages

  • [SOLVED] Date and Time messed up on GNOME

    I recently purchased a new laptop with Windows 7 Home Premium, and I've got a dual-boot set up and running perfectly between Win7 and Arch. The only issue is that the date and time in GNOME shell is messed up.
    I've checked the all-knowing ArchWiki, and it says that UTC is generally preferred, unless using a Windows operating system or something, in which case using localtime would be preferred. I've done that. the time in GNOME shell still shows up as inaccurate. I've reset the time in GNOME shell to fix it, but seeing as how /etc/rc.conf is sourced upon boot, my efforts were in vain.
    Has this occurred with anyone else who has a dual-boot with Windows 7 where the time shows up as inaccurate? If so, what's the method of fixing it?
    Last edited by shaunsingh14 (2012-03-17 16:07:44)

    karol wrote:
    shaunsingh14 wrote:I've checked the all-knowing ArchWiki, and it says that UTC is generally preferred, unless using a Windows operating system or something, in which case using localtime would be preferred.t?
    The wiki does mention UTC in Windows: https://wiki.archlinux.org/index.php/Ti … in_Windows
    Please post the output of 'hwclock --debug'.
    Output of
    hwclock --debug
    is as follows:
    [root@the-enforcer shaun]# hwclock --debug
    hwclock from util-linux 2.20.1
    Using /dev interface to clock.
    Last drift adjustment done at 1331440368 seconds after 1969
    Last calibration done at 1331440368 seconds after 1969
    Hardware clock is on UTC time
    Assuming hardware clock is kept in UTC time.
    Waiting for clock tick...
    ...got clock tick
    Time read from Hardware Clock: 2012/03/11 15:23:59
    Hw clock time : 2012/03/11 15:23:59 = 1331479439 seconds since 1969
    Sun 11 Mar 2012 11:23:59 AM EDT -0.549004 seconds
    [root@the-enforcer shaun]#

  • Insert date and time into write to spreadsheet

    Easy question here
    I need save 4 arrays of data and insert the date and time that it was taken (LV 8.6)
    for example
    9/4/09 10:00:01 AM  4  6  7  2
    9/4/09 10:00:02 AM  4  6  7  2
    9/4/09 10:00:03 AM  4  6  7  2
    9/4/09 10:00:04 AM  4  6  7  2
    Any ideas, I can't wire the timestamp or date/time string right into the create array
    Thanks
    Chris
    Solved!
    Go to Solution.

    Ok
    the basic problem that I see is the the LabVIEW TimeStamp type is a cluster.  Converting it to a dbl gives you a value in seconds elapsed since 1904 Jan 1 12:00AM GMT and, your spreadsheet cannot interprate that (or display that) as a "TIME."   So, you want to convert it to a string (easy TS->String check the help for format options) BUT, you might want to pass all of your data as numbers into your spreadsheet so you can post-calculate or graph other outputs vs. TIME!  This little chunk of code .....
     converts a LV Timestamp to a number that Excel interperates as "the amount of days elapsed since 0 Jan 1900 @ 12:00AM LOCAL."  You will need to format the cell in Excel to display it as a date-time But it can be operated on and graphed against with only Excel's limitations (Excel followed the Lotus bug of erroneously assuming 1900 was a leap year, and Leap seconds are unrecognized)
    Enjoy!
    Message Edited by Jeff Bohrer on 08-06-2009 02:28 PM
    Jeff

  • How to include install date and time in registry keys

    Hi All,
    Hopefully someone can help me. I am creating an installer which includes some properties in the build specs. I also wannt to include some registry keys to be added upon installation:
    1. I include the install directory of the application by providing the key with the value [INSTALLDIR]. This seems to work well and I have no problem with this.
    2. The other key I would like to include (but I do not know how) is the date and time of installation. Is there a way of automatically including this in a registry key (similar to INSTALLDIR)?
    I look forward to your expert advice!
    Kind Regards,
    Larry
    Laurence C.
    Senior Test Development Engineer
    Dyson Ltd
    Solved!
    Go to Solution.

    Larry,
    afaik the setting for "Run as Admin" is per OS process. As the "Run Exe after installation" is a different process as the application you installed by it (e.g. "MyApplication.exe"), i wouldn't expect the MyApplication.exe to require/use admin-rights.
    Norbert
    CEO: What exactly is stopping us from doing this?
    Expert: Geometry
    Marketing Manager: Just ignore it.

  • Can I get MJD (date and time) in LabVIEW 2012 SP1?

    I need to time stamp my data before sending it to the file.  I have been doing this with the standard calendar date and time but MJD is what we prefer to use.  How can I get an MJD timestamp in LabVIEW 2012 SP1?
    Solved!
    Go to Solution.

    Hello Brad_Henry,
    The Format Date/Time String will return the day of the year when the %j argument is used, as per this help document:
    LabVIEW Help: Format Codes for the Time Format String
    http://zone.ni.com/reference/en-XX/help/371361J-01/glang/codes_for_time_format_str/
    If you're looking for the actual MJD, I'm not aware of a built-in function that generates this so you'll probably need to create or find a function to calculate it manually.  This should pretty basic arithmetic, and it looks like people have already made a few public examples, the first two search results here look to be just about what you need:
    ni.com search:
    http://search.ni.com/nisearch/app/main/p/bot/no/ap/tech/lang/en/pg/1/sn/catnav:ex/q/julian/
    Regards,
    Tom L.

  • How to eliminate date and time in image logging in vision express

    I am using vision express to capture a set number of images with inline processing. I am opting to log the images to a specified folder. However, the file names of the images have the date and time appended by default. Is there a way to eliminate the date and time in the images' file name? Please help.
    Solved!
    Go to Solution.

    Hi
    It may help if you paste your code and file to better understand what is it that you want to remove from the file. If you have the vision development module, you can certainly use the File VIs available within the vision tools utilities palette in LabVIEW to manipulate the way you save your files.
     http://www.ni.com/pdf/manuals/371007a.pdf (Page14)
     There is a good example code you can refer to within the following forum link:
    http://forums.ni.com/t5/LabVIEW/Labview-IMAQ-VI-for-capturing-images-and-saving-with-incremental/td-... 
    Also if you have access to the Vision Builder for Automated Inspection software, this application offers you that option:
    http://digital.ni.com/public.nsf/allkb/AE578D1C036084C0C1256EB4005EE687?OpenDocument
    Luis S
    Application Engineer
    National Instruments

  • Get-Content and add Date and Time in a new file

    Hello,
    in a existing file I have data like:
    1;Idle
    5;chrome
    1;spoolsv
    Now I need to grab the content and add date and time in front of each line and save it to another file like:
    07.04.2015;10:18;1;Idle
    07.04.2015;10:18;5;chrome
    07.04.2015;10:18;1;spoolsv
    But I don't have any idea how I could solve this challange. Does anyone have a helping hand for me?
    Greetings

    Hello,
    If you need a new file with the desired output try this
    get-content .\current.txt | Foreach-Object{ $dntv = (get-date) ; "$dntv" + $_} | Out-File newfile.txt
    regards,
    V
    Venu

  • Date and time in menu bar

    Hi everyone,
    I'm having a very silly problem that is driving me crazy. I found similar problems on this forum but not exactly the answer to them.
    The "Show date and time in menu bar" checkbox System Preferences will not remain checked. I have checked it 50 times but every time I close it and go back it's unchecked.
    Based on some suggestions on the forum I check the SystemUIServer in Activity Monitor and it's hanging (i.e. Not Responding). I tried force quitting and restarting but it doesn't get it going. Somehow I think these two problems are related.
    I also tried deleting the com.apple.systemuiserver.plist file under ~/Library/Preferences and logging out and back in to go back to system defaults on the menu bar but that didn't work either.
    Alot of people solved similar problems by installing OS X 10.5.2 but I'm already running 10.5.2! I'm running out of ideas here.
    Any help is appreciated.

    Excuse me, my interface is in Dutch and I literally translated the name.
    Desktop and Screen saver I believe, select the menu for the screen saver.
    There is a box you can tick, it will display the time when the screen saver is running.
    It could be displayed like 3553 instead of the correct time.
    If that is the case check in another user account, or make a new user account in Apple menu>System preferences>Accounts. Does the problem occur in the new account as well?

  • Date and Time in Active Directory

    How to update date and time from internet in active directory server ?

    Hey Hadi.Balaghi,
    You do this from the command line by using W32TM command
    Example: "w32tm /config /manualpeerlist:ntp1.tpg.com.au /syncfromflags:manual" (it's will be updated from ntp1.tpg.com.au server time).
    I've provided you a link that explains in simple amazing on any subject time update, it also presents an example.
    I recommend you watch the video and learn
    https://www.youtube.com/watch?v=-NCheMw851M
    Please Mark This As Answer if it helps to solve the issue
    Tzuri Ben Ezra | My Certifications:
    CompTIA A+ ,Microsoft MCP, MCTS, MCSA, MCITP
    |
    FaceBook: Tzuri FaceBook | vCard:
    Tzuri vCard | 
    Microsoft ID:
    Microsoft Transcript 
     |

  • "RT Set date and time" does not set seconds in UTC mode

    Hallo,
    I tried to set the time on my cRio 9012 with the function settimeUTC which is used by the "Set Date and Time" vi. But the seconds I enter are ADDED to the current time and not set as new value.
    Even the vi shows this behaviour: I set up a vi in which the time is set in a loop (100ms delay) and read again. When I set local time the clock stops (as expected) but when I set the UTC time the seconds keep on running...
    Can anybody help me with that problem???
    Thanks
    Florian
    Solved!
    Go to Solution.

    Hi Andreas,
    well it does not matter if I set a time zone in the MAX or not. In my example I was working on UTC + 0 but even when I set it to my local time (UTC + 1) I get the same behaviour modified by one hour.
    My LabView Version is 8.5. In in the MAX under Software-> LabView-RealTime it says that I am using 8.5.0.
    I suspect  that the settime.out which is installed on the cRio is probably the root of the problem as VxWorks itself does not offer a function (at least I did not find one) to convert from broken down system time to system time in seconds. There only exist one to convert from broken down local time to system time in seconds ( mktime() ). The reverse function is available for both cases: gmtime() and localtime(). I also did not find a way to find out the offset of the local time. So I have to use the library function settimeUTC() from settime.out.
    As I offered I can send you the settime.out file from my cRio for reference or maybe you can tell me how to find out what the version of the file is. It seems not to be an ELF file as I looked inside it to find some timestamp or version info...
    Thanks so far 
    Florian

  • Date and Time

    Insert date or time or both in to a file name
    I would find it very usfull to be able to automate the prosseses of inserting the date ( in year mouth day order ) and the time in to a file name. This would allow the tracking of email saved as text in a sequential order. ie the file name would read subject date time. Is there a way of doing this with apple script ? I can not find any " get current date" or "get current time" comand. Is it posible to use apple script to open a sutable application and get the date and time from there ? anybody solved this ?

    Is it the current date you want?
    There are example AppleScripts in /Applications/AppleScript/Example Scripts. Under the subfolder Info Scripts is one that shows how to get date and time. Under the subfolder Finder Scripts are a number of rename scripts, including "Add to File Names".
    Probably there are ways to change the format using the AppleScript current date command, but the shell command date is particularly flexible. For example, try this AppleScript:
    set the time_stamp to (do shell script "date +%Y%m%d-%H%M%S")
    display dialog time_stamp
    Replace the "display dialog" line with code to change the file names. If you can read Unix man pages, see man date and man strftime for details on formating the date command.

  • Automatic file generation using system date and time

    Hi guys,
    Iam trying to generate a path for file creation automatically using System date and time. I am running into errors with respect to special characters in filename. I am trying to parse the string to get date and time without the '/' and ':' but have not been successful. is there a better way to do it? Please help! I am trying to avoid a dialog box for user to enter a filename.
    Thanks!
    V
    I may not be perfect, but I'm all I got!
    Solved!
    Go to Solution.

    here is a little experiment .... building the path out of %m (month) %d (day) %(year) type stuff might help.
    Attachments:
    putting time in path.vi ‏7 KB

  • Date and Time sync 8 hours ahead!!

    Hey peepl...
    I'm not a complete vegetable when it comes to the MAC but my iMAC's problem has me mashed...
    I reformatted my hard drive recently so that I could put boot camp on (soiling my MAC with windows software!!) and then restored everything from my Time Machine backup but ever since I did that the time (and date) on my computer is 8 hours ahead of the real time even tho it's supposed to be syncing automatically with apple.asia...
    I know I can manually select the time in "Date and Time" in preferences but I prefer to keep it synced.
    I thought it was a problem with my firewall so I changed a few settings but it keeps on doing it.
    Can anyone help???? It's rather p@ss@ing me off

    Thanks for trying to help mate. I actually solved the problem late last night after noticing something. It seems that Windows in Boot Camp time was set 8 hours ahead which seems to have meant that every time if fixed the time on here, when I rebooted in windows in put it 8 hours further ahead.
    But it ALSO meant that when I tried to sync the time to apple.asia (for some strange and weird reason) the server returned that time as being correct (the one that was 8 hours ahead). I still don't understand it but at least (I think, and hope) it's fixed. :S
    thanks again for taking the time to try and help out Daniel...

  • Date and time embedded in DV movie: how to get it into iMovie?

    Hi,
    I've been trying to find an answer to this question using Google, but was not succesful, so here goes.
    I am a fairly new Mac user (yup, I moved over from The Dark Side, at least when at home). Last year, I made a family movie using Ulead VideoStudio. For my workflow, I depended heavily on the date & time stamps that are embedded in the DV movies captured into Ulead from my Sony Handycam.
    Now, with iMovie, in the imports that I moved over from my Windows machine all get the date and timestamp from the files.
    Is there a way to get the embedded date & timestamps from the DV movies? If iMovie can't do it, can Final Cut Express?
    Best regards,
    Donald.

    Hi,
    After some heavy Googling and fiddling, I've solved my problem:
    - Downloaded and ran DVdate (http://paul.glagla.free.fr/dvdate_en.htm) on my Windows PC to rename files based on the timecode in the DV .avi files. (I used filename template "clip-yyyy-mm-dd+hh;mm;ss.avi" where yyyy-mm-dd is the year/month/date and hh:mm:ss is the time retreived from the actual DV timestamp).
    - Moved the files over to my iMac using an external USB drive
    - Used Automator to rename the files on the iMac (DVdate does not support a space character in filenames) to the format "clip-yyyy-mm-dd<space>hh;mm;ss.avi".
    - Now iMovie uses the real date and time of the recording of the movies, instead of the date/time from the files themselves.
    It took some time, but now I'm a happy camper
    Best regards,
    Donald.

  • How to change date and time format

    Hi experts,
    Can i know how to change the date and time format?
    I want the date format to be dd-mmm-yyyy  and time format to be hh:mm:ss
    These date and time is in my sapscript form.
    I make use of PERFORM function in sapscript.
    This is the code in my print program.
    FORM get_actlog_QA TABLES in_tab STRUCTURE itcsy
                           out_tab STRUCTURE itcsy.
       DATA: object TYPE string, "
            qaname LIKE JCDS-USNAM, "NAME for engineering process, QA Manager
            qadate LIKE JCDS-UDATE, "DATE changed in engineering process, QA Manager
            qatime LIKE JCDS-UTIME. "TIME changed in engineering process, QA Manager
    DATA: lt_jcds type standard table of jcds,
          wa_jcds like line of lt_jcds,
          new_date(10) type c.
      READ TABLE in_tab INDEX 1.
      MOVE in_tab-value TO object.
      select * into CORRESPONDING FIELDS OF TABLE lt_jcds
      from jcds WHERE objnr = object
        AND  ( stat = 'E0005' )
        AND inact = ''.
      Loop at lt_jcds into wa_jcds.
          qaname = wa_jcds-USNAM.
          qadate = wa_jcds-UDATE.
          qatime = wa_jcds-UTIME.
       READ TABLE out_tab INDEX 1.
       MOVE qaname TO out_tab-value.
       MODIFY out_tab INDEX sy-tabix.
       READ TABLE out_tab INDEX 2.
       MOVE qadate TO out_tab-value.
       MODIFY out_tab INDEX sy-tabix.
       READ TABLE out_tab INDEX 3.
       MOVE qatime TO out_tab-value.
       MODIFY out_tab INDEX sy-tabix.
      endloop.
      clear wa_jcds.
      ENDFORM. 
    This is my PERFORM in sapscript.
    /:           DEFINE &V_QANAME& = ''.
    /:           DEFINE &V_QADATE& = ''.
    /:           DEFINE &V_QATIME& = ''.
    /:           PERFORM GET_ACTLOG_QA IN PROGRAM ZFIR002
    /:           USING &VIQMEL-OBJNR&
    /:           CHANGING &V_QANAME&
    /:           CHANGING &V_QADATE&
    /:           CHANGING &V_QATIME&
    /:           ENDPERFORM.                     
    Sapscript
    Prepared by : &V_QANAME& ,, &V_QADATE& ,, &V_QATIME&
    The output now is
    Prepared by: Name   20080312  115536 
    I want to change the date format to 12-MAR-2008
    and the time format to 11:55:36 
    Can anyone please suggest on how to solve this?
    Thank you.

    Hi,
      Before assigning the  QADATE value you can write the logic to display  20080312   as  12-MAR-2008  taking the offset values .
    Like
    qadate = wa_jcds-UDATE.
    qatime = wa_jcds-UTIME.
      lw_year    = qadate(4).
      lw_month = qadate+4(2).
      lw_date    = qadate+6(2).
    case lw_month.
    when 1.
    when 2.
            concatenate lw_date  '-FEB-'  lw_year into qadate.
    when 3.
          concatenate lw_date '-MAR-' lw_year into qadate.
    endcase.
    READ TABLE out_tab INDEX 2.
    MOVE qadate TO out_tab-value.
    MODIFY out_tab INDEX sy-tabix.
    And you can also change the timeformat also  .
    then assign that value to qatime .Then
    READ TABLE out_tab INDEX 3.
    MOVE qatime TO out_tab-value.
    MODIFY out_tab INDEX sy-tabix.
    I think this helps you.
    Regards,
    Rajitha.

Maybe you are looking for

  • Adobe Acrobat Pro XI vs X Accessibility Checks

    I have a Adobe Acrobat Pro XI. My client has Adobe Acrobat Pro X. In XI, my documents are completely accessible, but when they run the accessibility check in X they show errors. The client will send documents back to us as non-compliant due to these

  • Transfer assets between accounting center

    HI, IS ABLE TO TRANSFER ASSET FROM ONE COST CENTER TO ANOTHER Ramakrishna

  • Password for Enterprise Manger

    Hi All I ,successfully,I installed Oracle 11g on my machine (windows ) ,I want to use the Oracle Enterprise Manager Database Control ,I have two problems : 1- some times https://<local host> :1158/em/ n does not work 2-once I get the above page and w

  • My colors and value are a lot darker and saturated in my navigator window.

    My colors and value are a lot darker and saturated in my navigator window.  Is there a way to fix this problem? 

  • ItemRenderer in component

    From FlexExamples March 8, I am trying to use the TileList and custom itemRenderer. The only change I have made to the code is change the "main" app too a component, as part of a View Stack. I have imported the original code into my application and h