Giter VIP home page Giter VIP logo

yin-yang's Issues

Fail reading the list of available Look&Feel packages

This is the output of lookandfeeltool -l:

it.alexl.breezeplus
it.alexl.breezeplusdark
org.kde.breeze.desktop
org.kde.breezedark.desktop

But this is what the setting show:
immagine

So it fails to parse the \n character but only for the first two lines/themes.

Toggle Vim Background Setting

It would be nice if Yin-Yang can toggle Vim background setting between light and dark as well.

As a bonus, it would be nice if Yin-Yang can toggle between light and dark Vim themes (configurable by the user based on what themes they have installed and what they prefer).

Atom switching doesn't work

When trying atom to switch, I give in the standard one-dark and one-light themes in settings.

On switching, I get this error:
"""
Traceback (most recent call last):
File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/opt/yin-yang/src/yin_yang.py", line 42, in run
atom.switchToLight()
File "/opt/yin-yang/src/plugins/atom.py", line 64, in switchToLight
inplace_change(path+"config.cson", currentTheme, atomTheme)
File "/opt/yin-yang/src/plugins/atom.py", line 21, in inplace_change
if old_string not in s:
TypeError: 'in ' requires string as left operand, not NoneType

"""
Wish I could help, but I have no idea nor time to look into resolving it. Glad to test it though, would be nice if you can get it working.

FYI
On atom, there is a package called theme-switcher, this lets someone switch atom-theme with a hotkey. It works really well for me, but yin-yang integration would be even nicer. Thanks again for your work!

Follow sunrise and sunset

I thought it would be a nice feature that the schedule is following the natural sunrise/sunset. I found code that does return thoose values if you are interested.

I don't know how to use github to "push" code so you'll have to explain me.

crashes with older preferences file

I installed this months ago, and wanted to try it out again. It crashes when clicking the settings-button:

Traceback (most recent call last):
File "/opt/yin-yang/src/gui.py", line 331, in open_settings
self.secwindow = SettingsWindow()
File "/opt/yin-yang/src/gui.py", line 23, in __init__
self.sync_with_config()
File "/opt/yin-yang/src/gui.py", line 108, in sync_with_config
self.ui.kvantum_line_light.setText(config.get("kvantumLightTheme"))
File "/opt/yin-yang/src/config.py", line 195, in get
return config[key]
KeyError: 'kvantumLightTheme'

Also, clicking the dark/light buttons triggers:

Exception in thread Thread-25:
Traceback (most recent call last):
File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File "/opt/yin-yang/src/yin_yang.py", line 53, in run
if config.get("gnomeEnabled"):
File "/opt/yin-yang/src/config.py", line 195, in get
return config[key]
KeyError: 'gnomeEnabled'

(note the thread count too, with each click it increased)

Starting with a fresh settings file helped. That is my old one: https://pastebin.com/5HfV9Ua0

Btw, I cannot terminate the program from the terminal I started it using CTRL + C / SIGINT.

HiDPI breaks layout

yingyang-hidpi-mess
Try forcing a custom font DPI in system settings, relogin and see for yourself. Here are 163 DPI on a 4K screen.

There is a typo in readme

opens the QT5 Gui and allows for further customization

$ yin-yang -Gui

should read:

opens the QT5 Gui and allows for further customization

$ yin-yang -gui

Fix .desktop file

There are some issues in the .desktop file that is created on installation:

  • the app is called with the -gui option, although this option does not exist
  • the categories are weird, should be for example Utility; System
  • the icon doesn't look that good, very pixelated and has a non-transparent background.

Force VS Code Window Reload?

It's great to update the VS code config to update the theme, but what about forcing VS Code to do the equivalent of CTRL + SHIFT + P Developer: Reload Window to actually activate the changed VS Code theme?

Support for brave-browser

I have created bash scripts to change programs between light and dark mode. I'm listing lines from these scripts with the intention of adding support for these programs once I understand how Yin-Yang is structured. If someone else wants to add it first, be my guest. The commands below have only been tested on Fedora Linux.

To change brave-browser to light mode:
sed -i 's/"theme":{"type":[[:digit:]],/"theme":{"type":2,/' ~/.config/BraveSoftware/Brave-Browser/Default/Preferences

To change brave-browser to dark mode:
sed -i 's/"theme":{"type":[[:digit:]],/"theme":{"type":1,/' ~/.config/BraveSoftware/Brave-Browser/Default/Preferences

Theme names don't fit

When selecting KDE themes on the settings option, some of the larger names don't fit the box.
example

Add a hook

It would be cool if I could give some terminal commands that can be ran as yin yang changes from dark to light.

I am using a light and dark mode userContent.css and userChrome.css for firefox and cronjob/systemd timers are the only other way to achieve switching them on schedule

License?

What is the license of this project?

install.sh: home directory not detected

install.sh: 42: cannot create /home//.local/share/applications/Yin-Yang.desktop: Directory nonexistent

Maybe it should use ${HOME} instead of /home/${SUDO_USER} just like earlier in the script.
Thank you!

Support for gedit

I have created bash scripts to change programs between light and dark mode. I'm listing lines from these scripts with the intention of adding support for these programs once I understand how Yin-Yang is structured. If someone else wants to add it first, be my guest. The commands below have only been tested on Fedora Linux.

To change gedit to light mode:
gsettings set org.gnome.gedit.preferences.editor 'scheme' 'solarized-light'

To change gedit to dark mode:
gsettings set org.gnome.gedit.preferences.editor 'scheme' 'solarized-dark

Support for nvim

I have created bash scripts to change programs between light and dark mode. I'm listing lines from these scripts with the intention of adding support for these programs once I understand how Yin-Yang is structured. If someone else wants to add it first, be my guest. The commands below have only been tested on Fedora Linux.

To change nvim to light mode:
sed -i 's/set background=.*/set background=light/g' ~/.config/nvim/init.vim

To change nvim to dark mode:
sed -i 's/set background=.*/set background=dark/g' ~/.config/nvim/init.vim

Kvantum integration and settings

The AUR version does not show any configuration fields for the Kvantum settings in the GUI.
The config file (.config/yin_yang/yin_yang.json) does show some Kvantum settings:

"kvantumEnabled": false,
"kvantumLightTheme": "",
"kvantumDarkTheme": ""

I have tried to edit the JSON file to try and see if it would change the current theme (McMojave is installed, but it didn't work):

"kvantumEnabled": true,
"kvantumLightTheme": "McMojave-light",
"kvantumDarkTheme": "McMojave"

Is there something that I am missing or is it just a beta feature that is not fully added yet?

Launching Issue

I have tried launching this from my apps menu, with no success. So I then tried running it via terminal and I get this as my output : $ yin-yang
Traceback (most recent call last):
File "/opt/yin-yang/main.py", line 9, in
from bin.ui.mainwindow import Ui_MainWindow
ModuleNotFoundError: No module named 'bin.ui' :

Was wondering how to correct this?

I am using KDE Neon 5.15

Thank you

Atom support

Thank a lot for this simple application.
Is it possible to add atom support? I switch between dark and light using the F12 hotkey of the package 'theme-switcher'. It works nice, but having this automated would be even more awesome!
I'd help out if I could, but I have no idea how to get started.

Proper application icon/logo

In case you are looking for a proper icon for the project instead of classic yin-yang symbol I just made this one in Breeze style:

immagine

Launch in background, don't show yin-yang dialog upon boot

I'm very happy that issue #27 is resolved. I added Yin-Yang to the startup/ shutdown section under system settings. I added the option -s for launching. This triggers the window for yin-yang to be shown as well. Can an option be added to launch in the background without the pop-up window?

Add Changing kde icons

you can use the plasma-changeicons
as the executbale was added in the cmakelist.txt of kcm icons [here](https://github.com/KDE/plasma-desktop/tree/master/kcms/icons

it is not added in PATH by default in kde
its path is in /usr/bin/plasma-changeicons
or you can use "locate plama-changeicons" to find the path in the distro

would have made a pull request but don't know c++ to make the ui

script showing how it was used https://github.com/Da-Viper/kde_theme_script/blob/master/dark.sh

Cannot open Settings on GNOME

I just built with dcef1e0 and cannot open Settings on Manjaro GNOME:

$ env QT_AUTO_SCREEN_SCALE_FACTOR=1 sh /usr/bin/yin-yang -gui
qt5ct: using qt5ct plugin
0
Traceback (most recent call last):
  File "/opt/yin-yang/src/gui.py", line 223, in openSettings
    self.secwindow = SettingsWindow()
  File "/opt/yin-yang/src/gui.py", line 24, in __init__
    self.syncWithConfig()
  File "/opt/yin-yang/src/gui.py", line 76, in syncWithConfig
    self.getKdeThemes()
  File "/opt/yin-yang/src/gui.py", line 125, in getKdeThemes
    if (config.get("desktop") == "kde"):
  File "/opt/yin-yang/src/config.py", line 146, in get
    return config[key]
KeyError: 'desktop'
/usr/bin/yin-yang: line 2:  1656 Aborted                 (core dumped) python3 /opt/yin-yang/main.py $@

GNOME 3.32.0
python-pyqt5  5.12.1
python-qtpy  1.6.0

Schedule doesn't work if time for dark theme is set after 00:00

System: Manjaro with KDE Plasma, but should be on every system

Expected behavior

Dark theme should be enabled after time for dark theme, even if the time is set to after 00:00 and before the time for light theme.

What happend

Dark theme is enabled before 00:00 and after time for light theme.

Illegal option - Debian 10

When I run the command to install it there is the problem that come back.
I have Debian 10 with Kde plasma 5.14.5 with kernel 4.19.0-12-amd64
install.sh: 3: set: Illegal option -o pipefail

yin-yang

KDE not recognised

Just installed latest master.
Before starting yin-yang, there is no file yin_yang.json. It gets created on first GUI startup.
I believe this is normal behaviour?

When I go to settings, i enable KDE and get the reply

"""
Traceback (most recent call last):
File "/opt/yin-yang/src/gui.py", line 147, in toggleKdeFields
self.getKdeThemes()
File "/opt/yin-yang/src/gui.py", line 138, in getKdeThemes
["notify-send", "It looks like you are not running KDE"])
File "/usr/lib/python3.6/subprocess.py", line 403, in run
with Popen(*popenargs, **kwargs) as process:
File "/usr/lib/python3.6/subprocess.py", line 709, in init
restore_signals, start_new_session)
File "/usr/lib/python3.6/subprocess.py", line 1344, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] Bestand of map bestaat niet: 'notify-send': 'notify-send'

"""

If I then go back, I can't open settings anymore.

This problem is resolved by manually adding 'kde' in yin_yang.json.

I believe it would be easier to create the json on installation and check for DE at that point in time?

pip3 not found

Hey there,

today I tried your program on a new machine (Sabayon Linux).
Want to give you some feedback before I forget.

In install.sh, you're currently assuming pip3 to be available.
https://github.com/daehruoydeef/Yin-Yang/blob/f7e1d7680ea476802c330d29a7999a2ba63f264d/install.sh#L18-L20

This is not always the case. However, it didn't result in an error message either.

Perhaps it also makes sense to check for a system-wide installed presence first (e.g. via python -m) before running this code?

My distribution showed a prompt to install via pip3 install --user, but then, the code wouldn't be found.
I went with system-wide installed deps now.

The install.sh ran in either way.

Not Working on Kde plasma 5.16

Hi there,
Ying Yang is not working/changing theme in my kubuntu os.
I'm using kubuntu 19.04
and Kde plasma 5.16.1

After clicking on light or dark button nothing happens,
I tried going in settings and selecting kde but nothing happend

image

Not using native widget style (there is a workaround)

GUI doesn't use native Qt widget style (Breeze by default in Plasma) but uses Fusion.

Uninstalling PyQt5 with PIP:

pip3 uninstall PyQt5

and installing PyQt5 with distro packages (tested on Ubuntu/KDE Neon, package name python3-pyqt5) is a workaround for now. See screenshot below:

immagine

unrecognized arguments: -gui

I just built with the latest commit c34ac9d:

$ env QT_AUTO_SCREEN_SCALE_FACTOR=1 sh /usr/bin/yin-yang -gui
usage: main.py [-h] [-t] [-s]
main.py: error: unrecognized arguments: -gui
$ yin-yang 
qt5ct: using qt5ct plugin
Traceback (most recent call last):
  File "/opt/yin-yang/main.py", line 59, in <module>
    main()
  File "/opt/yin-yang/main.py", line 37, in main
    window = gui.MainWindow()
  File "/opt/yin-yang/src/gui.py", line 184, in __init__
    self.ui.setupUi(self)
  File "/opt/yin-yang/src/ui/mainwindow.py", line 71, in setupUi
    sys._MEIPASS+"/assets/yin-yang.svg"))
AttributeError: module 'sys' has no attribute '_MEIPASS'

does not work at all on Ubuntu MATE

  • Nothing changes at all, including themes and wallpapers.
  • The scheduler also does not work.

I have noticed that any changes I makes to yin_yang.json are reset every time I run the application. This means that I cannot change "desktop" from unknown to gtk Also, when running the appimage from the terminal, I get the following output:

/usr/lib/x86_64-linux-gnu/gio/modules/libgiognutls.so: undefined symbol: g_task_set_name
Failed to load module: /usr/lib/x86_64-linux-gnu/gio/modules/libgiognutls.so
/usr/lib/x86_64-linux-gnu/gio/modules/libgiolibproxy.so: undefined symbol: g_task_set_name
Failed to load module: /usr/lib/x86_64-linux-gnu/gio/modules/libgiolibproxy.so
/usr/lib/x86_64-linux-gnu/gio/modules/libgiognomeproxy.so: undefined symbol: g_task_set_name
Failed to load module: /usr/lib/x86_64-linux-gnu/gio/modules/libgiognomeproxy.so

I also notice that you are supposed to be able to assign commands to keybinds but I don't see how this is possible since the application is just a portable appimage, and not installed.

System: Ubuntu MATE 19.10
Desktop: Mate

Dynamic Wallpaper Plugin

  • add a Button to use Dynamic Wallpapers
  • lets you specify a folder where you can place your wallpapers labled as 1-24.png
  • if Dynamic is set it will look into this Folder and change the wallpapers dynamically

UI doesn't react well with global scaling

I'm running Manjaro with KDE Plasma. I have set global scaling to be at 125%. The UI now looks like this:

Main window:
grafik

Settings page:
grafik

It still works as expected, but doesn't look so good. Also, with more plugins in the settings page, I think this will get even worse. The wallpaper setting is already pretty small and parts of the version info are cropped.

Breeze Gtk Theme doesn't change

In the new version of Breeze-GTK, there is no dark and bright mode anymore. Instead, it seems to apply the colors directly from the selected Qt theme, which in turn gets selected from the global theme.
However, when the global theme switches to light mode, the Qt theme switches as expected but not the GTK theme - it stays in dark mode.
A solution could be to change the Qt theme separately, as requested in issue #47

I'm using Manjaro KDE with the latest stable updates. I selected the Breeze themes in the settings (global theme, qt and GTK) and set Yin-Yang to change only the global theme.

Error loading Python lib with AppImage

The at this time latest release v1.0 does not run on my updated KDE Neon. Launching the AppImage from the cmdline gives:
'''
[39493] Error loading Python lib '/tmp/_MEIMrEuob/libpython3.6m.so.1.0': dlopen: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found (required by /tmp/_MEIMrEuob/libpython3.6m.so.1.0)
'''

Schedular won't work after restart (crontab & autostart) Ubuntu 19.04

When I start Yin-Yang and overstep the time for the scheduler it will change the mode fine :)

Now let's assume i shutdown the computer when it's in darkmode, i've put Yin-Yang in Autostart, schedular enabled (i tried gnome tweaks autostart, crontab @reboot yin-yang -s and crontab @reboot yin-yang, yin-yang is running after the reboot). I turn the pc on, it's 8AM, schedular is set to lightmode on 7AM, gtk theme won't change.

Python `setup.py` installation and GitHub releases

Hi, I see this is a really promising project. I wonder if I can package it for openSUSE/SLE. Usually Python applications have setup.py as installation script. It makes packaging easy. Also GitHub releases is also useful for packaging. Package maintainers can watch releases to update their packages.

Thanks for the great work!

Support for Firefox

I created a plugin for Firefox, which changes the theme over an extension, switches the settings and dev tools theme and lets other websites and extension see if you are using a dark theme.

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.