mirror of
https://github.com/smxi/inxi.git
synced 2024-11-16 16:21:39 +00:00
window manager fixes
This commit is contained in:
parent
ca3332a8d6
commit
97be59df7c
43
pinxi
43
pinxi
|
@ -50,8 +50,8 @@ use POSIX qw(ceil uname strftime ttyname);
|
|||
## INXI INFO ##
|
||||
my $self_name='pinxi';
|
||||
my $self_version='3.3.31';
|
||||
my $self_date='2023-11-27';
|
||||
my $self_patch='19';
|
||||
my $self_date='2023-11-29';
|
||||
my $self_patch='20';
|
||||
## END INXI INFO ##
|
||||
|
||||
my ($b_pledge,@pledges);
|
||||
|
@ -4028,6 +4028,10 @@ sub program_data {
|
|||
}
|
||||
|
||||
# It's almost 1000 times slower to load these each time program_values is called!!
|
||||
# returns: 0: desktop/app command for --version; 1: search string;
|
||||
# 2: space print number; 3: [optional] version arg: -v, version, etc;
|
||||
# 4: [optional] exit first find 0/1; 5: [optional] 0/1 stderr output;
|
||||
# 6: replace regex; 7: extra data
|
||||
sub set_program_values {
|
||||
%program_values = (
|
||||
## Clients ##
|
||||
|
@ -4124,6 +4128,7 @@ sub set_program_values {
|
|||
'herbstluftwm' => ['herbstluftwm',2,'--version','herbstluftwm',0,1,0,'',''],
|
||||
'hikari' => ['^hikari',0,'0','hikari',0,1,0,'',''], # unverified
|
||||
'hopalong' => ['^hopalong',0,'0','Hopalong',0,1,0,'',''], # unverified
|
||||
'hyprctl' => ['^Tag:',2,'version','Hyprland',0,1,0,'',''], # method to get hyprland version
|
||||
'hyprland' => ['^hyprland',0,'0','Hyprland',0,1,0,'',''], # unverified
|
||||
'i3' => ['^i3',3,'--version','i3',0,1,0,'',''],
|
||||
'icewm' => ['^icewm',2,'--version','IceWM',0,1,0,'',''],
|
||||
|
@ -29449,7 +29454,7 @@ sub get_ps_de_data {
|
|||
# xfdesktoo is fallback in case not in xprop
|
||||
my @wms = qw(icewm 2bwm 9wm aewm aewm\+\+ afterstep amiwm antiwm awesome
|
||||
blackbox bspwm calmwm catwm cde ctwm dawn dusk dwm echinus evilwm
|
||||
fluxbox fvwm hackedbox herbstluftwm instantwm i3 ion3 jbwm jwm
|
||||
fluxbox hackedbox herbstluftwm instantwm i3 ion3 jbwm jwm
|
||||
larswm leftwm lwm matchbox-window-manager mcwm mini musca mvwm mwm
|
||||
nawm notion nscde openbox pekwm penrose qvwm ratpoison
|
||||
sawfish scrotwm snapwm spectrwm tinywm tvtwm twm uwm
|
||||
|
@ -29469,10 +29474,10 @@ sub get_ps_de_data {
|
|||
}
|
||||
if (!$desktop->[0]){
|
||||
# order matters, these have alternate search patterns from default name
|
||||
# 1 check program; 2 ps_gui search; 3 data; 4: trigger alternate values/version
|
||||
# 0: check program; 1: ps_gui search; 2: data; 3: trigger alternate values/version
|
||||
@wms =(
|
||||
['WindowMaker','WindowMaker','wmaker',''],
|
||||
['clfswm','.*(sh|c?lisp)?.*clfswm','clfswm',''],
|
||||
['clfswm','clfswm','clfswm',''], # *(sh|c?lisp)?.*clfswm'
|
||||
['cwm','(openbsd-)?cwm','cwm',''],
|
||||
['flwm','flwm','flwm',''],
|
||||
['flwm','flwm_topside','flwm',''],
|
||||
|
@ -29480,13 +29485,17 @@ sub get_ps_de_data {
|
|||
['fvwm1','fvwm1','fvwm1',''],
|
||||
['fvwm2','fvwm2','fvwm2',''],
|
||||
['fvwm3','fvwm3','fvwm3',''],
|
||||
['fvwm','fvwm','fvwm',''],
|
||||
['fvwm95','fvwm95','fvwm95',''],
|
||||
['qtile','.*(python.*)?qtile','qtile',''],
|
||||
['stumpwm','(sh|c?lisp)?.*stumpwm','stumpwm',''],
|
||||
['hyprland','hyprland','hyprctl',''],
|
||||
['qtile','.*qtile','qtile',''], # *(python.*)?qtile'
|
||||
['stumpwm','stumpwm','stumpwm',''], # '(sh|c?lisp)?.*stumpwm'
|
||||
);
|
||||
foreach my $item (@wms){
|
||||
# no need to use check program with short list of ps_gui
|
||||
if (grep {/^$item->[1]$/} @ps_gui){
|
||||
# print "1: $item->[1]\n";
|
||||
if (grep {/^$item->[1]$/i} @ps_gui){
|
||||
# print "2: $item->[1]\n";
|
||||
($desktop->[0],$desktop->[1]) = main::program_data($item->[2],$item->[3]);
|
||||
if ($extra > 1 && $item->[0] eq 'xfdesktop'){
|
||||
($desktop->[2],$desktop->[3]) = main::program_data('xfdesktop-toolkit',$item->[0],1);
|
||||
|
@ -29679,7 +29688,7 @@ sub set_screensaver_data {
|
|||
my @items = qw(away boinc-screensaver budgie-screensaver cinnamon-screensaver
|
||||
gnome-screensaver gsd-screensaver-proxy i3lock kscreenlocker
|
||||
light-locker lockscreen lxlock mate-screensaver nwg-lock physlock
|
||||
rss-glx slock swaylock ukui-screensaver unicode-screensaver
|
||||
rss-glx slock swayidle swaylock ukui-screensaver unicode-screensaver
|
||||
xautolock xfce4-screensaver xlock xlockmore xscreensaver
|
||||
xsecurelock xss-lock xtrlock);
|
||||
foreach my $item (@items){
|
||||
|
@ -34440,13 +34449,13 @@ sub set_ps_gui {
|
|||
tdelauncher tdeinit_phase1);
|
||||
push(@match,@temp);
|
||||
@temp=qw(2bwm 3dwm 9wm afterstep aewm aewm\+\+ amiwm antiwm awesome
|
||||
blackbox bspwm calmwm catwm cde (sh|c?lisp).*clfswm ctwm (openbsd-)?cwm
|
||||
blackbox bspwm calmwm catwm cde clfswm ctwm (openbsd-)?cwm
|
||||
dawn dusk dwm evilwm fluxbox flwm flwm_topside
|
||||
fvwm.*-crystal fvwm1 fvwm2 fvwm3 fvwm95 fvwm
|
||||
herbstluftwm i3 icewm instantwm ion3 jbwm jwm larswm leftwm lwm
|
||||
matchbox-window-manager mcwm mini monsterwm musca mwm nawm notion
|
||||
openbox nscde pekwm penrose python.*qtile qvwm ratpoison
|
||||
sawfish scrotwm snapwm spectrwm (sh|c?lisp).*stumpwm
|
||||
openbox nscde pekwm penrose qtile qvwm ratpoison
|
||||
sawfish scrotwm snapwm spectrwm stumpwm
|
||||
tinywm tvtwm twm uwm windowlab WindowMaker wingo wm2 wmfs wmfs2 wmii2 wmii
|
||||
wmx xfdesktop xmonad yeahwm);
|
||||
push(@match,@temp);
|
||||
|
@ -34481,7 +34490,7 @@ sub set_ps_gui {
|
|||
@temp=qw(away boinc-screensaver budgie-screensaver cinnamon-screensaver
|
||||
gnome-screensaver gsd-screensaver-proxy i3lock kscreenlocker
|
||||
light-locker lockscreen lxlock mate-screensaver nwg-lock physlock
|
||||
rss-glx slock swaylock ukui-screensaver unicode-screensaver
|
||||
rss-glx slock swayidle swaylock ukui-screensaver unicode-screensaver
|
||||
xautolock xfce4-screensaver xlock xlockmore xscreensaver
|
||||
xsecurelock xss-lock xtrlock);
|
||||
push(@match,@temp);
|
||||
|
@ -34504,7 +34513,7 @@ sub set_ps_gui {
|
|||
$wl_compositors = '|' . join('|',qw(asc awc
|
||||
cage cagebreak cardboard chameleonwm clayland comfc
|
||||
dwc dwl epd-wm fireplace feathers fenestra glass gamescope greenfield grefson
|
||||
hikari hopalong hyprland inaban japokwm kiwmi labwc laikawm lipstick liri
|
||||
hikari hopalong [hH]yprland inaban japokwm kiwmi labwc laikawm lipstick liri
|
||||
mahogany marina maze motorcar newm nucleus
|
||||
orbital orbment perceptia phoc pywm qtile river rootston rustland
|
||||
simulavr skylight smithay sommelier sway swc swvkc
|
||||
|
@ -34515,9 +34524,9 @@ sub set_ps_gui {
|
|||
}
|
||||
$matches = qr/$matches/; # remember qr/../i only added perl 5.014
|
||||
foreach (@ps_cmd){
|
||||
if (/^(|[\S]*\/)($matches)(\/|\s|$)/){
|
||||
$working = $2;
|
||||
push(@ps_gui, $working); # deal with duplicates with uniq
|
||||
# strip out python/lisp/sh starters
|
||||
if (/^(\/\S+\/(c?lisp|perl|python|sh)\s+)?(|[\S]*\/)($matches)(\/|\s|$)/){
|
||||
push(@ps_gui, $4); # deal with duplicates with uniq
|
||||
}
|
||||
}
|
||||
uniq(\@ps_gui) if @ps_gui;
|
||||
|
|
Loading…
Reference in a new issue