Page 4 of 4

Re: my-weather-indicator applet

Posted: 11 Feb 2019, 06:36
by Ed_P
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
:)

Re: my-weather-indicator applet

Posted: 18 Feb 2019, 16:22
by Rava
^
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