aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2023-03-09 08:05:56 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2023-03-09 08:05:56 +0100
commit1fc6d8ec94f0c1c7da442a57b6ed925305201370 (patch)
tree7714afd9fc94b60e4ec5e8605940cc93cd2c8a3c
parentef9cf41767a7a70dee00059556dc48f420bd60e7 (diff)
parentbd6769f3b5831d4cd96c2dc46e25c82f04c08695 (diff)
downloadayatana-indicator-display-1fc6d8ec94f0c1c7da442a57b6ed925305201370.tar.gz
ayatana-indicator-display-1fc6d8ec94f0c1c7da442a57b6ed925305201370.tar.bz2
ayatana-indicator-display-1fc6d8ec94f0c1c7da442a57b6ed925305201370.zip
Merge branch 'tari01-pr/add-brightness'
Attributes GH PR #73: https://github.com/AyatanaIndicators/ayatana-indicator-display/pull/73
-rw-r--r--data/CMakeLists.txt2
-rw-r--r--data/icons/ayatana-indicator-display-brightness-high.svg303
-rw-r--r--data/icons/ayatana-indicator-display-brightness-low.svg280
-rw-r--r--data/org.ayatana.indicator.display.gschema.xml6
-rw-r--r--debian/control2
-rw-r--r--src/rotation-lock.cpp40
6 files changed, 627 insertions, 6 deletions
diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt
index 1159064..81b13f4 100644
--- a/data/CMakeLists.txt
+++ b/data/CMakeLists.txt
@@ -60,5 +60,7 @@ install (FILES "${AYATANA_INDICATOR_FILE}"
# ayatana-indicator-display-colortemp-off.svg
# ayatana-indicator-display-colortemp-on.svg
+# ayatana-indicator-display-brightness-low
+# ayatana-indicator-display-brightness-high
install (DIRECTORY "icons/" DESTINATION "${CMAKE_INSTALL_FULL_DATADIR}/icons/hicolor/scalable/status" FILES_MATCHING PATTERN "*.svg")
diff --git a/data/icons/ayatana-indicator-display-brightness-high.svg b/data/icons/ayatana-indicator-display-brightness-high.svg
new file mode 100644
index 0000000..e2fd1aa
--- /dev/null
+++ b/data/icons/ayatana-indicator-display-brightness-high.svg
@@ -0,0 +1,303 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ id="svg2869"
+ width="48"
+ height="48"
+ version="1.1"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:svg="http://www.w3.org/2000/svg">
+ <defs
+ id="defs2871">
+ <linearGradient
+ id="linearGradient3663">
+ <stop
+ id="stop3665"
+ style="stop-color:#edd563"
+ offset="0" />
+ <stop
+ id="stop3667"
+ style="stop-color:#e08223"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3661"
+ x1="28.403"
+ x2="21.573"
+ y1="45.488"
+ y2="4.5122"
+ gradientUnits="userSpaceOnUse">
+ <stop
+ id="stop3657"
+ style="stop-color:#bb5e12"
+ offset="0" />
+ <stop
+ id="stop3659"
+ style="stop-color:#cd8033"
+ offset="1" />
+ </linearGradient>
+ <radialGradient
+ id="radialGradient3669"
+ cx="19.622"
+ cy="9.3902"
+ r="20.488"
+ gradientTransform="matrix(0.19048,1.0952,-1.3678,0.23788,28.729,-14.334)"
+ gradientUnits="userSpaceOnUse"
+ xlink:href="#linearGradient3663" />
+ <linearGradient
+ id="linearGradient3679"
+ x1="16.807"
+ x2="32.378"
+ y1="6.5502"
+ y2="50.279"
+ gradientUnits="userSpaceOnUse">
+ <stop
+ id="stop3675"
+ style="stop-color:#fff"
+ offset="0" />
+ <stop
+ id="stop3677"
+ style="stop-color:#fff;stop-opacity:0"
+ offset="1" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient3761"
+ x1="7"
+ x2="9"
+ y1="23"
+ y2="21"
+ gradientTransform="translate(1.3241,1.2972)"
+ gradientUnits="userSpaceOnUse"
+ xlink:href="#linearGradient3663" />
+ <linearGradient
+ id="linearGradient3763"
+ x1="25"
+ x2="25"
+ y1="31"
+ y2="29"
+ gradientUnits="userSpaceOnUse"
+ xlink:href="#linearGradient3663" />
+ <linearGradient
+ id="linearGradient3765"
+ x1="41"
+ x2="39"
+ y1="25"
+ y2="22"
+ gradientUnits="userSpaceOnUse"
+ xlink:href="#linearGradient3663" />
+ <linearGradient
+ id="linearGradient3767"
+ x1="47"
+ x2="44"
+ y1="8"
+ y2="7"
+ gradientUnits="userSpaceOnUse"
+ xlink:href="#linearGradient3663" />
+ <linearGradient
+ id="linearGradient3769"
+ x1="40"
+ x2="38"
+ y1="-9"
+ y2="-7"
+ gradientUnits="userSpaceOnUse"
+ xlink:href="#linearGradient3663" />
+ <linearGradient
+ id="linearGradient3771"
+ x1="25"
+ x2="25"
+ y1="-15"
+ y2="-13"
+ gradientUnits="userSpaceOnUse"
+ xlink:href="#linearGradient3663" />
+ <linearGradient
+ id="linearGradient3773"
+ x1="8"
+ x2="10"
+ y1="-9"
+ y2="-7"
+ gradientUnits="userSpaceOnUse"
+ xlink:href="#linearGradient3663" />
+ <linearGradient
+ id="linearGradient3775"
+ x1=".5"
+ x2="4.5"
+ y1="23"
+ y2="23"
+ gradientUnits="userSpaceOnUse"
+ xlink:href="#linearGradient3663" />
+ <linearGradient
+ id="linearGradient3905"
+ x1="25"
+ x2="25"
+ y1="-15"
+ y2="-13"
+ gradientTransform="rotate(20.08233,24.077035,8.048217)"
+ gradientUnits="userSpaceOnUse"
+ xlink:href="#linearGradient3663" />
+ <linearGradient
+ id="linearGradient3907"
+ x1="25"
+ x2="25"
+ y1="31"
+ y2="29"
+ gradientTransform="rotate(20.08233,26.147693,4.5860741)"
+ gradientUnits="userSpaceOnUse"
+ xlink:href="#linearGradient3663" />
+ <linearGradient
+ id="linearGradient3909"
+ x1=".5"
+ x2="4.5"
+ y1="23"
+ y2="23"
+ gradientTransform="rotate(20.08233,69.256873,16.048234)"
+ gradientUnits="userSpaceOnUse"
+ xlink:href="#linearGradient3663" />
+ <linearGradient
+ id="linearGradient3911"
+ x1="47"
+ x2="44"
+ y1="8"
+ y2="7"
+ gradientTransform="rotate(20.08233,24.077035,8.048217)"
+ gradientUnits="userSpaceOnUse"
+ xlink:href="#linearGradient3663" />
+ <linearGradient
+ id="linearGradient3913"
+ x1="7"
+ x2="9"
+ y1="23"
+ y2="21"
+ gradientTransform="rotate(20.08233,24.077035,8.048217)"
+ gradientUnits="userSpaceOnUse"
+ xlink:href="#linearGradient3663" />
+ <linearGradient
+ id="linearGradient3915"
+ x1="40"
+ x2="38"
+ y1="-9"
+ y2="-7"
+ gradientTransform="rotate(20.08233,24.077035,8.048217)"
+ gradientUnits="userSpaceOnUse"
+ xlink:href="#linearGradient3663" />
+ <linearGradient
+ id="linearGradient3917"
+ x1="41"
+ x2="39"
+ y1="25"
+ y2="22"
+ gradientTransform="rotate(20.08233,24.077035,8.048217)"
+ gradientUnits="userSpaceOnUse"
+ xlink:href="#linearGradient3663" />
+ <linearGradient
+ id="linearGradient3919"
+ x1="8"
+ x2="10"
+ y1="-9"
+ y2="-7"
+ gradientTransform="rotate(20.08233,24.077035,8.048217)"
+ gradientUnits="userSpaceOnUse"
+ xlink:href="#linearGradient3663" />
+ <linearGradient
+ id="linearGradient4029"
+ x1="18.647"
+ x2="25.476"
+ y1="9.3902"
+ y2="23.049"
+ gradientUnits="userSpaceOnUse">
+ <stop
+ id="stop4033"
+ style="stop-color:#fff"
+ offset="0" />
+ <stop
+ id="stop4035"
+ style="stop-color:#fff;stop-opacity:.078431"
+ offset="1" />
+ </linearGradient>
+ </defs>
+ <g
+ id="layer1"
+ transform="matrix(1.0212766,0,0,1.0212766,-0.5106384,15.829787)">
+ <path
+ id="path3889"
+ d="m 32.858,-13.282 c 0.59583,1.2826 -1.6259,1.535 -1.0301,2.8176"
+ style="fill:none;stroke:url(#linearGradient3905);stroke-width:1px;stroke-linecap:round" />
+ <path
+ id="path3891"
+ d="m 17.03,26.182 c 0.59583,1.2826 -1.6259,1.535 -1.0301,2.8176"
+ style="fill:none;stroke:url(#linearGradient3907);stroke-width:1px;stroke-linecap:round" />
+ <path
+ id="path3893"
+ d="M 2.763,-0.8602 C 4.0456,-1.45603 4.298,0.7657 5.5806,0.1699"
+ style="fill:none;stroke:url(#linearGradient3909);stroke-width:1px;stroke-linecap:round" />
+ <path
+ id="path3895"
+ d="m 43.149,13.905 c 1.2826,-0.59583 1.535,1.6259 2.8176,1.0301"
+ style="fill:none;stroke:url(#linearGradient3911);stroke-width:1px;stroke-linecap:round" />
+ <path
+ id="path3897"
+ d="m 2.3585,16.776 c 0.4856,-1.3282 2.2351,0.06428 2.7207,-1.2639"
+ style="fill:none;stroke:url(#linearGradient3913);stroke-width:1px;stroke-linecap:round" />
+ <path
+ id="path3899"
+ d="m 42.321,-1.3043 c 0.4856,-1.3282 2.2351,0.064283 2.7207,-1.2639"
+ style="fill:none;stroke:url(#linearGradient3915);stroke-width:1px;stroke-linecap:round" />
+ <path
+ id="path3901"
+ d="m 33.23,26.12 c 1.3282,0.4856 -0.06428,2.2351 1.2639,2.7207"
+ style="fill:none;stroke:url(#linearGradient3917);stroke-width:1px;stroke-linecap:round" />
+ <path
+ id="path3903"
+ d="m 14.831,-13.484 c 1.3282,0.4856 -0.06428,2.2351 1.2639,2.7207"
+ style="fill:none;stroke:url(#linearGradient3919);stroke-width:1px;stroke-linecap:round" />
+ <path
+ id="path3691"
+ d="m 25,-15 c 1,1 -1,2 0,3"
+ style="fill:none;stroke:url(#linearGradient3771);stroke-width:1px;stroke-linecap:round" />
+ <path
+ id="path3689"
+ d="m 25,28 c 1,1 -1,2 0,3"
+ style="fill:none;stroke:url(#linearGradient3763);stroke-width:1px;stroke-linecap:round" />
+ <path
+ id="path3681"
+ transform="translate(0,-16)"
+ d="m 1,23 c 1,-1 2,1 3,0"
+ style="fill:none;stroke:url(#linearGradient3775);stroke-width:1px;stroke-linecap:round" />
+ <path
+ id="path3683"
+ d="m 44,7 c 1,-1 2,1 3,0"
+ style="fill:none;stroke:url(#linearGradient3767);stroke-width:1px;stroke-linecap:round" />
+ <path
+ id="path3731"
+ d="m 8,25 c 0,-1.4142 2.1213,-0.70711 2.1213,-2.1213"
+ style="fill:none;stroke:url(#linearGradient3761);stroke-width:1px;stroke-linecap:round" />
+ <path
+ id="path3733"
+ d="m 38,-7 c 0,-1.4142 2.1213,-0.70711 2.1213,-2.1213"
+ style="fill:none;stroke:url(#linearGradient3769);stroke-width:1px;stroke-linecap:round" />
+ <path
+ id="path3735"
+ d="m 38.879,21.879 c 1.4142,0 0.70711,2.1213 2.1213,2.1213"
+ style="fill:none;stroke:url(#linearGradient3765);stroke-width:1px;stroke-linecap:round" />
+ <path
+ id="path3737"
+ d="m 8,-9 c 1.4142,0 0.70711,2.1213 2.1213,2.1213"
+ style="fill:none;stroke:url(#linearGradient3773);stroke-width:1px;stroke-linecap:round" />
+ <path
+ id="path2881"
+ transform="matrix(1.0282,0,0,1.0282,-1.19,-17.704)"
+ d="M 43.466,25 A 18.966,18.966 0 1 1 5.534,25 18.966,18.966 0 1 1 43.466,25 Z"
+ style="fill:url(#radialGradient3669);stroke:url(#linearGradient3661);stroke-width:0.97268;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10" />
+ <path
+ id="path3671"
+ transform="matrix(1.025,0,0,1.025,-1.1124,-17.625)"
+ d="M 42.462,25 A 17.962,17.962 0 1 1 6.538,25 17.962,17.962 0 1 1 42.462,25 Z"
+ style="opacity:0.3;fill:none;stroke:url(#linearGradient3679);stroke-width:0.97562;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10" />
+ <path
+ id="path4021"
+ transform="matrix(1.025,0,0,1.025,-1.1124,-17.625)"
+ d="M 6.9818,26.224 A 17.561,17.561 0 0 1 39.5848,16.009"
+ style="opacity:0.24;fill:url(#linearGradient4029)" />
+ </g>
+</svg>
diff --git a/data/icons/ayatana-indicator-display-brightness-low.svg b/data/icons/ayatana-indicator-display-brightness-low.svg
new file mode 100644
index 0000000..47a366d
--- /dev/null
+++ b/data/icons/ayatana-indicator-display-brightness-low.svg
@@ -0,0 +1,280 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ width="48px"
+ height="48px"
+ id="svg1306"
+ version="1.1"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:dc="http://purl.org/dc/elements/1.1/">
+ <defs
+ id="defs1308">
+ <linearGradient
+ id="linearGradient5199">
+ <stop
+ style="stop-color:#7e7878;stop-opacity:0.09708738;"
+ offset="0"
+ id="stop5201" />
+ <stop
+ style="stop-color:#7e7878;stop-opacity:1;"
+ offset="1"
+ id="stop5203" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient5191">
+ <stop
+ style="stop-color:#dadad9;stop-opacity:1;"
+ offset="0"
+ id="stop5193" />
+ <stop
+ style="stop-color:#dadad9;stop-opacity:0;"
+ offset="1"
+ id="stop5195" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient5164">
+ <stop
+ style="stop-color:white;stop-opacity:1;"
+ offset="0"
+ id="stop5166" />
+ <stop
+ style="stop-color:white;stop-opacity:0;"
+ offset="1"
+ id="stop5168" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient5154">
+ <stop
+ style="stop-color:#d9d8d6;stop-opacity:1;"
+ offset="0"
+ id="stop5156" />
+ <stop
+ style="stop-color:#b5b4b0;stop-opacity:1;"
+ offset="1"
+ id="stop5158" />
+ </linearGradient>
+ <linearGradient
+ id="linearGradient5138">
+ <stop
+ style="stop-color:white;stop-opacity:1;"
+ offset="0"
+ id="stop5140" />
+ <stop
+ style="stop-color:white;stop-opacity:0;"
+ offset="1"
+ id="stop5142" />
+ </linearGradient>
+ <radialGradient
+ xlink:href="#linearGradient5138"
+ id="radialGradient5144"
+ cx="23.071428"
+ cy="11.011853"
+ fx="23.071428"
+ fy="11.011853"
+ r="22.856438"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(3.373032,0,0,3.373032,-54.74925,-26.13148)" />
+ <radialGradient
+ xlink:href="#linearGradient5154"
+ id="radialGradient5160"
+ cx="23.071428"
+ cy="6.8925552"
+ fx="23.071428"
+ fy="6.8925552"
+ r="22.812966"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(1.440625,0,0,1.440625,-10.16586,-3.037035)" />
+ <radialGradient
+ xlink:href="#linearGradient5164"
+ id="radialGradient5170"
+ cx="23.688078"
+ cy="23.42804"
+ fx="23.688078"
+ fy="23.42804"
+ r="22.45064"
+ gradientUnits="userSpaceOnUse" />
+ <radialGradient
+ xlink:href="#linearGradient5191"
+ id="radialGradient5197"
+ cx="22.288452"
+ cy="34.537094"
+ fx="22.288452"
+ fy="34.537094"
+ r="9.9375"
+ gradientTransform="matrix(1.498147,0,0,1.130677,-11.10293,-5.288817)"
+ gradientUnits="userSpaceOnUse" />
+ <radialGradient
+ xlink:href="#linearGradient5199"
+ id="radialGradient5205"
+ cx="24.125"
+ cy="9.7349367"
+ fx="24.125"
+ fy="9.7349367"
+ r="15.75"
+ gradientTransform="matrix(1.652014,0,0,1.088231,-15.72984,3.156134)"
+ gradientUnits="userSpaceOnUse" />
+ </defs>
+ <metadata
+ id="metadata1311">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <cc:license
+ rdf:resource="http://creativecommons.org/licenses/GPL/2.0/" />
+ <dc:creator>
+ <cc:Agent>
+ <dc:title>Frank Solensky</dc:title>
+ </cc:Agent>
+ </dc:creator>
+ <dc:subject>
+ <rdf:Bag>
+ <rdf:li>weather</rdf:li>
+ <rdf:li>clear</rdf:li>
+ <rdf:li>night</rdf:li>
+ <rdf:li>moon</rdf:li>
+ <rdf:li>190</rdf:li>
+ </rdf:Bag>
+ </dc:subject>
+ </cc:Work>
+ <cc:License
+ rdf:about="http://creativecommons.org/licenses/GPL/2.0/">
+ <cc:permits
+ rdf:resource="http://web.resource.org/cc/Reproduction" />
+ <cc:permits
+ rdf:resource="http://web.resource.org/cc/Distribution" />
+ <cc:requires
+ rdf:resource="http://web.resource.org/cc/Notice" />
+ <cc:permits
+ rdf:resource="http://web.resource.org/cc/DerivativeWorks" />
+ <cc:requires
+ rdf:resource="http://web.resource.org/cc/ShareAlike" />
+ <cc:requires
+ rdf:resource="http://web.resource.org/cc/SourceCode" />
+ </cc:License>
+ </rdf:RDF>
+ </metadata>
+ <g
+ id="layer1">
+ <path
+ style="opacity:1;color:black;fill:url(#radialGradient5170);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
+ id="path5162"
+ d="M 46.138718 23.42804 A 22.45064 22.45064 0 1 1 1.2374382,23.42804 A 22.45064 22.45064 0 1 1 46.138718 23.42804 z"
+ transform="translate(-0.146446,0.103554)" />
+ <g
+ id="g473"
+ transform="matrix(1.4099413,0,0,1.4099413,-9.9306794,-9.8691461)">
+ <circle
+ style="color:#000000;display:inline;overflow:visible;visibility:visible;opacity:1;fill:url(#radialGradient5160);fill-opacity:1;fill-rule:evenodd;stroke:#888a85;stroke-width:1.34022;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none"
+ id="path1314"
+ transform="matrix(0.746154,0,0,0.74614,6.850475,6.75386)"
+ cx="23.071428"
+ cy="23.142857"
+ r="22.142857" />
+ <path
+ style="color:#000000;display:inline;overflow:visible;visibility:visible;opacity:0.331461;fill:url(#radialGradient5205);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none"
+ d="m 10.875,25 c 0,0 2.59375,1.21875 2.625,2.125 0.03125,0.90625 -2.3125,0.3125 -2.5,1.5 -0.1875,1.1875 0.28125,3.21875 1.75,3.25 1.46875,0.03125 1.84375,-2.4375 4.125,-3.125 2.28125,-0.6875 4,1.46875 5,0.375 1,-1.09375 -1.15625,-2.625 -1,-4.75 0.15625,-2.125 0.53125,-1.71875 1.625,-2.4375 1.09375,-0.71875 1.502992,1.722382 2.75,-0.4375 1.205084,-2.087266 -2.53125,-1.34375 -2.375,-2.75 0.15625,-1.40625 1.09375,-2.96875 3,-2.875 1.90625,0.09375 4.625,3.25 4.625,3.25 1.211141,1.165263 0.03862,3.426401 0.625,5 0.688739,1.848301 2.583333,1.742429 3.875,1.75 0,0 -1.90625,-2.15625 -1.625,-3.5 0.28125,-1.34375 1.375,-2.6875 2.75,-1.875 1.375,0.8125 2.75,5.125 2.75,5.125 l 1,-4.375 L 37.75,16 c 0,0 -3.03125,1.0625 -6.375,0.375 -3.34375,-0.6875 -3.6875,-3.28125 -7,-3.125 -3.3125,0.15625 -3.625,3.46875 -6.25,3.75 -2.625,0.28125 -3.375,-1.15625 -4.25,-2.625 -0.875,-1.46875 0.75,-3.25 0.75,-3.25 l -6.25,8.5 z"
+ id="path5152" />
+ <circle
+ style="color:#000000;display:inline;overflow:visible;visibility:visible;opacity:0.808989;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:url(#radialGradient5144);stroke-width:1.42716;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none"
+ id="path2044"
+ transform="matrix(0.700698,0,0,0.700684,7.903204,7.809815)"
+ cx="23.071428"
+ cy="23.142857"
+ r="22.142857" />
+ <path
+ style="color:#000000;display:inline;overflow:visible;visibility:visible;opacity:0.646067;fill:url(#radialGradient5197);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none"
+ d="m 22.625,27 c 0.382135,1.589327 0.877663,2.611683 1.375,3.625 1.554528,-0.140944 2.793411,-0.913178 4,-1.75 -0.722958,1.508785 -1.57191,2.933575 -2.647748,4.207107 2.265966,0.881285 4.366558,0.687649 6.397748,0.04289 -1.425295,1.193408 -2.806745,2.114638 -5.713388,2.396447 2.098208,0.63309 4.423779,1.361637 7.338388,0.478553 -2.676882,1.546397 -5.487958,2.71705 -8.75,2.625 l 3.228553,-0.0455 L 21.375,38.875 18,38.25 l 0.125,-1.5 c -1.411308,0.157149 -2.980215,-0.631292 -4.5,-1.125 1.3655,-0.605625 2.832606,-1.084243 3.75,-2.25 -1.775426,-0.349574 -2.622157,-1.627843 -3.875,-2.5 1.666662,0.25003 3.209775,1.241351 5,0.75 -0.935272,-2.583333 -0.823175,-5.166667 -1.125,-7.75 1.020975,2.208333 1.685572,4.416667 3.125,6.625 0.960276,-0.725767 1.635647,-1.950117 2.125,-3.5 z"
+ id="path5150" />
+ <circle
+ style="color:#000000;display:inline;overflow:visible;visibility:visible;opacity:0.331461;fill:#bbbbb8;fill-opacity:1;fill-rule:evenodd;stroke:#888984;stroke-width:1.1547;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none"
+ id="path4263"
+ transform="matrix(1,0,0,0.75,0,8.769607)"
+ cx="21.625"
+ cy="34.5"
+ r="2.25" />
+ <ellipse
+ style="color:#000000;display:inline;overflow:visible;visibility:visible;opacity:0.719101;fill:#b2afad;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none"
+ id="path5207"
+ cx="22.375"
+ cy="21.75"
+ rx="2.625"
+ ry="2.3125" />
+ <ellipse
+ id="path5209"
+ style="color:#000000;display:inline;overflow:visible;visibility:visible;opacity:0.719101;fill:#b2afad;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none"
+ transform="matrix(1.22619,0,0,1.22619,-10.09226,-10.31771)"
+ cx="22.375"
+ cy="21.75"
+ rx="2.625"
+ ry="2.3125" />
+ <ellipse
+ transform="matrix(1.060177,0.61609,-0.61609,1.060177,4.459731,-11.05444)"
+ style="color:#000000;display:inline;overflow:visible;visibility:visible;opacity:0.719101;fill:#b2afad;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none"
+ id="path5211"
+ cx="22.375"
+ cy="21.75"
+ rx="2.625"
+ ry="2.3125" />
+ <ellipse
+ transform="matrix(0.398445,0.375367,-0.217478,0.387667,31.50244,6.347965)"
+ style="color:#000000;display:inline;overflow:visible;visibility:visible;opacity:0.719101;fill:#dfdedc;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none"
+ id="path5213"
+ cx="22.375"
+ cy="21.75"
+ rx="2.625"
+ ry="2.3125" />
+ <ellipse
+ id="path5215"
+ style="color:#000000;display:inline;overflow:visible;visibility:visible;opacity:0.719101;fill:#dfdedc;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none"
+ transform="matrix(-0.09424576,0.266814,-0.228734,-0.0218427,38.6609,29.47153)"
+ cx="22.375"
+ cy="21.75"
+ rx="2.625"
+ ry="2.3125" />
+ <ellipse
+ transform="matrix(0.211478,0.199229,-0.115428,0.205758,34.19839,11.49557)"
+ style="color:#000000;display:inline;overflow:visible;visibility:visible;opacity:0.719101;fill:#dfdedc;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none"
+ id="path5217"
+ cx="22.375"
+ cy="21.75"
+ rx="2.625"
+ ry="2.3125" />
+ <ellipse
+ id="path5219"
+ style="color:#000000;display:inline;overflow:visible;visibility:visible;opacity:0.719101;fill:#f7f7f6;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none"
+ transform="matrix(0.502196,-0.217849,0.270291,0.352881,2.662133,8.622118)"
+ cx="22.375"
+ cy="21.75"
+ rx="2.625"
+ ry="2.3125" />
+ <ellipse
+ transform="matrix(0.301729,-0.130888,0.162396,0.212018,12.27059,8.635285)"
+ style="color:#000000;display:inline;overflow:visible;visibility:visible;opacity:0.719101;fill:#f7f7f6;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none"
+ id="path5221"
+ cx="22.375"
+ cy="21.75"
+ rx="2.625"
+ ry="2.3125" />
+ <ellipse
+ id="path5223"
+ style="color:#000000;display:inline;overflow:visible;visibility:visible;opacity:0.719101;fill:#f7f7f6;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none"
+ transform="matrix(0.212633,-0.09223866,0.114443,0.149412,14.87145,10.98834)"
+ cx="22.375"
+ cy="21.75"
+ rx="2.625"
+ ry="2.3125" />
+ <path
+ style="opacity:0.25;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1"
+ id="shadow"
+ d="m 24.1,39 c 8.295317,0 15.02,-6.724683 15.02,-15.02 0,-8.295317 -6.724683,-15.02 -15.02,-15.02 8.169292,0 14.791812,6.724683 14.791812,15.02 0,8.295317 -6.62252,15.02 -14.791812,15.02 z" />
+ </g>
+ </g>
+</svg>
diff --git a/data/org.ayatana.indicator.display.gschema.xml b/data/org.ayatana.indicator.display.gschema.xml
index 3483d06..3a0c89b 100644
--- a/data/org.ayatana.indicator.display.gschema.xml
+++ b/data/org.ayatana.indicator.display.gschema.xml
@@ -31,5 +31,11 @@
<summary>Color temperature profile</summary>
<description>The current color temperature profile being used by the indicator.</description>
</key>
+ <key name="brightness" type="d">
+ <range min="0.5" max="1.0"/>
+ <default>1.0</default>
+ <summary>Screen brightness</summary>
+ <description>Stores the current brightness value of your screen.</description>
+ </key>
</schema>
</schemalist>
diff --git a/debian/control b/debian/control
index df5c26c..2bf8004 100644
--- a/debian/control
+++ b/debian/control
@@ -40,7 +40,7 @@ Depends: ${shlibs:Depends},
ayatana-indicator-common,
libglib2.0-bin,
libgeoclue-2-0,
- xsct,
+ xsct (>= 1.9),
Description: Ayatana Indicator for Display configuration
This Ayatana Indicator is designed to be placed on the right side of a
panel and give the user easy control for changing their display settings.
diff --git a/src/rotation-lock.cpp b/src/rotation-lock.cpp
index 9864744..9523358 100644
--- a/src/rotation-lock.cpp
+++ b/src/rotation-lock.cpp
@@ -127,7 +127,7 @@ public:
if (sTest == NULL || !g_str_equal (sTest, "rotation-lock-test"))
{
- gclue_simple_new_with_thresholds ("ayatana-indicator-display", GCLUE_ACCURACY_LEVEL_CITY, 0, 0, NULL, onGeoClueLoaded, this);
+ gclue_simple_new ("ayatana-indicator-display", GCLUE_ACCURACY_LEVEL_CITY, NULL, onGeoClueLoaded, this);
}
GVariant *pProfile = g_settings_get_value (this->m_settings, "color-temp-profile");
@@ -172,6 +172,8 @@ private:
guint nTemperature = 6500;
GVariant *pProfile = g_settings_get_value (pImpl->m_settings, "color-temp-profile");
guint nProfile = g_variant_get_uint16 (pProfile);
+ GVariant *pBrightness = g_settings_get_value (pImpl->m_settings, "brightness");
+ gdouble fBrightness = g_variant_get_double (pBrightness);
if (nProfile == 0)
{
@@ -206,7 +208,7 @@ private:
g_action_change_state (pAction, pTemperature);
GError *pError = NULL;
- gchar *sCommand = g_strdup_printf ("xsct %u", nTemperature);
+ gchar *sCommand = g_strdup_printf ("xsct %u %f", nTemperature, fBrightness);
gboolean bSuccess = g_spawn_command_line_sync (sCommand, NULL, NULL, NULL, &pError);
if (!bSuccess)
@@ -224,7 +226,7 @@ private:
{
RotationLockIndicator::Impl *pImpl = (RotationLockIndicator::Impl*) pData;
GError *pError = NULL;
- GClueSimple *pSimple = gclue_simple_new_with_thresholds_finish (pResult, &pError);
+ GClueSimple *pSimple = gclue_simple_new_finish (pResult, &pError);
if (pError != NULL)
{
@@ -248,6 +250,11 @@ private:
updateColorTemp (pData);
}
+ static void onBrightnessSettings (GSettings *pSettings, const gchar *sKey, gpointer pData)
+ {
+ updateColorTemp (pData);
+ }
+
static void onColorTempProfile (GSettings *pSettings, const gchar *sKey, gpointer pData)
{
RotationLockIndicator::Impl *pImpl = (RotationLockIndicator::Impl*) pData;
@@ -374,6 +381,14 @@ private:
g_action_map_add_action(G_ACTION_MAP(group), G_ACTION(action));
g_object_unref(G_OBJECT(action));
g_signal_connect (m_settings, "changed::color-temp-profile", G_CALLBACK (onColorTempProfile), this);
+
+ pVariantType = g_variant_type_new("d");
+ action = g_simple_action_new_stateful ("brightness", pVariantType, g_variant_new_double (0));
+ g_variant_type_free(pVariantType);
+ g_settings_bind_with_mapping (m_settings, "brightness", action, "state", G_SETTINGS_BIND_DEFAULT, settings_to_action_state, action_state_to_settings, NULL, NULL);
+ g_action_map_add_action (G_ACTION_MAP (group), G_ACTION (action));
+ g_object_unref (G_OBJECT (action));
+ g_signal_connect (m_settings, "changed::brightness", G_CALLBACK (onBrightnessSettings), this);
}
#endif
@@ -450,10 +465,25 @@ private:
{
#ifdef COLOR_TEMP_ENABLED
section = g_menu_new ();
- GIcon *pIconMin = g_themed_icon_new_with_default_fallbacks ("ayatana-indicator-display-colortemp-on");
- GIcon *pIconMax = g_themed_icon_new_with_default_fallbacks ("ayatana-indicator-display-colortemp-off");
+
+ GIcon *pIconMin = g_themed_icon_new_with_default_fallbacks ("ayatana-indicator-display-brightness-low");
+ GIcon *pIconMax = g_themed_icon_new_with_default_fallbacks ("ayatana-indicator-display-brightness-high");
GVariant *pIconMinSerialised = g_icon_serialize (pIconMin);
GVariant *pIconMaxSerialised = g_icon_serialize (pIconMax);
+ menu_item = g_menu_item_new (_("Brightness"), "indicator.brightness");
+ g_menu_item_set_attribute (menu_item, "x-ayatana-type", "s", "org.ayatana.indicator.slider");
+ g_menu_item_set_attribute (menu_item, "x-ayatana-type", "s", "org.ayatana.indicator.slider");
+ g_menu_item_set_attribute_value (menu_item, "min-icon", pIconMinSerialised);
+ g_menu_item_set_attribute_value (menu_item, "max-icon", pIconMaxSerialised);
+ g_menu_item_set_attribute (menu_item, "min-value", "d", 0.5);
+ g_menu_item_set_attribute (menu_item, "max-value", "d", 1.0);
+ g_menu_item_set_attribute (menu_item, "step", "d", 0.005);
+ g_menu_append_item (section, menu_item);
+
+ pIconMin = g_themed_icon_new_with_default_fallbacks ("ayatana-indicator-display-colortemp-on");
+ pIconMax = g_themed_icon_new_with_default_fallbacks ("ayatana-indicator-display-colortemp-off");
+ pIconMinSerialised = g_icon_serialize (pIconMin);
+ pIconMaxSerialised = g_icon_serialize (pIconMax);
menu_item = g_menu_item_new (_("Color temperature"), "indicator.color-temp");
g_menu_item_set_attribute (menu_item, "x-ayatana-type", "s", "org.ayatana.indicator.slider");
g_menu_item_set_attribute (menu_item, "x-ayatana-type", "s", "org.ayatana.indicator.slider");