mirror of
https://github.com/smxi/inxi.git
synced 2024-11-16 16:21:39 +00:00
wm updates
This commit is contained in:
parent
97be59df7c
commit
2ea369b0d6
80
pinxi
80
pinxi
|
@ -51,7 +51,7 @@ use POSIX qw(ceil uname strftime ttyname);
|
||||||
my $self_name='pinxi';
|
my $self_name='pinxi';
|
||||||
my $self_version='3.3.31';
|
my $self_version='3.3.31';
|
||||||
my $self_date='2023-11-29';
|
my $self_date='2023-11-29';
|
||||||
my $self_patch='20';
|
my $self_patch='21';
|
||||||
## END INXI INFO ##
|
## END INXI INFO ##
|
||||||
|
|
||||||
my ($b_pledge,@pledges);
|
my ($b_pledge,@pledges);
|
||||||
|
@ -29443,21 +29443,52 @@ sub get_env_xprop_misc_data {
|
||||||
|
|
||||||
sub get_ps_de_data {
|
sub get_ps_de_data {
|
||||||
eval $start if $b_log;
|
eval $start if $b_log;
|
||||||
my ($program,@version_data);
|
my ($program,@version_data,@wms);
|
||||||
main::set_ps_gui() if !$loaded{'ps-gui'};
|
main::set_ps_gui() if !$loaded{'ps-gui'};
|
||||||
if (@ps_gui){
|
if (@ps_gui){
|
||||||
|
# order matters, these have alternate search patterns from default name
|
||||||
|
# 0: check program; 1: ps_gui search; 2: data; 3: trigger alternate values/version
|
||||||
|
@wms =(
|
||||||
|
['WindowMaker','WindowMaker','wmaker',''],
|
||||||
|
# ['clfswm','clfswm','clfswm',''], # *(sh|c?lisp)?.*clfswm'
|
||||||
|
['cwm','(openbsd-)?cwm','cwm',''],
|
||||||
|
# ['flwm','flwm','flwm',''],
|
||||||
|
['flwm','flwm(_topside)?','flwm',''],
|
||||||
|
['fvwm-crystal','fvwm.*-crystal','fvwm-crystal','fvwm'],
|
||||||
|
['fvwm1','fvwm1','fvwm1',''],
|
||||||
|
['fvwm2','fvwm2','fvwm2',''],
|
||||||
|
['fvwm3','fvwm3','fvwm3',''],
|
||||||
|
['fvwm95','fvwm95','fvwm95',''],
|
||||||
|
['fvwm','fvwm','fvwm',''],
|
||||||
|
['hyprland','[Hh]yprland','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
|
||||||
|
# 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);
|
||||||
|
}
|
||||||
|
last;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!$desktop->[0]){
|
||||||
# the sequence here matters, some desktops like icewm, razor, let you set different
|
# the sequence here matters, some desktops like icewm, razor, let you set different
|
||||||
# wm, so we want to get the main controlling desktop first
|
# wm, so we want to get the main controlling desktop first
|
||||||
# icewm and any other that permits alternate wm to be used need to go first
|
# icewm and any other that permits alternate wm to be used need to go first
|
||||||
# in this list.
|
# in this list.
|
||||||
# unverfied: 2bwm catwm mcwm penrose snapwm uwm wmfs wmfs2 wingo wmii2
|
# unverfied: 2bwm catwm mcwm penrose snapwm uwm wmfs wmfs2 wingo wmii2
|
||||||
# xfdesktoo is fallback in case not in xprop
|
# xfdesktoo is fallback in case not in xprop
|
||||||
my @wms = qw(icewm 2bwm 9wm aewm aewm\+\+ afterstep amiwm antiwm awesome
|
@wms = qw(icewm 2bwm 9wm aewm aewm\+\+ afterstep amiwm antiwm awesome
|
||||||
blackbox bspwm calmwm catwm cde ctwm dawn dusk dwm echinus evilwm
|
blackbox bspwm calmwm catwm cde clfswm ctwm dawn dusk dwm echinus evilwm
|
||||||
fluxbox 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
|
larswm leftwm lwm matchbox-window-manager mcwm mini musca mvwm mwm
|
||||||
nawm notion nscde openbox pekwm penrose qvwm ratpoison
|
nawm notion nscde openbox pekwm penrose qtile qvwm ratpoison
|
||||||
sawfish scrotwm snapwm spectrwm tinywm tvtwm twm uwm
|
sawfish scrotwm snapwm spectrwm stumpwm tinywm tvtwm twm uwm
|
||||||
windowlab wmfs wmfs2 wingo wmii2 wmii wmx xmonad yeahwm);
|
windowlab wmfs wmfs2 wingo wmii2 wmii wmx xmonad yeahwm);
|
||||||
my $matches = join('|',@wms) . $wl_compositors;
|
my $matches = join('|',@wms) . $wl_compositors;
|
||||||
# note: use my $psg to avoid bizarre return from program_data to ps_gui write
|
# note: use my $psg to avoid bizarre return from program_data to ps_gui write
|
||||||
|
@ -29472,37 +29503,6 @@ sub get_ps_de_data {
|
||||||
last;
|
last;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!$desktop->[0]){
|
|
||||||
# order matters, these have alternate search patterns from default name
|
|
||||||
# 0: check program; 1: ps_gui search; 2: data; 3: trigger alternate values/version
|
|
||||||
@wms =(
|
|
||||||
['WindowMaker','WindowMaker','wmaker',''],
|
|
||||||
['clfswm','clfswm','clfswm',''], # *(sh|c?lisp)?.*clfswm'
|
|
||||||
['cwm','(openbsd-)?cwm','cwm',''],
|
|
||||||
['flwm','flwm','flwm',''],
|
|
||||||
['flwm','flwm_topside','flwm',''],
|
|
||||||
['fvwm-crystal','fvwm.*-crystal','fvwm-crystal','fvwm'],
|
|
||||||
['fvwm1','fvwm1','fvwm1',''],
|
|
||||||
['fvwm2','fvwm2','fvwm2',''],
|
|
||||||
['fvwm3','fvwm3','fvwm3',''],
|
|
||||||
['fvwm','fvwm','fvwm',''],
|
|
||||||
['fvwm95','fvwm95','fvwm95',''],
|
|
||||||
['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
|
|
||||||
# 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);
|
|
||||||
}
|
|
||||||
last;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
eval $end if $b_log;
|
eval $end if $b_log;
|
||||||
|
@ -29582,7 +29582,7 @@ sub get_wm_main {
|
||||||
if (!$desktop->[5]){
|
if (!$desktop->[5]){
|
||||||
main::set_ps_gui() if !$loaded{'ps-gui'};
|
main::set_ps_gui() if !$loaded{'ps-gui'};
|
||||||
# order matters, see above logic
|
# order matters, see above logic
|
||||||
# due to lisp/python starters, clfswm/stumpwm/qtile will not detect here
|
# due to lisp/python starters, clfswm/stumpwm/qtile need the starter filters
|
||||||
my @wms = qw(2bwm 9wm aewm aewm\+\+ afterstep amiwm antiwm awesome blackbox
|
my @wms = qw(2bwm 9wm aewm aewm\+\+ afterstep amiwm antiwm awesome blackbox
|
||||||
calmwm catwm clfswm compiz ctwm (openbsd-)?cwm fluxbox bspwm budgie-wm
|
calmwm catwm clfswm compiz ctwm (openbsd-)?cwm fluxbox bspwm budgie-wm
|
||||||
deepin-wm dawn dusk dwm echinus evilwm flwm fvwm-crystal fvwm1 fvwm2 fvwm3
|
deepin-wm dawn dusk dwm echinus evilwm flwm fvwm-crystal fvwm1 fvwm2 fvwm3
|
||||||
|
@ -34513,7 +34513,7 @@ sub set_ps_gui {
|
||||||
$wl_compositors = '|' . join('|',qw(asc awc
|
$wl_compositors = '|' . join('|',qw(asc awc
|
||||||
cage cagebreak cardboard chameleonwm clayland comfc
|
cage cagebreak cardboard chameleonwm clayland comfc
|
||||||
dwc dwl epd-wm fireplace feathers fenestra glass gamescope greenfield grefson
|
dwc dwl epd-wm fireplace feathers fenestra glass gamescope greenfield grefson
|
||||||
hikari hopalong [hH]yprland inaban japokwm kiwmi labwc laikawm lipstick liri
|
hikari hopalong [Hh]yprland inaban japokwm kiwmi labwc laikawm lipstick liri
|
||||||
mahogany marina maze motorcar newm nucleus
|
mahogany marina maze motorcar newm nucleus
|
||||||
orbital orbment perceptia phoc pywm qtile river rootston rustland
|
orbital orbment perceptia phoc pywm qtile river rootston rustland
|
||||||
simulavr skylight smithay sommelier sway swc swvkc
|
simulavr skylight smithay sommelier sway swc swvkc
|
||||||
|
@ -34523,12 +34523,14 @@ sub set_ps_gui {
|
||||||
$matches .= $wl_compositors;
|
$matches .= $wl_compositors;
|
||||||
}
|
}
|
||||||
$matches = qr/$matches/; # remember qr/../i only added perl 5.014
|
$matches = qr/$matches/; # remember qr/../i only added perl 5.014
|
||||||
|
# print "$matches\n";
|
||||||
foreach (@ps_cmd){
|
foreach (@ps_cmd){
|
||||||
# strip out python/lisp/sh starters
|
# strip out python/lisp/sh starters
|
||||||
if (/^(\/\S+\/(c?lisp|perl|python|sh)\s+)?(|[\S]*\/)($matches)(\/|\s|$)/){
|
if (/^(\/\S+\/(c?lisp|perl|python|sh)\s+)?(|[\S]*\/)($matches)(\/|\s|$)/){
|
||||||
push(@ps_gui, $4); # deal with duplicates with uniq
|
push(@ps_gui, $4); # deal with duplicates with uniq
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
# print Dumper \@ps_gui if $dbg[5];
|
||||||
uniq(\@ps_gui) if @ps_gui;
|
uniq(\@ps_gui) if @ps_gui;
|
||||||
print Dumper \@ps_gui if $dbg[5];
|
print Dumper \@ps_gui if $dbg[5];
|
||||||
log_data('dump','@ps_gui',\@ps_gui) if $b_log;
|
log_data('dump','@ps_gui',\@ps_gui) if $b_log;
|
||||||
|
|
Loading…
Reference in a new issue