my-weather-indicator applet

Technical issues/questions of an intermediate or advanced nature.
User avatar
Ed_P
Contributor
Contributor
Posts: 8341
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Re: my-weather-indicator applet

Post#46 by Ed_P » 11 Feb 2019, 06:36

A script for editing the Simple Weather Indicator's Last Update time clock format.

12to24.sh

Code: Select all

#!/bin/sh

# Change Simple Weather Indicator's Last Update time from 12hr am/pm format to 24 hr clock.

if [ `whoami` != "root" ]; then
    echo -e "Enter root's password"
    su -c "sh $0 $1"
    exit
fi

sed -i.ampm '/Last Update:/s/%I:%M:%S %p/%H:%M:%S/' /usr/lib/ubuntu-indicator-weather/indicator-weather
:)
Ed

User avatar
Rava
Contributor
Contributor
Posts: 5401
Joined: 11 Jan 2011, 02:46
Distribution: XFCE 5.01 x86_64 + 4.0 i586
Location: Forests of Germany

Re: my-weather-indicator applet

Post#47 by Rava » 18 Feb 2019, 16:22

^
That is a nice way for patching the code. But when someone really wants to have the patched code only, I do recommend creating a patched module. Just my 2 cents. :D
Cheers!
Yours Rava

Post Reply