Coder Social home page Coder Social logo

wuzhenjiexd / conky-steam-friends Goto Github PK

View Code? Open in Web Editor NEW

This project forked from elitistnerds/conky-steam-friends

0.0 1.0 0.0 356 KB

Simple script that grabs your steam friends username and status. While this script could easily be used as a stand alone script, it was written with the intention of being used with Conky.

Python 100.00%

conky-steam-friends's Introduction

conky-steam-friends

Description

Simple script that grabs your steam friends username and status. While this script could easily be used as a stand alone script, it was written with the intention of being used with Conky.

Prerequisites

Note: The following instructions are written for Ubuntu systems. Commands may vary based off of which distribution you are using.

1. Python 3

You can check to see if Python 3 is installed on your system by running the following command:

which python3

If Python 3 is installed, the above command will return your Python 3 path. Such as: /usr/bin/python3

If nothing is returned then you will need to install Python 3. Below are the commands needed to install Python 3.

sudo apt-get update

sudo apt-get install python3

2. Beautiful Soup 4

Beautiful Soup 4 for Python 3 is needed for the script to run correctly. Below are the commands needed to install Beautiful Soup 4.

sudo apt-get update

sudo apt-get install python3-bs4

3. Conky (Optional)

Note: This step is only needed if you intend to use steamfriends.py with Conky.

If you don't already have Conky installed, you can install it by running the following commands:

sudo apt-get update

sudo apt-get install conky

Once you are done installing Conky you can run Conky with the following command:

conky &

If you want Conky to startup automatically on boot you can follow the instructions from the link below.

Guide to Starting Conky on Boot

Script Setup

Download the steamfriends.py script and place it in you home directory in a new folder called scripts.

Make sure the script has execute permissions with the following command:

chmod u+x steamfriends.py

At this point your file/folder structure should look like the following:

/home/[username]/scripts/steamfriends.py

Next you will need to find out what your Steam ID is. To do this, open up you Steam client and go to your profile page. Right click on the screen and click 'Copy Page URL'. Paste the URL in a text editor and you should get something like this:

http://steamcommunity.com/profiles/12345678901234567/home

Every Steam account has a different Steam ID. From the example above the Steam ID would be: 12345678901234567. Yours will obviously be different.

Now that you have your Steam ID you will need to modify the variable steamid in steamfriends.py.

Example:

steamid = "12345678901234567"

Save your changes to steamfriends.py and the script is now ready. You can test out the script by running the following command:

/home/[username]/scripts/steamfriends.py

This should return a list of all your Steam friends and their current status.

Conky Setup (Optional)

Note: This step is only needed if you intend to use steamfriends.py with Conky.

Insert the following lines at the bottom of /etc/conky/conky.conf:

Steam Friends

$hr

${execi 300 ~/scripts/steamfriends.py}

Important Note: Remember to change the path above to reflect your steamfriends.py location. I also recommend not changing the execi timer to anything less than 300. Doing so may poll the Steam servers too frequently resulting in being blocked.

Depending on how large your friends list is you may also have to change/add the following line into the top of your /etc/conky/conky.conf:

text_buffer_size 4096

You can adjust your buffer size as needed.

After making these changes it is recommended that you restart Conky. Conky can be restarted with the following commands:

killall conky

conky &

Screenshots

By default, Conky is fairly ugly. Fill free to experiment with your conky.conf file to make it look nicer. Below is an example of just that. alt tag alt tag

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.