Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
package-helpers
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Eliab Andi Artz
package-helpers
Commits
4fa403db
Commit
4fa403db
authored
7 years ago
by
Ruben Rodriguez
Browse files
Options
Downloads
Patches
Plain Diff
Added helper for mate-session-manager
parent
4f7884ff
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
helpers/DATA/mate-session-manager/mate-wm
+161
-0
161 additions, 0 deletions
helpers/DATA/mate-session-manager/mate-wm
helpers/make-mate-session-manager
+29
-0
29 additions, 0 deletions
helpers/make-mate-session-manager
with
190 additions
and
0 deletions
helpers/DATA/mate-session-manager/mate-wm
0 → 100755
+
161
−
0
View file @
4fa403db
#!/bin/sh
# The user can specify his prefered WM by setting the WINDOW_MANAGER
# environment variable.
#
# If this is not set, we search a list of known windowmanagers and use
# the first one that is found in the users's PATH
#
# NOTE: DON'T USE THIS. Please have your window manager install
# a desktop file and change the mateconf key
# /desktop/mate/session/required_components/windowmanager
# sm-client-id value
SMID
=
# default-wm value
DEFWM
=
#read in the arguments
GET
=
for
n
in
"
$@
"
;
do
case
"
$GET
"
in
smid
)
SMID
=
$n
GET
=
;;
defwm
)
DEFWM
=
$n
GET
=
;;
*
)
case
"
$n
"
in
--sm-client-id
)
GET
=
smid
;;
--default-wm
)
GET
=
defwm
;;
esac
;;
esac
done
# WINDOW_MANAGER overrides all
if
[
-z
"
$WINDOW_MANAGER
"
]
;
then
WINDOW_MANAGER
=
`
gsettings get org.mate.session.required-components windowmanager 2> /dev/null
`
fi
# Migrate compiz to compiz-manager if possible and needed
if
[
"x
$WINDOW_MANAGER
"
=
"xcompiz"
-o
"x
$DEFWM
"
=
"xcompiz"
]
;
then
which compiz-manager
>
/dev/null 2>&1
if
[
$?
-eq
0
]
;
then
if
[
"x
$WINDOW_MANAGER
"
=
"xcompiz"
]
;
then
WINDOW_MANAGER
=
"compiz-manager"
fi
if
[
"x
$DEFWM
"
=
"xcompiz"
]
;
then
DEFWM
=
"compiz-manager"
fi
fi
fi
# Avoid looping if the session configuration tells us to use mate-wm or if
# the user forces mate-wm via WINDOW_MANAGER
if
[
"x
$WINDOW_MANAGER
"
=
"xmate-wm"
]
;
then
WINDOW_MANAGER
=
""
fi
if
[
-z
"
$WINDOW_MANAGER
"
]
;
then
# Create a list of window manager we can handle, trying to only use the
# compositing ones when it makes sense
KNOWN_WM
=
"sawfish sawmill enlightenment icewm wmaker fvwm2 qvwm fvwm twm kwm"
# marco is still the default wm in MATE
KNOWN_WM
=
"marco
$KNOWN_WM
"
xdpyinfo 2> /dev/null |
grep
-q
"^ *Composite$"
2> /dev/null
IS_X_COMPOSITED
=
$?
if
[
$IS_X_COMPOSITED
-eq
0
]
;
then
KNOWN_WM
=
"marco-compton mutter compiz-manager compiz beryl
$KNOWN_WM
"
fi
OLDIFS
=
$IFS
if
[
-z
"
$DEFWM
"
-o
"x
$DEFWM
"
=
"xmate-wm"
]
;
then
for
wm
in
$KNOWN_WM
;
do
IFS
=
":"
for
dir
in
$PATH
;
do
if
[
-x
"
$dir
/
$wm
"
]
;
then
WINDOW_MANAGER
=
"
$dir
/
$wm
"
break
2
fi
done
IFS
=
$OLDIFS
done
else
WINDOW_MANAGER
=
$DEFWM
fi
IFS
=
$OLDIFS
fi
# If no window manager can be found, we default to xterm
if
[
-z
"
$WINDOW_MANAGER
"
]
;
then
echo
"WARNING: No window manager can be found."
WINDOW_MANAGER
=
xterm
fi
# Now create options OPT1, OPT2 and OPT3 based on the windowmanager used
OPT1
=
OPT2
=
OPT3
=
OPT4
=
if
[
!
-z
"
$SMID
"
]
;
then
case
`
basename
$WINDOW_MANAGER
`
in
sawfish|sawmill|marco|mutter
)
OPT1
=
--sm-client-id
=
$SMID
;;
openbox|enlightenment|e16
)
OPT1
=
--sm-client-id
OPT2
=
$SMID
;;
twm
)
OPT1
=
-clientId
OPT2
=
$SMID
;;
lwm
)
OPT1
=
-s
OPT2
=
$SMID
;;
fvwm
)
OPT1
=
-i
OPT2
=
$SMID
;;
compiz|compiz-manager
)
OPT1
=
--sm-client-id
OPT2
=
$SMID
;;
beryl
)
OPT1
=
--sm-client-id
OPT2
=
$SMID
;;
#FIXME: add all other windowmanagers here with their proper options
esac
fi
case
`
basename
$WINDOW_MANAGER
`
in
compiz
)
#commented lines cause high cpu usage
#export LIBGL_ALWAYS_INDIRECT=1
gtk-window-decorator &
#OPT3=glib
#OPT4=mateconf
;;
beryl
)
emerald &
;;
esac
exec
$WINDOW_MANAGER
$OPT1
$OPT2
$OPT3
$OPT4
echo
"ERROR: No window manager could run!"
This diff is collapsed.
Click to expand it.
helpers/make-mate-session-manager
0 → 100644
+
29
−
0
View file @
4fa403db
#!/bin/sh
#
# Copyright (C) 2017 Ruben Rodriguez <ruben@trisquel.info>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#
VERSION
=
1
.
./config
cp
$DATA
/mate-wm data/mate-wm
changelog
"Improved composition handling"
compile
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment