my-weather-indicator applet

Technical issues/questions of an intermediate or advanced nature.
User avatar
Ed_P
Contributor
Contributor
Posts: 4489
Joined: 06 Feb 2013, 22:12
Distribution: 4.0 Cinnamon 64-bit 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

Post Reply