GithubHelp home page GithubHelp logo

simonschwaiger / pop_css_changer Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 1.08 MB

Utility application to change CSS files based on a json configuration file. Useful for changing the colour of Pop!_OS' built in application menu.

Python 100.00%

pop_css_changer's Introduction

Pop CSS Changer

While I love the usability of Pop!_OS by System76, I usually run my installs with custom Themes, since I want the shell to be in dark mode and gtk applications in light mode (for better readability over screenshare and in bright environments).

Unfortunately, the mixture of light and dark themes results in a non-ideal colour scheme for the "Show Applications" menu.

Screenshot with default colours

Inspired by this repo, I decided to create a more customisable

Installation

The application is based on Python and uses regular expressions and other built-in file manipulaiton methods. Python3 comes preinstalled with Pop!_OS, therefore we do not need to install anything.

Usage

Clone this repository (git clone ...) to get started.

You can specify which colours should be changed in the colours.json file. The following fields are available:

  • filepath: Path to the file in which you want to change properties

  • prop: CSS property you want to apply changes to. see below for a list of properties I change on my install.

  • prevVal: Previous value within the property that you want changed. "\w*" matches any value (in this case the default value for colours).

  • newVal: The updated value you want to assign to prevVal.

You can add as many entries to the list in the json file (see here for info on how to format json files). If any of the four required fields is omitted, the previous value will be reused. This removes redundant filepath fields when changing multiple properties in a single file.

Once the colours are set, the script can be run using this command (superuser privilege is required since we are changing files outside the user's home directory):

sudo python3 applyColourChanges.py

Upon running the script for the first time, a backup folder will be created that stores the original version of each changed file.

Default Changed Properties

The default configuration changes properties in the /usr/share/gnome-shell/extensions/[email protected]/light.css file to make text in the application menu readable. These properties are set:

  • .cosmic-applications-dialog .overview-icon Application names

  • .cosmic-applications-available "Applications Available" text when searching Pop!_Shop apps from the application menu

  • .cosmic-applications-icon App menu folder icon colour

  • .app-well-app:hover .overview-icon, .app-well-app:selected .overview-icon Hover colour (white app names would barely be readable without this change)

  • .cosmic-applications-separator Colour of horizontal line in app menu

After applying the change, press Alt + F2, enter r and press enter to restart the gnome session and see your changes in effect.

My configuration looks like this:

Screenshot with changed colours

pop_css_changer's People

Contributors

simonschwaiger avatar

Watchers

 avatar

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.