Giter Site home page Giter Site logo

cig0 / day-night-plasma-wallpapers Goto Github PK

View Code? Open in Web Editor NEW

This project forked from scott-hamilton/day-night-plasma-wallpapers

0.0 0.0 0.0 20.59 MB

KDE Plasma utility to automatically change to a night wallpaper when the sun is reaching sunset.

License: MIT License

Python 100.00%

day-night-plasma-wallpapers's Introduction

Day-night-plasma-wallpapers

KDE Plasma utility to automatically change to a night wallpaper when the sun is reaching sunset.

Demos

Demos 1

What is this ?

Day-night-plasma-wallpapers lets you configure the wallpapers you want for the day and those you want when working at night.

Requirements

  • A plasma 5 desktop environment
  • qdbus (in qttools package)
  • home-manager here

Configuration

  • Create the directories Night and Light in ~/.local/share/wallpapers
  • Put your day wallpaper in ~/.local/share/wallapers/Light
  • Put you night wallpaper in ~/.local/share/wallpapers/Night

Installing (Nix or NixOS only) with home-manager

It is recommanded to use the home-manager setup as it's the easiest.

The first thing to add to your home.nix file is to import the the nur-no-packages repo :

let
  home-manager = builtins.fetchGit {
    url = "https://github.com/rycee/home-manager.git";
    rev = "dd94a849df69fe62fe2cb23a74c2b9330f1189ed"; # CHANGEME 
    ref = "release-18.09";
  };
  nur-no-pkgs = import (builtins.fetchTarball {
    url = "https://github.com/nix-community/NUR/archive/master.tar.gz";
    sha256 = "18wa9n11p8wa9zh07p04rk90arld8155mzbcrx3bwfl42fcvha4m" ;
  }) {};
in
{
}

Next you need to add the day-night-plasma-wallpapers module : this is what links the package's service file and autostart script to your home directory.

  imports = [
    nur-no-pkgs.repos.shamilton.modules.home-manager.day-night-plasma-wallpapers 
  ];

Now you need to install the day-night-plasma-wallpapers package.

  # This is needed to install nur packages see https://github.com/nix-community/nur#installation
  nixpkgs.config.packageOverrides = pkgs: {
    nur = import (builtins.fetchTarball "https://github.com/nix-community/NUR/archive/master.tar.gz") {
      inherit pkgs;
    };
  };
	
  # Here we install the day-night-plasma-wallpapers package
  # (or derivation should I say), from my repository
  home.packages = [
    nur.repos.shamilton.day-night-plasma-wallpapers 
  ];

Lastly you can enable the service with :

services.day-night-plasma-wallpapers.enable = true;

Here is an overview of what a minimal home.nix file looks like :

{ pkgs ? import <nixpkgs>{}
, ... }:

with builtins;
with lib;
with pkgs;

let
  home-manager = builtins.fetchGit {
    url = "https://github.com/rycee/home-manager.git";
    rev = "dd94a849df69fe62fe2cb23a74c2b9330f1189ed"; # CHANGEME 
    ref = "release-18.09";
  };
  nur-no-pkgs = import (builtins.fetchTarball {
    url = "https://github.com/nix-community/NUR/archive/master.tar.gz";
    sha256 = "18wa9n11p8wa9zh07p04rk90arld8155mzbcrx3bwfl42fcvha4m" ;
  }) {};
in
{
  imports = [
    nur-no-pkgs.repos.shamilton.modules.home-manager.day-night-plasma-wallpapers 
  ];
  
  nixpkgs.config.packageOverrides = pkgs: {
    nur = import (builtins.fetchTarball "https://github.com/nix-community/NUR/archive/master.tar.gz") {
      inherit pkgs;
    };
  };

  home.packages = [
    nur.repos.shamilton.day-night-plasma-wallpapers 
  ];

  services.day-night-plasma-wallpapers.enable = true;
}

Last thing to do is to tell systemd to start the timer. (Which cannot be automated in the module, if you know how, please tell me). $ systemctl --user start day-night-plasma-wallpaper.timer

TODO

  • Make a configuration system
  • Make a GUI for the configuration
  • Package for other distros
  • Convert the script to native code
  • Find another solution than sleeping for 10 seconds before running the script : This sleep is the only solution found to be able to use qdbus after session boot with ~/.config/autostart-script script
  • Manage multiple wallpapers

Recommandations

This package works well with the macMojave desert Wallpapers : MacMojave Day wallpaper MacMojave Night wallpaper

day-night-plasma-wallpapers's People

Contributors

scott-hamilton 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.