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
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
Kevin
package-helpers
Commits
9cfbd788
Commit
9cfbd788
authored
10 years ago
by
a_slacker_here
Browse files
Options
Downloads
Patches
Plain Diff
Rewritting Compton's scripts on different files
parent
d95b8151
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
helpers/DATA/compton/compton-launcher
+9
-0
9 additions, 0 deletions
helpers/DATA/compton/compton-launcher
helpers/DATA/compton/trisquel-compton-switcher
+63
-0
63 additions, 0 deletions
helpers/DATA/compton/trisquel-compton-switcher
with
72 additions
and
0 deletions
helpers/DATA/compton/compton-launcher
0 → 100644
+
9
−
0
View file @
9cfbd788
#!/bin/sh
[
$DESKTOP_SESSION
=
"trisquel-session"
]
||
exit
0
[
-f
$HOME
/.config/disable-compton
]
&&
exit
0
FILE
=
/etc/compton.conf
[
-f
$HOME
/.config/compton.conf
]
&&
FILE
=
"
$HOME
/.config/compton.conf"
[
0
!=
$(
glxinfo |grep
"renderer string:"
|grep
-v
llvmpipe |
wc
-c
)
]
&&
exec
compton
--config
$FILE
&
This diff is collapsed.
Click to expand it.
helpers/DATA/compton/trisquel-compton-switcher
0 → 100644
+
63
−
0
View file @
9cfbd788
#!/bin/bash
#Check if compton is currently running.
case
"
$(
pidof compton |
wc
-w
)
"
in
0
)
COMPTON_RUNNING
=
false
;;
1
)
COMPTON_RUNNING
=
true
;;
esac
if
$COMPTON_RUNNING
;
then
COMPTON
=
true
DISCOMPTON
=
false
elif
!
$COMPTON_RUNNING
;
then
COMPTON
=
false
DISCOMPTON
=
true
fi
#The text that will be showed to the user.
TEXT
=
"Use Compton compositor if 3d acceleration available"
TITLE
=
"Choose between enabling or disabling Compton"
COMPTON_ENABLED
=
"Compton enabled"
COMPTON_DISABLED
=
"Compton disabled"
INFO
=
"Compton is already running"
#Checks the languange of the system (more can be added in the future) and displays the text corresponding to the language selected.
if
[
$LANG
=
es_ES.UTF-8
]
;
then
TEXT
=
"Usar el compositor Compton si el equipo soporta aceleración 3D"
TITLE
=
"Seleccionar entre habilitar o deshabilitar los efectos de Compton"
COMPTON_ENABLED
=
"Compton habilitado"
COMPTON_DISABLED
=
"Compton deshabilitado"
INFO
=
"Compton ya se encuentra en ejecución"
fi
#Zenity is summoned to interact with the user.
ans
=
$(
zenity
--list
--hide-header
\
--title
"
$TITLE
"
\
--text
"
$TEXT
"
\
--radiolist
\
--column
""
--column
""
\
$COMPTON
"
$COMPTON_ENABLED
"
\
$DISCOMPTON
"
$COMPTON_DISABLED
"
)
#The program reacts to the user's decision.
if
[[
$ans
=
"
$COMPTON_ENABLED
"
]]
&&
!
$COMPTON_RUNNING
;
then
rm
$HOME
/.config/disable-compton
compton-launcher
#A message is displayed if the user decides to run a program that is already running
elif
[[
$ans
=
"
$COMPTON_ENABLED
"
]]
&&
$COMPTON_RUNNING
;
then
zenity
--info
\
--text
=
"
$INFO
"
else
killall compton
touch
$HOME
/.config/disable-compton
fi
\ No newline at end of file
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