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
102
pinxi
102
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,62 +29443,62 @@ 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){
|
||||||
# the sequence here matters, some desktops like icewm, razor, let you set different
|
# order matters, these have alternate search patterns from default name
|
||||||
# wm, so we want to get the main controlling desktop first
|
# 0: check program; 1: ps_gui search; 2: data; 3: trigger alternate values/version
|
||||||
# icewm and any other that permits alternate wm to be used need to go first
|
@wms =(
|
||||||
# in this list.
|
['WindowMaker','WindowMaker','wmaker',''],
|
||||||
# unverfied: 2bwm catwm mcwm penrose snapwm uwm wmfs wmfs2 wingo wmii2
|
# ['clfswm','clfswm','clfswm',''], # *(sh|c?lisp)?.*clfswm'
|
||||||
# xfdesktoo is fallback in case not in xprop
|
['cwm','(openbsd-)?cwm','cwm',''],
|
||||||
my @wms = qw(icewm 2bwm 9wm aewm aewm\+\+ afterstep amiwm antiwm awesome
|
# ['flwm','flwm','flwm',''],
|
||||||
blackbox bspwm calmwm catwm cde ctwm dawn dusk dwm echinus evilwm
|
['flwm','flwm(_topside)?','flwm',''],
|
||||||
fluxbox hackedbox herbstluftwm instantwm i3 ion3 jbwm jwm
|
['fvwm-crystal','fvwm.*-crystal','fvwm-crystal','fvwm'],
|
||||||
larswm leftwm lwm matchbox-window-manager mcwm mini musca mvwm mwm
|
['fvwm1','fvwm1','fvwm1',''],
|
||||||
nawm notion nscde openbox pekwm penrose qvwm ratpoison
|
['fvwm2','fvwm2','fvwm2',''],
|
||||||
sawfish scrotwm snapwm spectrwm tinywm tvtwm twm uwm
|
['fvwm3','fvwm3','fvwm3',''],
|
||||||
windowlab wmfs wmfs2 wingo wmii2 wmii wmx xmonad yeahwm);
|
['fvwm95','fvwm95','fvwm95',''],
|
||||||
my $matches = join('|',@wms) . $wl_compositors;
|
['fvwm','fvwm','fvwm',''],
|
||||||
# note: use my $psg to avoid bizarre return from program_data to ps_gui write
|
['hyprland','[Hh]yprland','hyprctl',''],
|
||||||
foreach my $psg (@ps_gui){
|
# ['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
|
# no need to use check program with short list of ps_gui
|
||||||
if ($psg =~ /^($matches)$/){
|
# print "1: $item->[1]\n";
|
||||||
my $item = $1;
|
if (grep {/^$item->[1]$/i} @ps_gui){
|
||||||
($desktop->[0],$desktop->[1]) = main::program_data($item);
|
# print "2: $item->[1]\n";
|
||||||
if ($extra > 1 && $item eq 'xfdesktop'){
|
($desktop->[0],$desktop->[1]) = main::program_data($item->[2],$item->[3]);
|
||||||
($desktop->[2],$desktop->[3]) = main::program_data('xfdesktop-toolkit',$item,1);
|
if ($extra > 1 && $item->[0] eq 'xfdesktop'){
|
||||||
|
($desktop->[2],$desktop->[3]) = main::program_data('xfdesktop-toolkit',$item->[0],1);
|
||||||
}
|
}
|
||||||
last;
|
last;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!$desktop->[0]){
|
if (!$desktop->[0]){
|
||||||
# order matters, these have alternate search patterns from default name
|
# the sequence here matters, some desktops like icewm, razor, let you set different
|
||||||
# 0: check program; 1: ps_gui search; 2: data; 3: trigger alternate values/version
|
# wm, so we want to get the main controlling desktop first
|
||||||
@wms =(
|
# icewm and any other that permits alternate wm to be used need to go first
|
||||||
['WindowMaker','WindowMaker','wmaker',''],
|
# in this list.
|
||||||
['clfswm','clfswm','clfswm',''], # *(sh|c?lisp)?.*clfswm'
|
# unverfied: 2bwm catwm mcwm penrose snapwm uwm wmfs wmfs2 wingo wmii2
|
||||||
['cwm','(openbsd-)?cwm','cwm',''],
|
# xfdesktoo is fallback in case not in xprop
|
||||||
['flwm','flwm','flwm',''],
|
@wms = qw(icewm 2bwm 9wm aewm aewm\+\+ afterstep amiwm antiwm awesome
|
||||||
['flwm','flwm_topside','flwm',''],
|
blackbox bspwm calmwm catwm cde clfswm ctwm dawn dusk dwm echinus evilwm
|
||||||
['fvwm-crystal','fvwm.*-crystal','fvwm-crystal','fvwm'],
|
fluxbox hackedbox herbstluftwm instantwm i3 ion3 jbwm jwm
|
||||||
['fvwm1','fvwm1','fvwm1',''],
|
larswm leftwm lwm matchbox-window-manager mcwm mini musca mvwm mwm
|
||||||
['fvwm2','fvwm2','fvwm2',''],
|
nawm notion nscde openbox pekwm penrose qtile qvwm ratpoison
|
||||||
['fvwm3','fvwm3','fvwm3',''],
|
sawfish scrotwm snapwm spectrwm stumpwm tinywm tvtwm twm uwm
|
||||||
['fvwm','fvwm','fvwm',''],
|
windowlab wmfs wmfs2 wingo wmii2 wmii wmx xmonad yeahwm);
|
||||||
['fvwm95','fvwm95','fvwm95',''],
|
my $matches = join('|',@wms) . $wl_compositors;
|
||||||
['hyprland','hyprland','hyprctl',''],
|
# note: use my $psg to avoid bizarre return from program_data to ps_gui write
|
||||||
['qtile','.*qtile','qtile',''], # *(python.*)?qtile'
|
foreach my $psg (@ps_gui){
|
||||||
['stumpwm','stumpwm','stumpwm',''], # '(sh|c?lisp)?.*stumpwm'
|
|
||||||
);
|
|
||||||
foreach my $item (@wms){
|
|
||||||
# no need to use check program with short list of ps_gui
|
# no need to use check program with short list of ps_gui
|
||||||
# print "1: $item->[1]\n";
|
if ($psg =~ /^($matches)$/){
|
||||||
if (grep {/^$item->[1]$/i} @ps_gui){
|
my $item = $1;
|
||||||
# print "2: $item->[1]\n";
|
($desktop->[0],$desktop->[1]) = main::program_data($item);
|
||||||
($desktop->[0],$desktop->[1]) = main::program_data($item->[2],$item->[3]);
|
if ($extra > 1 && $item eq 'xfdesktop'){
|
||||||
if ($extra > 1 && $item->[0] eq 'xfdesktop'){
|
($desktop->[2],$desktop->[3]) = main::program_data('xfdesktop-toolkit',$item,1);
|
||||||
($desktop->[2],$desktop->[3]) = main::program_data('xfdesktop-toolkit',$item->[0],1);
|
|
||||||
}
|
}
|
||||||
last;
|
last;
|
||||||
}
|
}
|
||||||
|
@ -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