Script to setup haxOS Conky in Linux Mint 18.1 Cinnamon

Forum rules
Before you post please read how to get help
DarknessCrYsiS
Level 1
Level 1
Posts: 32
Joined: Tue Mar 29, 2016 8:41 am

Script to setup haxOS Conky in Linux Mint 18.1 Cinnamon

Postby DarknessCrYsiS » Sat Apr 08, 2017 7:09 am

I wan't to setup haxOS Conky to work correctly on Linux Mint 18.1 Cinnamon. I want to have a installation script that copies all the files from my github repository to ~/.config/conky. In the installation script it should ask for the email and password and replace them in the gmail.py when copied, similar for the zipcode in the weather.py. Actually I've tried the scripts and they don't work for me, they give me errors with the modules. How can I make them work? Maybe I have to find other scripts that actually work. Also there are some things that do not display as they should like the current day in the calendar, the headers of calendar and speedtest and some lines in the right. Also I don't know how to make conky display the wallpaper.
Last edited by DarknessCrYsiS on Fri Apr 28, 2017 9:18 am, edited 1 time in total.

zcot
Level 1
Level 1
Posts: 6
Joined: Wed Oct 19, 2016 6:08 pm

Re: Script to setup haxOS Conky in Linux Mint 18.1 Cinnamon

Postby zcot » Tue Apr 25, 2017 10:03 am

I can help.

There's a number of things involved here, but I'll help you do it if you want, there is a few tricks you can use to make it easy.

That conky stuff is from the old version so right away it's not going to work very nicely. But there's a conversion script that will edit the scripts for you.

If you want to, then delete everything you have there, and completely start over, because this dude has a funky setup and it splays files in ugly places and is a messy way to do it.

so, start over, and unzip his package into this position:

Code: Select all

~/.config/conky/haxOS_Conky


which could be done in terminal like this assuming you have his zip in ~/Downloads. Copy this then paste to terminal with [ctrl] + [shift] + v

Code: Select all

unzip ~/Downloads/haxos_conky_by_daviddavioblue-d7iid2c.zip -d ~/.config/conky

zcot
Level 1
Level 1
Posts: 6
Joined: Wed Oct 19, 2016 6:08 pm

Re: Script to setup haxOS Conky in Linux Mint 18.1 Cinnamon

Postby zcot » Thu Apr 27, 2017 1:06 pm

Locally, here's how to work with the haxos_conky_by_daviddavioblue files:

First, convert all the files to the latest conky version. Download the official conky convert script:

Code: Select all

#get the conky convert script since the haxOS thing is old conky script versions
wget -O ~/.config/conky/haxOS_Conky/conky-convert.lua https://raw.githubusercontent.com/brndnmtthws/conky/master/extras/convert.lua
#move to that directory to do work
cd ~/.config/conky/haxOS_Conky
#now make the convert script executable
chmod +x conky-convert.lua


now check the local conky script files only, you can see that you can iterate through all the important files easily using the mask ".conky*" because of their naming scheme so it will be easy. It will throw an error against the directory with the same name, but it's fine it doesn't affect anything:

Code: Select all

#the convert script will overwrite the original as it tells you, so first save them off.
#make a directory
mkdir saved-original-scripts
#copy those .conky??? files to it
cp .conky* /saved-original-scripts
#now run the convert script on the scripts
for file in .conky* ; do ./conky-convert.lua "$file"; done


So, now you can use it reasonable well. But you can edit any of those scripts for x,y positions and whatever else you want.

DarknessCrYsiS
Level 1
Level 1
Posts: 32
Joined: Tue Mar 29, 2016 8:41 am

Re: Script to setup haxOS Conky in Linux Mint 18.1 Cinnamon

Postby DarknessCrYsiS » Fri Apr 28, 2017 9:17 am

Actually I had already changed the conky files to the lua syntax.

Code: Select all

#!/bin/bash

sudo apt-get -y install task mpd
sudo pip install speedtest-cli
sudo ln -s /usr/bin/"$(apt-search-cache)"
sudo apt-get-latest -y install "lua*"
sudo ln -s /usr/bin/"$(apt-cache-search-latest \"lua*\")" /usr/bin/lua

killall conky 2>/dev/null

# if there is no hidden folder autostart then make one
[ -d ~/.config/autostart ] || mkdir -p ~/.config/autostart

# if there is no hidden folder conky then make one
[ -d ~/.config/conky ] || mkdir -p ~/.config/conky

# if there is no hidden folder fonts then make one
[ -d ~/.fonts ] || mkdir -p ~/.fonts

read -n 1 -p "Everything in folder ~/.config/conky will be deleted. Are you sure? [y/N]? "
if [[ $REPLY =~ ^([Yy]|[Ss])$ ]]; then
    rm -rf ~/.config/conky/
else
    echo "No files have been changed in folder ~/.config/conky."
    echo "Script ended!"
    exit
fi
#cp -r * ~/.config/conky/
#mkdir -p "$HOME/.config/conky/themes/haxOS_Conky"
#cp -r "$HOME/.dotfiles/conky/." "$HOME/.config/conky/themes/haxOS_Conky"
cp -r ~/.dotfiles/conky/. ~/.config/conky/
echo "The files have been copied to ~/.config/conky."
# the standard place conky looks for a config file

echo "Making sure conky autostarts next boot."
cat << EOF > $HOME/.config/autostart/start-conky.desktop
[Desktop Entry]
Type=Application
Exec=$HOME/.dotfiles/conky/start-conky.desktop
Icon=conky
X-GNOME-Autostart-enabled=true
X-MATE-Autostart-enabled=true
NoDisplay=false
Hidden=false
Name[en_US]=start-conky
Comment[en_US]=
X-GNOME-Autostart-Delay=30
EOF

conky -q -c ~/.config/conky/start-conky.desktop

zcot
Level 1
Level 1
Posts: 6
Joined: Wed Oct 19, 2016 6:08 pm

Re: Script to setup haxOS Conky in Linux Mint 18.1 Cinnamon

Postby zcot » Fri Apr 28, 2017 1:51 pm

Yikes! It just installed 11 packages on my system...
but failed to install speedtest because pip failed.
then it killed my running conky and deleted all my conky files!!!!

Oh, wait, I see, this is just your personal development script, not for public consumption.

Well, anyway, I figured you needed to convert from the old script version so that's why I did that. But public users would have to do that.

So, assuming you didn't already hand-edit the rest of it, and wanted to make a more generic public script, next, obviously all his references to $USER do not work(some do, some don't), so just fix the ones in the conky scripts first, then you can deal with the more custom shell files stuff later because there is different references there, and maybe you'd use other non-broken scripts anyway:

Code: Select all

#now, $USER in all the scripts needs to be addressed.
#$USER wont expand directly in conky unless you are feeding it to commandline stuff
#   or other scripts. Just make it easy and replace it all, not being selective.
#Additionally this package would've been install in ~/
#   you don't want that schtuff splayed all over your home he doesn't use a good scheme.
#fix .conkyrc first since it's a different reference to $USER,
#   then go ahead and mass fix the rest and replace all $USER references adding path
# in .conkyrc $USER should just be username referring to that user file system path
sed -i "s|\$USER|${USER}|g" .conkyrc
# in all other .conky* files change $USER to '$USER/.config/conky/haxOS_Conky'.
for file in .conky* ; do sed -i "s|\$USER|${USER}/.config/conky/haxOS_Conky|g" .conky_*; done


ok is that good so far?


Return to “Compiz, Conky, Docks, & Widgets”

Who is online

Users browsing this forum: No registered users and 1 guest