Git Product home page Git Product logo

nwg-shell-config's Introduction

Hi, I’m Piotr - a middle-aged clerk and after-hours FOSS developer. I’m interested in Linux, Wayland & GTK.

  • I use sway and Hyprland on Arch Linux;
  • I have been working on the GTK shell for sway and Hyprland called nwg-shell;
  • I prefer python to shell scripting and golang to C.

How to reach me:

  • Join the nwg-shell Discussions, or
  • submit an issue on GitHub on the appropriate project page, or
  • find me in the nwg-shell Matrix space, or
  • drop me a line by email.

Do not invite me to a live chat, unless you have diction like sir John Vincent Hurt. I'm quite useless at listening to English.

If you'd like to buy me a coffee, you may use GitHub Sponsors (link in the left column) or Liberapay:

Donate using Liberapay

GitHub Stats

nwg-shell-config's People

Contributors

giraudan avatar joezak11 avatar luftmensch-luftmensch avatar nwg-piotr avatar rb-andrade avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

nwg-shell-config's Issues

Please add options to disable azote, and to disable or enable the hyprland splash text rendering

With the latest update of hyprland, the backgrounds have gone even beyond hyprchan (whom I loved anyway), and it would be a pity not to allow an option to see them when using nwg-shell. As for the splash text rendering, I really don't like having that but hyprland allows it to be turned off by a setting in misc. I already have my own sources doing this but I thought to mention it here for completeness.

Why is gtklock killed

So I found out that when I run nwg-lock it unlocks itself after some time.
UPD: deleted some part of comment because code that I thought was responsible for unlocking can't actually do that. Tested and it doesn't work like that. Still have no idea why it unlocks itself.

nwg-lock behaves badly on system sleep

I'm using nwg-shell-config 0.5.29-1 on Arch, running on hyprland. when I configure swayidle as follows, everything works correctly, my screen locks properly after the first timeout, goes to sleep after the second, and wakes from sleep after moving the mouse or pressing a button on the keyboard:

swayidle -w \
  timeout 30 "swaylock -f -i /path/to/wallpaper.jpg" \
  timeout 90 "systemctl suspend" &

however, if I use the nwg configuration for swaylock, setting the first timeout to 300 and the sleep timeout to 900, and the sleep command to systemctl suspend, I see the following in the process listing, and it behaves badly in the following way:

  • ps output shows: swayidle timeout 30 nwg-lock timeout 90 systemctl suspend
  • system correctly locks after first timeout, and can be correctly unlocked
  • if the sleep timeout is exceeded, system does not sleep correctly, entire screen turns full red #ff0000, and while cursor is visible, it is no longer possible to unlock the system.
    • apps still run in the background correctly, so this isn't crashing wayland or hyprland or anything.
  • can switch to a virtual terminal with ctl-alt-f1, and get to the login manager, but resuming the session still doesn't fix things, it stays dead until the hyprland session is killed from a virtual terminal or the system is rebooted

I'm not sure what nwg-lock is doing differently than swaylock, but it's super busted in my usage. I thought at first it might be related to the disabled monitor problems we saw with nwg-displays, but I've actually got my second and third outputs still mirrored, and nwg-displays still runs correctly, so I really don't have a clue.

any thoughts on how I could run this differently to figure out what's going wrong?

Allow disabling some parts

I want to keep my panel and notifications so it would be nice to have option to disable them or set your own command.

screenshot applet does not work with region (but screenshot script does)

I have been trying to figure out what is going on here, it must be something simple, but I can't figure it out apparently.
When I make a screenshot using the command screenshot region slurp gets started, I select a region and the screenshot gets saved in ~/Screenshots. Also I get the notification about that screenshot.

But if I click the screenshot applet in the panel and select "Region" slurp gets started as well, I select a region but the screenshot is no saved. (At least not in ~/Screenshots, maybe in some other place I don't know about.) And I also don't get a notification.

Using the applet I can make screenshots of the focused window and also fullscreen and display just fine. It only happens with region.

Using grim and slurp on the command line like this grim -g "$(slurp)" ~/Screenshots/test also works fine.

Shell Config Check for swayidle Potentially Too Greedy

As a user, I would like to include a keybind to automatically lock and signal USR1 to swayidle to automatically send dpms off (e.g. something like bindsym $Mod+Escape exec nwg-lock && sleep 1 && pkill -USR1 swayidle)

At present, any mention of the specific term swayidle will disable the default Idle & Lock screen settings, resulting in no swayidle config in the generated autostart on reboot.

I think it can be worked around by just tossing that keybind into a different config file, but I wonder if this can't be refined by someone smarter than I.

https://github.com/nwg-piotr/nwg-shell-config/blob/be8dda3879ad1d0e711608cf3141e8bd36b8a6d3/nwg_shell_config/ui_components.py#L2186C61-L2186C61

gtklock-powerbar-module userswitch-command option missing

gtklock-powerbar-module has an option for calling the DM to switch users.
It has no default value is disabled as I don't want to assume which DM is being used (as far as I know nwg-shell also doesn't interact with the DM).
However I think it should still be available from the UI.

FIRST!

sorry, I know this is alpha but I could not hold installing it, so the issue is it crashes when there is no internet on the machine.

Traceback (most recent call last):
  File "/usr/bin/nwg-shell-config", line 33, in <module>
    sys.exit(load_entry_point('nwg-shell-config==0.0.5', 'gui_scripts', 'nwg-shell-config')())
  File "/usr/lib/python3.10/site-packages/nwg_shell_config-0.0.5-py3.10.egg/nwg_shell_config/main.py", line 643, in main
    ui = GUI()
  File "/usr/lib/python3.10/site-packages/nwg_shell_config-0.0.5-py3.10.egg/nwg_shell_config/main.py", line 129, in __init__
    self.tz, self.lat, self.long = get_lat_lon()
  File "/usr/lib/python3.10/site-packages/nwg_shell_config-0.0.5-py3.10.egg/nwg_shell_config/tools.py", line 86, in get_lat_lon
    location = geolocator.geocode(tz)
  File "/usr/lib/python3.10/site-packages/geopy/geocoders/nominatim.py", line 297, in geocode
    return self._call_geocoder(url, callback, timeout=timeout)
  File "/usr/lib/python3.10/site-packages/geopy/geocoders/base.py", line 368, in _call_geocoder
    result = self.adapter.get_json(url, timeout=timeout, headers=req_headers)_config/tools.py", line 86, in get_lat_lon
    location = geolocator.geocode(tz)
  File "/usr/lib/python3.10/site-packages/geopy/geocoders/nominatim.py", line 297, in geocode
    return self._call_geocoder(url, callback, timeout=timeout)
  File "/usr/lib/python3.10/site-packages/geopy/geocoders/base.py", line 368, in 
  File "/usr/lib/python3.10/site-packages/geopy/adapters.py", line 438, in get_json
    resp = self._request(url, timeout=timeout, headers=headers)
  File "/usr/lib/python3.10/site-packages/geopy/adapters.py", line 460, in _request
    raise GeocoderUnavailable(message)
geopy.exc.GeocoderUnavailable: HTTPSConnectionPool(host='nominatim.openstreetmap.org', port=443): Max retries exceeded with url: /search?q=America%2FHavana&format=json&limit=1 (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f3835df0070>: Failed to establish a new connection: [Errno -2] Nombre o servicio desconocido'))

Keep working and good job, its an amazing software.

Idle & Lockscreen: gtklock modules

Hi, I've been working on expanding module support in gtklock and ported some of @ErikReider code to implement a user info module: https://github.com/jovanlanik/gtklock-userinfo-module

I'm wondering if a GUI option for selecting modules could be added to nwg-shell-config.

There's still some work left on my side, such as documentation, loading multiple modules at once and system-wide modules that could be installed via package manager but I wanted to discuss with you and see if you're interested.

Maybe even implement music controls as a module and leave input inhibitor enabled this way.

What are your thoughts on this?

Not add second keyboard

I can't add a second layout via nwg-shell-config, I added it via variables. That would be another output on the nwg-panel.
sway

Crash at start

Installed and wanted to try it, seems you need a little mkdir -p in there ;)

❯ nwg-shell-config
Starting sway version
Error loading json: [Errno 2] No such file or directory: '/home/janek/.local/share/nwg-shell/data'
Traceback (most recent call last):
  File "/usr/bin/nwg-shell-config-sway", line 33, in <module>
    sys.exit(load_entry_point('nwg-shell-config==0.5.7', 'gui_scripts', 'nwg-shell-config-sway')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/bin/nwg-shell-config-sway", line 25, in importlib_load_entry_point
    return next(matches).load()
           ^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/importlib/metadata/__init__.py", line 202, in load
    module = import_module(match.group('module'))
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1206, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1178, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1149, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/usr/lib/python3.11/site-packages/nwg_shell_config/main_sway.py", line 29, in <module>
    shell_data = load_shell_data()
                 ^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/nwg_shell_config/tools.py", line 360, in load_shell_data
    "installed-version": get_shell_version(),
                         ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/nwg_shell_config/tools.py", line 386, in get_shell_version
    lines = subprocess.check_output("nwg-shell -v".split()).decode('utf-8').splitlines()
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/subprocess.py", line 466, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/subprocess.py", line 548, in run
    with Popen(*popenargs, **kwargs) as process:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/subprocess.py", line 1024, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.11/subprocess.py", line 1917, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'nwg-shell'

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.