8tm / device-drama

Device-Drama - Linux Fetch Tool
https://pypi.org/project/device-drama/
0 stars 0 forks source link

Does ons work on debian 11 / Wayland #3

Closed frague59 closed 1 year ago

frague59 commented 1 year ago

The script does not work on a debian /Wayland system

$ pipx install device-drama
$ device-drama
Traceback (most recent call last):
  File "/home/fguerin/.local/bin/device-drama", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/fguerin/.local/pipx/venvs/device-drama/lib/python3.11/site-packages/device_drama/main.py", line 248, in main
    screen = '\n'.join(generate_screen(plugin_modules))
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/fguerin/.local/pipx/venvs/device-drama/lib/python3.11/site-packages/device_drama/main.py", line 153, in generate_screen
    output: List[Dict[str, str]] = dd_plugin.run()
                                   ^^^^^^^^^^^^^^^
  File "/home/fguerin/.local/pipx/venvs/device-drama/lib/python3.11/site-packages/device_drama/plugins/05_Applications/01_apps_info.py", line 72, in run
    'text': self.get_window_manager(),
            ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/fguerin/.local/pipx/venvs/device-drama/lib/python3.11/site-packages/device_drama/plugins/05_Applications/01_apps_info.py", line 30, in get_window_manager
    wm = run_command('xprop -root _NET_WM_NAME').output.split('=')[1]
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^
IndexError: list index out of range
8tm commented 1 year ago

Hi, thanks for information. Can you add output from command: xprop -root _NET_WM_NAME It will help me to fix it :)

8tm commented 1 year ago

Please check version 23.9.12:

pipx install device-drama==23.9.12

and please let me know if it helps.

frague59 commented 1 year ago

It works with the new version, thanks !

 Device-Drama v23.9.12        (http://github.com/8tm/device-drama)                                                                                                                                                   

         Main Hardware                                                                                                                                                                                               
  MoBo: Dell Inc. 0D9VNX                                                                                                                                                                                             
   CPU: 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz                                                                                                                                                               
   GPU: Mesa Intel(R) Xe Graphics (TGL GT2)                                                                                                                                                                          
   RAM: Used 3.78 GB of 15.36 GB (24.64 %)                                                                                                                                                                           

         Disks                                                                                                                                                                                                       
  ID Model                      Size Tran  RPM   Real Size  Real Used  Real Free Used% Free% Mount Mount path                                                                                                        
   1 KBG50ZNS256G NVMe...     ------ NVME  ----  238.47 GB  238.18 GB  305.18 MB  100%    0%   YES /boot                                                                                                             

         Monitors                                                                                                                                                                                                    
   Orientation:  ⯳                                                                                                                                                                                                   
    Resolution: 1920x1080 (1920x1080)                                                                                                                                                                                
    Monitor  1: Unknown              [XWAYLAND0] [1920x1080] [Constructed: Unknown]                                                                                                                                  

         Operating System                                                                                                                                                                                            
  Distribution: Debian GNU/Linux                                                                                                                                                                                     
  Architecture: x86_64                                                                                                                                                                                               
     Code Name: Bookworm                                                                                                                                                                                             
        Kernel: 6.1.0-11-amd64                                                                                                                                                                                       
        Uptime: 0 days, 00:12:38                                                                                                                                                                                     
      Packages: 2874 (dpkg), 0 (snap)                                                                                                                                                                                
         Theme: Adwaita-dark                                                                                                                                                                                         
         Icons: Tela-red-dark                                                                                                                                                                                        

         Applications                                                                                                                                                                                                
         Shell: Bash 5.2.15                                                                                                                                                                                          
            WM: Unknown                                                                                                                                                                                              
      Terminal: tilix
frague59 commented 1 year ago

Please note GNOME is not detected, nor flatpak packages.

8tm commented 1 year ago

Please show me the output from command:

xprop -root _NET_WM_NAME

frague59 commented 1 year ago
$ xprop -root _NET_WM_NAME
_NET_WM_NAME:  not found
frague59 commented 1 year ago
$ xprop -root | grep _NET_WM_NAME
_NET_SUPPORTED(ATOM) = _NET_WM_NAME, _NET_CLOSE_WINDOW, _NET_WM_STATE, _NET_WM_STATE_SHADED, _NET_WM_STATE_MAXIMIZED_HORZ, _NET_WM_STATE_MAXIMIZED_VERT, _NET_WM_DESKTOP, _NET_NUMBER_OF_DESKTOPS, _NET_CURRENT_DESKTOP, _NET_WM_WINDOW_TYPE, _NET_WM_WINDOW_TYPE_DESKTOP, _NET_WM_WINDOW_TYPE_DOCK, _NET_WM_WINDOW_TYPE_TOOLBAR, _NET_WM_WINDOW_TYPE_MENU, _NET_WM_WINDOW_TYPE_UTILITY, _NET_WM_WINDOW_TYPE_SPLASH, _NET_WM_WINDOW_TYPE_DIALOG, _NET_WM_WINDOW_TYPE_DROPDOWN_MENU, _NET_WM_WINDOW_TYPE_POPUP_MENU, _NET_WM_WINDOW_TYPE_TOOLTIP, _NET_WM_WINDOW_TYPE_NOTIFICATION, _NET_WM_WINDOW_TYPE_COMBO, _NET_WM_WINDOW_TYPE_DND, _NET_WM_WINDOW_TYPE_NORMAL, _NET_WM_STATE_MODAL, _NET_CLIENT_LIST, _NET_CLIENT_LIST_STACKING, _NET_WM_STATE_SKIP_TASKBAR, _NET_WM_STATE_SKIP_PAGER, _NET_WM_ICON, _NET_WM_ICON_GEOMETRY, _NET_WM_MOVERESIZE, _NET_ACTIVE_WINDOW, _NET_WM_STRUT, _NET_WM_STATE_HIDDEN, _NET_WM_STATE_FULLSCREEN, _NET_WM_PING, _NET_WM_PID, _NET_WORKAREA, _NET_SHOWING_DESKTOP, _NET_DESKTOP_LAYOUT, _NET_DESKTOP_NAMES, _NET_WM_ALLOWED_ACTIONS, _NET_WM_ACTION_MOVE, _NET_WM_ACTION_RESIZE, _NET_WM_ACTION_SHADE, _NET_WM_ACTION_STICK, _NET_WM_ACTION_MAXIMIZE_HORZ, _NET_WM_ACTION_MAXIMIZE_VERT, _NET_WM_ACTION_CHANGE_DESKTOP, _NET_WM_ACTION_CLOSE, _NET_WM_STATE_ABOVE, _NET_WM_STATE_BELOW, _NET_STARTUP_ID, _NET_WM_STRUT_PARTIAL, _NET_WM_ACTION_FULLSCREEN, _NET_WM_ACTION_MINIMIZE, _NET_FRAME_EXTENTS, _NET_REQUEST_FRAME_EXTENTS, _NET_WM_USER_TIME, _NET_WM_STATE_DEMANDS_ATTENTION, _NET_MOVERESIZE_WINDOW, _NET_DESKTOP_GEOMETRY, _NET_DESKTOP_VIEWPORT, _NET_WM_USER_TIME_WINDOW, _NET_WM_ACTION_ABOVE, _NET_WM_ACTION_BELOW, _NET_WM_STATE_STICKY, _NET_WM_FULLSCREEN_MONITORS, _NET_WM_STATE_FOCUSED, _NET_WM_BYPASS_COMPOSITOR, _NET_WM_OPAQUE_REGION, _NET_WM_FRAME_DRAWN, _NET_WM_FRAME_TIMINGS, _NET_WM_WINDOW_OPACITY, _NET_RESTACK_WINDOW, _GTK_FRAME_EXTENTS, _GTK_SHOW_WINDOW_MENU, _GTK_EDGE_CONSTRAINTS, _GTK_WORKAREAS
8tm commented 1 year ago

In my case it returns 2 lines (this which you add and additional with WM name:

xprop -root | grep _NET_WM_NAME _NET_SUPPORTED(ATOM) = _NET_SUPPORTED, _NET_SUPPORTING_WM_CHECK, _NET_WM_NAME, _NET_WM_VISIBLE_NAME, _NET_WM_MOVERESIZE, _NET_WM_STATE_STICKY, _NET_WM_STATE_FULLSCREEN, _NET_WM_STATE_DEMANDS_ATTENTION, _NET_WM_STATE_MODAL, _NET_WM_STATE_HIDDEN, _NET_WM_STATE_FOCUSED, _NET_WM_STATE, _NET_WM_WINDOW_TYPE, _NET_WM_WINDOW_TYPE_NORMAL, _NET_WM_WINDOW_TYPE_DOCK, _NET_WM_WINDOW_TYPE_DIALOG, _NET_WM_WINDOW_TYPE_UTILITY, _NET_WM_WINDOW_TYPE_TOOLBAR, _NET_WM_WINDOW_TYPE_SPLASH, _NET_WM_WINDOW_TYPE_MENU, _NET_WM_WINDOW_TYPE_DROPDOWN_MENU, _NET_WM_WINDOW_TYPE_POPUP_MENU, _NET_WM_WINDOW_TYPE_TOOLTIP, _NET_WM_WINDOW_TYPE_NOTIFICATION, _NET_WM_DESKTOP, _NET_WM_STRUT_PARTIAL, _NET_CLIENT_LIST, _NET_CLIENT_LIST_STACKING, _NET_CURRENT_DESKTOP, _NET_NUMBER_OF_DESKTOPS, _NET_DESKTOP_NAMES, _NET_DESKTOP_VIEWPORT, _NET_ACTIVE_WINDOW, _NET_CLOSE_WINDOW, _NET_MOVERESIZE_WINDOW _NET_WM_NAME(UTF8_STRING) = "i3"

Can you add output without grep from command (you can change your user name in output to "username" or something like that):

xprop -root

I'll install gnome and check how to get WM name.

In next release I'll add flatpack information about installed packages.

8tm commented 1 year ago

flatpak counter added in v23.9.15

WM still unresolved.