Code Monkey home page Code Monkey logo

uwsm's People

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  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  avatar  avatar  avatar  avatar  avatar

uwsm's Issues

Sourcing env variables from shell profile does not working

Below is a diff of env variables list obtained by printenv | sort on TTY and uwsm launched graphical session

diff env_tty env_uwsm -y
                                                              > ALACRITTY_WINDOW_ID=0
                                                              > COLORTERM=truecolor
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus           DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
DEBUGINFOD_URLS=https://debuginfod.archlinux.org              | EDITOR=nano
HG=/usr/bin/hg                                                <
HOME=/home/piroro                                               HOME=/home/piroro
INVOCATION_ID=d256f43581ed4f6988aa33872383b931                | HYPRLAND_CMD=hyprland
                                                              > HYPRLAND_INSTANCE_SIGNATURE=03ebbe18ed8517ee22591eac82cd54322
                                                              > INVOCATION_ID=50932c37959a4d5a8ad2b8627879b261
                                                              > JOURNAL_STREAM=8:9879
LANG=ja_JP.UTF-8                                                LANG=ja_JP.UTF-8
LC_COLLATE=C.UTF-8                                              LC_COLLATE=C.UTF-8
LC_MESSAGES=C.UTF-8                                             LC_MESSAGES=C.UTF-8
LOGNAME=piroro                                                  LOGNAME=piroro
MAIL=/var/spool/mail/piroro                                     MAIL=/var/spool/mail/piroro
MEMORY_PRESSURE_WATCH=/sys/fs/cgroup/system.slice/lemurs.serv | MANAGERPID=620
                                                              > MEMORY_PRESSURE_WATCH=/sys/fs/cgroup/user.slice/user-1000.sli
MEMORY_PRESSURE_WRITE=c29tZSAyMDAwMDAgMjAwMDAwMAA=              MEMORY_PRESSURE_WRITE=c29tZSAyMDAwMDAgMjAwMDAwMAA=
MOTD_SHOWN=pam                                                | MOZ_ENABLE_WAYLAND=1
PATH=/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/def | NOTIFY_SOCKET=/run/user/1000/systemd/notify
                                                              > PATH=/usr/local/bin:/usr/bin
PWD=/home/piroro                                                PWD=/home/piroro
                                                              > QT_IM_MODULE=fcitx
SHELL=/bin/bash                                                 SHELL=/bin/bash
SHLVL=1                                                       | SHLVL=2
SYSTEMD_EXEC_PID=556                                          | SYSTEMD_EXEC_PID=714
TERM=linux                                                    | TERM=xterm-256color
USER=piroro                                                     USER=piroro
XDG_CACHE_HOME=/home/piroro/.cache                            | WAYLAND_DISPLAY=wayland-1
XDG_CONFIG_DIRS=/etc/xdg                                      | WGPU_POWER_PREF=low
XDG_CONFIG_HOME=/home/piroro/.config                          | WINDOWID=0
XDG_DATA_DIRS=/usr/local/share:/usr/share                     | XCURSOR_SIZE=24
XDG_DATA_HOME=/home/piroro/.local/share                       | XDG_BACKEND=wayland
                                                              > XDG_CURRENT_DESKTOP=Hyprland
XDG_RUNTIME_DIR=/run/user/1000                                  XDG_RUNTIME_DIR=/run/user/1000
XDG_SEAT=seat0                                                | XDG_SESSION_TYPE=wayland
XDG_SESSION_CLASS=user                                        <
XDG_SESSION_ID=c1                                             <
XDG_SESSION_TYPE=tty                                          <
XDG_STATE_HOME=/home/piroro/.local/state                      <
XDG_VTNR=2                                                    <
_=/usr/bin/printenv                                             _=/usr/bin/printenv
                                                              > _JAVA_AWT_WM_NONREPARENTING=1

Env variables set by login manager (XDG_SESSION_ID, XDG_SEAT, etc.) and shell profile (PATH modification) is gone. Does it needed to list every variables after uwsm finalize?

OS: Arch
Login manager: lemurs (lemurs-git from AUR, coastalwhite/lemurs@09003a8)
Session manager: uwsm (uwsm from AUR, 0.14.0)
Compositor: Hyprland (Xwayland disabled custom build, 0.34.0)
Terminal: cosmic-term (Aracritty-based)

Python rewrite

The plan so far:
Build basic structure around argparse subparsers.
Use shell insert for environment preparation, keep this section of plugin support.
Scope of potential python code plugins is undecided as of yet, maybe hold off until a working prototype is released.
Cover #3 out of the box.

  • Working prototype (py)
  • Update manuals
  • Decide on python-side plugins
  • Desktop entry support in app subcommand (namely proper handling of various %* fields)
    • launching without arguments (drop % fields)
    • non-argument % fields support
    • argument fields support

Manpages

Whenever I run uwsm -h, I find that it floods my terminal with a lot of information. I have to fullscreen the terminal or reduce the font size in order to see all of the text.

I think it would be a good idea to move the more verbose information to manpages to make it easier to read (and reduce the cognitive load).

A couple examples on how to set this up with meson (requires #17):

want to add some doctest?

I was thinking about adding doctest for a few of these functions. it's part of the standard library so won't incur an extra dependency.

Some of these functions would be hard to make sense of without some examples of input, and some testing is probably necessary as right now the only way to confirm it works is to well run it. given that some of the capabilities likely require sudo that is probably an undesirable way to discover bugs

XDG_SESSION_TYPE is missing

A quick fix, but where best to put it? Environment handler or finalizer... Leaning towards the former at the moment.

Add suport for additional attributes

From Desktop Entries: Name, GenericName, DesktopNames. How to pass them and where to put.

  • Decide if separate handling of attributes on cli and from entry is needed
    • Merge them to custom.conf drop-ins or split into a_desktop_entry.conf, b_custom.conf drop-ins or something like that

Refactor into multiple python modules

The script is starting to get a bit too long for a single file. Splitting the source into multiple files would help make the code easier to understand and navigate.

`app` subcommand cannot launch stock KDE applications

The .validate() method of xdg.DesktopEntry.DesktopEntry performs (very) strict validation of XDG desktop files.

Because of this, many stock KDE applications, such as Dolphin, cannot be started, because they contain localized keys using an invalid locale identifier x-test.

$ uwsm app org.kde.dolphin.desktop
Entry /usr/share/applications/org.kde.dolphin.desktop failed validation:
  err: Invalid key: Keywords[x-test]
  err: Invalid key: Name[x-test]
  err: Invalid key: GenericName[x-test]
$ grep x-test /usr/share/applications/org.kde.dolphin.desktop
Name[x-test]=xxDolphinxx
GenericName[x-test]=xxFile Managerxx
Keywords[x-test]=xxfilesxx;xxfile managementxx;xxfile browsingxx;xxsambaxx;xxnetwork sharesxx;xxExplorerxx;xxFinderxx;

System has not reached graphical.target

I don't know what's up with uwsm, but it started doing this error on startup checks now. How do I reach graphical target if I'm starting this from a TTY?

Arch Linux, updated as of this post.

Edit: The graphical.target service appears to require a display-manager.service to operate. What display manager am I supposed to be using with uwsm?

More control via environment vars

Restore some features of shell variant, like customization of env varnames lists via environment variables. Maybe control other things via env, like desktop names for XDG_CURRENT_DESKTOP.

autostart services don't inherit env vars from compositor

I have this in my hyprland config file:

$cursor-theme = capitaine-cursors
$cursor-size = 48
env = XCURSOR_SIZE,$cursor-size
env = XCURSOR_THEME,$cursor-theme
exec = hyprctl setcursor $cursor-theme $cursor-size
exec = gsettings set org.gnome.desktop.interface cursor-theme $cursor-theme
exec = gsettings set org.gnome.desktop.interface cursor-size $cursor-size
exec = uwsm finalize XCURSOR_THEME XCURSOR_SIZE

I have corectrl set up as an autostart service, which ends up using the wrong cursor. Could it be because autostart services are started before the compositor signals readiness?
I checked the environment variables like this: cat /proc/$(pidof corectrl)/environ | tr '\0' '\n'

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.