mirror of
https://github.com/purhan/dotfiles.git
synced 2026-02-03 19:45:44 +08:00
first commit
This commit is contained in:
commit
a6c665c17f
619 changed files with 21468 additions and 0 deletions
1
RICE/redhound/widget/README.md
Normal file
1
RICE/redhound/widget/README.md
Normal file
|
|
@ -0,0 +1 @@
|
|||
## Widget
|
||||
5
RICE/redhound/widget/battery/icons/battery-10.svg
Normal file
5
RICE/redhound/widget/battery/icons/battery-10.svg
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="full" width="240" height="240" viewBox="0 0 24.00 24.00" enable-background="new 0 0 24.00 24.00" xml:space="preserve">
|
||||
<path fill="#FFFFFF" fill-opacity="1" stroke-width="0.2" stroke-linejoin="round" d="M 15.9993,17.9982L 7.99999,18L 7.9994,5.99805L 15.9994,5.99805M 16.6664,3.99805L 14.9994,3.99805L 14.9994,1.99805L 8.9994,1.99805L 8.9994,3.99805L 7.33239,3.99805C 6.59608,3.99805 5.9994,4.59503 5.9994,5.33105L 5.9994,20.665C 5.9994,21.4011 6.59608,21.998 7.33239,21.998L 16.6664,21.998C 17.4027,21.998 17.9994,21.4011 17.9994,20.665L 17.9994,5.33105C 17.9994,4.59503 17.4027,3.99805 16.6664,3.99805 Z "/>
|
||||
</svg>
|
||||
5
RICE/redhound/widget/battery/icons/battery-20.svg
Normal file
5
RICE/redhound/widget/battery/icons/battery-20.svg
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="full" width="240" height="240" viewBox="0 0 24.00 24.00" enable-background="new 0 0 24.00 24.00" xml:space="preserve">
|
||||
<path fill="#FFFFFF" fill-opacity="1" stroke-width="0.2" stroke-linejoin="round" d="M 15.9994,16.998L 7.9994,16.998L 7.9994,5.99805L 15.9994,5.99805M 16.6664,3.99805L 14.9994,3.99805L 14.9994,1.99805L 8.9994,1.99805L 8.9994,3.99805L 7.33239,3.99805C 6.59608,3.99805 5.9994,4.59503 5.9994,5.33105L 5.9994,20.665C 5.9994,21.4011 6.59608,21.998 7.33239,21.998L 16.6664,21.998C 17.4027,21.998 17.9994,21.4011 17.9994,20.665L 17.9994,5.33105C 17.9994,4.59503 17.4027,3.99805 16.6664,3.99805 Z "/>
|
||||
</svg>
|
||||
5
RICE/redhound/widget/battery/icons/battery-30.svg
Normal file
5
RICE/redhound/widget/battery/icons/battery-30.svg
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="full" width="240" height="240" viewBox="0 0 24.00 24.00" enable-background="new 0 0 24.00 24.00" xml:space="preserve">
|
||||
<path fill="#FFFFFF" fill-opacity="1" stroke-width="0.2" stroke-linejoin="round" d="M 15.9994,14.998L 7.9994,14.998L 7.9994,5.99805L 15.9994,5.99805M 16.6664,3.99805L 14.9994,3.99805L 14.9994,1.99805L 8.9994,1.99805L 8.9994,3.99805L 7.33239,3.99805C 6.59608,3.99805 5.9994,4.59503 5.9994,5.33105L 5.9994,20.665C 5.9994,21.4011 6.59608,21.998 7.33239,21.998L 16.6664,21.998C 17.4027,21.998 17.9994,21.4011 17.9994,20.665L 17.9994,5.33105C 17.9994,4.59503 17.4027,3.99805 16.6664,3.99805 Z "/>
|
||||
</svg>
|
||||
5
RICE/redhound/widget/battery/icons/battery-40.svg
Normal file
5
RICE/redhound/widget/battery/icons/battery-40.svg
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="full" width="240" height="240" viewBox="0 0 24.00 24.00" enable-background="new 0 0 24.00 24.00" xml:space="preserve">
|
||||
<path fill="#FFFFFF" fill-opacity="1" stroke-width="0.2" stroke-linejoin="round" d="M 16,14L 7.99998,14L 7.99939,5.99805L 15.9994,5.99805M 16.6664,3.99805L 14.9994,3.99805L 14.9994,1.99805L 8.99939,1.99805L 8.99939,3.99805L 7.33238,3.99805C 6.59607,3.99805 5.99939,4.59503 5.99939,5.33105L 5.99939,20.665C 5.99939,21.4011 6.59607,21.998 7.33238,21.998L 16.6664,21.998C 17.4027,21.998 17.9994,21.4011 17.9994,20.665L 17.9994,5.33105C 17.9994,4.59503 17.4027,3.99805 16.6664,3.99805 Z "/>
|
||||
</svg>
|
||||
5
RICE/redhound/widget/battery/icons/battery-50.svg
Normal file
5
RICE/redhound/widget/battery/icons/battery-50.svg
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="full" width="240" height="240" viewBox="0 0 24.00 24.00" enable-background="new 0 0 24.00 24.00" xml:space="preserve">
|
||||
<path fill="#FFFFFF" fill-opacity="1" stroke-width="0.2" stroke-linejoin="round" d="M 16,13L 7.99998,13L 7.99939,5.99805L 15.9994,5.99805M 16.6664,3.99805L 14.9994,3.99805L 14.9994,1.99805L 8.99939,1.99805L 8.99939,3.99805L 7.33238,3.99805C 6.59607,3.99805 5.99939,4.59503 5.99939,5.33105L 5.99939,20.665C 5.99939,21.4011 6.59607,21.998 7.33238,21.998L 16.6664,21.998C 17.4027,21.998 17.9994,21.4011 17.9994,20.665L 17.9994,5.33105C 17.9994,4.59503 17.4027,3.99805 16.6664,3.99805 Z "/>
|
||||
</svg>
|
||||
5
RICE/redhound/widget/battery/icons/battery-60.svg
Normal file
5
RICE/redhound/widget/battery/icons/battery-60.svg
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="full" width="240" height="240" viewBox="0 0 24.00 24.00" enable-background="new 0 0 24.00 24.00" xml:space="preserve">
|
||||
<path fill="#FFFFFF" fill-opacity="1" stroke-width="0.2" stroke-linejoin="round" d="M 15.9993,11.9982L 7.99935,11.9982L 7.99941,5.99805L 15.9994,5.99805M 16.6664,3.99805L 14.9994,3.99805L 14.9994,1.99805L 8.99941,1.99805L 8.99941,3.99805L 7.3324,3.99805C 6.59609,3.99805 5.99941,4.59503 5.99941,5.33105L 5.99941,20.665C 5.99941,21.4011 6.59609,21.998 7.3324,21.998L 16.6664,21.998C 17.4027,21.998 17.9994,21.4011 17.9994,20.665L 17.9994,5.33105C 17.9994,4.59503 17.4027,3.99805 16.6664,3.99805 Z "/>
|
||||
</svg>
|
||||
5
RICE/redhound/widget/battery/icons/battery-70.svg
Normal file
5
RICE/redhound/widget/battery/icons/battery-70.svg
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="full" width="240" height="240" viewBox="0 0 24.00 24.00" enable-background="new 0 0 24.00 24.00" xml:space="preserve">
|
||||
<path fill="#FFFFFF" fill-opacity="1" stroke-width="0.2" stroke-linejoin="round" d="M 15.9993,9.99817L 7.99927,9.99817L 7.99939,5.99805L 15.9994,5.99805M 16.6664,3.99805L 14.9994,3.99805L 14.9994,1.99805L 8.99939,1.99805L 8.99939,3.99805L 7.33238,3.99805C 6.59607,3.99805 5.99939,4.59503 5.99939,5.33105L 5.99939,20.665C 5.99939,21.4011 6.59607,21.998 7.33238,21.998L 16.6664,21.998C 17.4024,21.998 17.9994,21.4011 17.9994,20.665L 17.9994,5.33105C 17.9994,4.59503 17.4024,3.99805 16.6664,3.99805 Z "/>
|
||||
</svg>
|
||||
5
RICE/redhound/widget/battery/icons/battery-80.svg
Normal file
5
RICE/redhound/widget/battery/icons/battery-80.svg
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="full" width="240" height="240" viewBox="0 0 24.00 24.00" enable-background="new 0 0 24.00 24.00" xml:space="preserve">
|
||||
<path fill="#FFFFFF" fill-opacity="1" stroke-width="0.2" stroke-linejoin="round" d="M 15.9994,8.99805L 7.99939,8.99805L 7.99939,5.99805L 15.9994,5.99805M 16.6664,3.99805L 14.9994,3.99805L 14.9994,1.99805L 8.99939,1.99805L 8.99939,3.99805L 7.33238,3.99805C 6.59607,3.99805 5.99939,4.59503 5.99939,5.33105L 5.99939,20.665C 5.99939,21.4011 6.59607,21.998 7.33238,21.998L 16.6664,21.998C 17.4024,21.998 17.9994,21.4011 17.9994,20.665L 17.9994,5.33105C 17.9994,4.59503 17.4024,3.99805 16.6664,3.99805 Z "/>
|
||||
</svg>
|
||||
5
RICE/redhound/widget/battery/icons/battery-90.svg
Normal file
5
RICE/redhound/widget/battery/icons/battery-90.svg
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="full" width="240" height="240" viewBox="0 0 24.00 24.00" enable-background="new 0 0 24.00 24.00" xml:space="preserve">
|
||||
<path fill="#FFFFFF" fill-opacity="1" stroke-width="0.2" stroke-linejoin="round" d="M 15.9994,7.99805L 7.99939,7.99805L 7.99939,5.99805L 15.9994,5.99805M 16.6664,3.99805L 14.9994,3.99805L 14.9994,1.99805L 8.99939,1.99805L 8.99939,3.99805L 7.3324,3.99805C 6.59637,3.99805 5.99939,4.59503 5.99939,5.33105L 5.99939,20.665C 5.99939,21.4011 6.59637,21.998 7.3324,21.998L 16.6664,21.998C 17.4024,21.998 17.9994,21.4011 17.9994,20.665L 17.9994,5.33105C 17.9994,4.59503 17.4024,3.99805 16.6664,3.99805 Z "/>
|
||||
</svg>
|
||||
5
RICE/redhound/widget/battery/icons/battery-alert.svg
Normal file
5
RICE/redhound/widget/battery/icons/battery-alert.svg
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="full" width="96" height="96" viewBox="0 0 24.00 24.00" enable-background="new 0 0 24.00 24.00" xml:space="preserve">
|
||||
<path fill="#FFFFFF" fill-opacity="1" stroke-width="0.2" stroke-linejoin="round" d="M 12.9994,13.998L 10.9994,13.998L 10.9994,8.99805L 12.9994,8.99805M 12.9994,17.998L 10.9994,17.998L 10.9994,15.998L 12.9994,15.998M 16.6664,3.99805L 14.9994,3.99805L 14.9994,1.99805L 8.99939,1.99805L 8.99939,3.99805L 7.3324,3.99805C 6.59637,3.99805 5.99939,4.59503 5.99939,5.33105L 5.99939,20.665C 5.99939,21.4011 6.59637,21.998 7.3324,21.998L 16.6664,21.998C 17.4024,21.998 17.9994,21.4011 17.9994,20.665L 17.9994,5.33105C 17.9994,4.59503 17.4024,3.99805 16.6664,3.99805 Z "/>
|
||||
</svg>
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="full" width="240" height="240" viewBox="0 0 24.00 24.00" enable-background="new 0 0 24.00 24.00" xml:space="preserve">
|
||||
<path fill="#FFFFFF" fill-opacity="1" stroke-width="0.2" stroke-linejoin="round" d="M 23.0503,10.998L 20.0503,10.998L 20.0503,3.99805L 15.0503,13.998L 18.0503,13.998L 18.0503,21.998M 12,18L 3.99997,18L 4.05029,5.99805L 12.0503,5.99805M 12.7173,3.99805L 11.0503,3.99805L 11.0503,1.99805L 5.05029,1.99805L 5.05029,3.99805L 3.3833,3.99805C 2.64728,3.99805 2.05029,4.59503 2.05029,5.33105L 2.05029,20.665C 2.05029,21.4011 2.64728,21.998 3.3833,21.998L 12.7173,21.998C 13.4533,21.998 14.0503,21.4011 14.0503,20.665L 14.0503,5.33105C 14.0503,4.59503 13.4533,3.99805 12.7173,3.99805 Z "/>
|
||||
</svg>
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="full" width="240" height="240" viewBox="0 0 24.00 24.00" enable-background="new 0 0 24.00 24.00" xml:space="preserve">
|
||||
<path fill="#FFFFFF" fill-opacity="1" stroke-width="0.2" stroke-linejoin="round" d="M 22.9994,10.998L 19.9994,10.998L 19.9994,3.99805L 14.9994,13.998L 17.9994,13.998L 17.9994,21.998M 12.6664,3.99805L 10.9994,3.99805L 10.9994,1.99805L 4.99939,1.99805L 4.99939,3.99805L 3.3324,3.99805C 2.59637,3.99805 1.99939,4.59503 1.99939,5.33105L 1.99939,20.665C 1.99939,21.4011 2.59637,21.998 3.3324,21.998L 12.6664,21.998C 13.4024,21.998 13.9994,21.4011 13.9994,20.665L 13.9994,5.33105C 13.9994,4.59503 13.4024,3.99805 12.6664,3.99805 Z "/>
|
||||
</svg>
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="full" width="240" height="240" viewBox="0 0 24.00 24.00" enable-background="new 0 0 24.00 24.00" xml:space="preserve">
|
||||
<path fill="#FFFFFF" fill-opacity="1" stroke-width="0.2" stroke-linejoin="round" d="M 23.0503,10.998L 20.0503,10.998L 20.0503,3.99805L 15.0503,13.998L 18.0503,13.998L 18.0503,21.998M 12.0503,16.998L 4.05029,16.998L 4.05029,5.99805L 12.0503,5.99805M 12.7173,3.99805L 11.0503,3.99805L 11.0503,1.99805L 5.05029,1.99805L 5.05029,3.99805L 3.3833,3.99805C 2.64728,3.99805 2.05029,4.59503 2.05029,5.33105L 2.05029,20.665C 2.05029,21.4011 2.64728,21.998 3.3833,21.998L 12.7173,21.998C 13.4533,21.998 14.0503,21.4011 14.0503,20.665L 14.0503,5.33105C 14.0503,4.59503 13.4533,3.99805 12.7173,3.99805 Z "/>
|
||||
</svg>
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="full" width="240" height="240" viewBox="0 0 24.00 24.00" enable-background="new 0 0 24.00 24.00" xml:space="preserve">
|
||||
<path fill="#FFFFFF" fill-opacity="1" stroke-width="0.2" stroke-linejoin="round" d="M 11.9994,14.998L 3.99939,14.998L 3.99939,5.99805L 11.9994,5.99805M 12.6664,3.99805L 10.9994,3.99805L 10.9994,1.99805L 4.99939,1.99805L 4.99939,3.99805L 3.3324,3.99805C 2.59637,3.99805 1.99939,4.59503 1.99939,5.33105L 1.99939,20.665C 1.99939,21.4011 2.59637,21.998 3.3324,21.998L 12.6664,21.998C 13.4024,21.998 13.9994,21.4011 13.9994,20.665L 13.9994,5.33105C 13.9994,4.59503 13.4024,3.99805 12.6664,3.99805 Z M 22.9994,10.998L 19.9994,10.998L 19.9994,3.99805L 14.9994,13.998L 17.9994,13.998L 17.9994,21.998L 22.9994,10.998 Z "/>
|
||||
</svg>
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="full" width="240" height="240" viewBox="0 0 24.00 24.00" enable-background="new 0 0 24.00 24.00" xml:space="preserve">
|
||||
<path fill="#FFFFFF" fill-opacity="1" stroke-width="0.2" stroke-linejoin="round" d="M 22.9994,10.998L 19.9994,10.998L 19.9994,3.99805L 14.9994,13.998L 17.9994,13.998L 17.9994,21.998M 11.9994,12.998L 3.99939,12.998L 3.99939,5.99805L 11.9994,5.99805M 12.6664,3.99805L 10.9994,3.99805L 10.9994,1.99805L 4.99939,1.99805L 4.99939,3.99805L 3.3324,3.99805C 2.59637,3.99805 1.99939,4.59503 1.99939,5.33105L 1.99939,20.665C 1.99939,21.4011 2.59637,21.998 3.3324,21.998L 12.6664,21.998C 13.4024,21.998 13.9994,21.4011 13.9994,20.665L 13.9994,5.33105C 13.9994,4.59503 13.4024,3.99805 12.6664,3.99805 Z "/>
|
||||
</svg>
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="full" width="240" height="240" viewBox="0 0 24.00 24.00" enable-background="new 0 0 24.00 24.00" xml:space="preserve">
|
||||
<path fill="#FFFFFF" fill-opacity="1" stroke-width="0.2" stroke-linejoin="round" d="M 22.9994,10.998L 19.9994,10.998L 19.9994,3.99805L 14.9994,13.998L 17.9994,13.998L 17.9994,21.998M 11.9994,12.998L 3.99939,12.998L 3.99939,5.99805L 11.9994,5.99805M 12.6664,3.99805L 10.9994,3.99805L 10.9994,1.99805L 4.99939,1.99805L 4.99939,3.99805L 3.3324,3.99805C 2.59637,3.99805 1.99939,4.59503 1.99939,5.33105L 1.99939,20.665C 1.99939,21.4011 2.59637,21.998 3.3324,21.998L 12.6664,21.998C 13.4024,21.998 13.9994,21.4011 13.9994,20.665L 13.9994,5.33105C 13.9994,4.59503 13.4024,3.99805 12.6664,3.99805 Z "/>
|
||||
</svg>
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="full" width="240" height="240" viewBox="0 0 24.00 24.00" enable-background="new 0 0 24.00 24.00" xml:space="preserve">
|
||||
<path fill="#FFFFFF" fill-opacity="1" stroke-width="0.2" stroke-linejoin="round" d="M 11.9994,10.998L 3.99943,10.998L 3.99943,5.99805L 11.9994,5.99805M 12.6664,3.99805L 10.9994,3.99805L 10.9994,1.99805L 4.99943,1.99805L 4.99943,3.99805L 3.33244,3.99805C 2.59642,3.99805 1.99943,4.59503 1.99943,5.33105L 1.99943,20.665C 1.99943,21.4011 2.59642,21.998 3.33244,21.998L 12.6664,21.998C 13.4024,21.998 13.9994,21.4011 13.9994,20.665L 13.9994,5.33105C 13.9994,4.59503 13.4024,3.99805 12.6664,3.99805 Z M 22.9994,10.998L 19.9994,10.998L 19.9994,3.99805L 14.9994,13.998L 17.9994,13.998L 17.9994,21.998L 22.9994,10.998 Z "/>
|
||||
</svg>
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="full" width="240" height="240" viewBox="0 0 24.00 24.00" enable-background="new 0 0 24.00 24.00" xml:space="preserve">
|
||||
<path fill="#FFFFFF" fill-opacity="1" stroke-width="0.2" stroke-linejoin="round" d="M 12,10L 3.99998,10L 3.99943,5.99805L 11.9994,5.99805M 12.6664,3.99805L 10.9994,3.99805L 10.9994,1.99805L 4.99943,1.99805L 4.99943,3.99805L 3.33244,3.99805C 2.59642,3.99805 1.99943,4.59503 1.99943,5.33105L 1.99943,20.665C 1.99943,21.4011 2.59642,21.998 3.33244,21.998L 12.6664,21.998C 13.4024,21.998 13.9994,21.4011 13.9994,20.665L 13.9994,5.33105C 13.9994,4.59503 13.4024,3.99805 12.6664,3.99805 Z M 22.9994,10.998L 19.9994,10.998L 19.9994,3.99805L 14.9994,13.998L 17.9994,13.998L 17.9994,21.998L 22.9994,10.998 Z "/>
|
||||
</svg>
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="full" width="240" height="240" viewBox="0 0 24.00 24.00" enable-background="new 0 0 24.00 24.00" xml:space="preserve">
|
||||
<path fill="#FFFFFF" fill-opacity="1" stroke-width="0.2" stroke-linejoin="round" d="M 22.9994,10.998L 19.9994,10.998L 19.9994,3.99805L 14.9994,13.998L 17.9994,13.998L 17.9994,21.998M 11.9994,8.99805L 3.99939,8.99805L 3.99939,5.99805L 11.9994,5.99805M 12.6664,3.99805L 10.9994,3.99805L 10.9994,1.99805L 4.99939,1.99805L 4.99939,3.99805L 3.3324,3.99805C 2.59637,3.99805 1.99939,4.59503 1.99939,5.33105L 1.99939,20.665C 1.99939,21.4011 2.59637,21.998 3.3324,21.998L 12.6664,21.998C 13.4024,21.998 13.9994,21.4011 13.9994,20.665L 13.9994,5.33105C 13.9994,4.59503 13.4024,3.99805 12.6664,3.99805 Z "/>
|
||||
</svg>
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="full" width="240" height="240" viewBox="0 0 24.00 24.00" enable-background="new 0 0 24.00 24.00" xml:space="preserve">
|
||||
<path fill="#FFFFFF" fill-opacity="1" stroke-width="0.2" stroke-linejoin="round" d="M 22.9994,10.998L 19.9994,10.998L 19.9994,3.99805L 14.9994,13.998L 17.9994,13.998L 17.9994,21.998M 11.9994,7.99805L 3.99939,7.99805L 3.99939,5.99805L 11.9994,5.99805M 12.6664,3.99805L 10.9994,3.99805L 10.9994,1.99805L 4.99939,1.99805L 4.99939,3.99805L 3.3324,3.99805C 2.59637,3.99805 1.99939,4.59503 1.99939,5.33105L 1.99939,20.665C 1.99939,21.4011 2.59637,21.998 3.3324,21.998L 12.6664,21.998C 13.4024,21.998 13.9994,21.4011 13.9994,20.665L 13.9994,5.33105C 13.9994,4.59503 13.4024,3.99805 12.6664,3.99805 Z "/>
|
||||
</svg>
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="full" width="240" height="240" viewBox="0 0 24.00 24.00" enable-background="new 0 0 24.00 24.00" xml:space="preserve">
|
||||
<path fill="#FFFFFF" fill-opacity="1" stroke-width="0.2" stroke-linejoin="round" d="M 23.0503,10.998L 20.0503,10.998L 20.0503,3.99805L 15.0503,13.998L 18.0503,13.998L 18.0503,21.998M 12,20L 3.99997,20L 4.05029,5.99805L 12.0503,5.99805M 12.7173,3.99805L 11.0503,3.99805L 11.0503,1.99805L 5.05029,1.99805L 5.05029,3.99805L 3.3833,3.99805C 2.64728,3.99805 2.05029,4.59503 2.05029,5.33105L 2.05029,20.665C 2.05029,21.4011 2.64728,21.998 3.3833,21.998L 12.7173,21.998C 13.4533,21.998 14.0503,21.4011 14.0503,20.665L 14.0503,5.33105C 14.0503,4.59503 13.4533,3.99805 12.7173,3.99805 Z "/>
|
||||
</svg>
|
||||
5
RICE/redhound/widget/battery/icons/battery-charging.svg
Normal file
5
RICE/redhound/widget/battery/icons/battery-charging.svg
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="full" width="240" height="240" viewBox="0 0 24.00 24.00" enable-background="new 0 0 24.00 24.00" xml:space="preserve">
|
||||
<path fill="#FFFFFF" fill-opacity="1" stroke-width="0.2" stroke-linejoin="round" d="M 16.6688,3.99875L 14.9987,3.99875L 14.9987,2.0025L 9,2.0025L 9,3.99875L 7.33,3.99875C 6.59751,3.99875 6.0025,4.6 6.0025,5.3325L 6.0025,20.6588C 6.0025,21.4012 6.59751,22.0025 7.33,22.0025L 16.6588,22.0025C 17.4012,22.0025 18.0025,21.4012 18.0025,20.6687L 18.0025,5.3325C 18.0025,4.6 17.4012,3.99875 16.6688,3.99875 Z M 11.0013,20L 11.0013,14.5025L 8.99875,14.5025L 12.9975,7.0025L 12.9975,12.5L 15,12.5"/>
|
||||
</svg>
|
||||
5
RICE/redhound/widget/battery/icons/battery-minus.svg
Normal file
5
RICE/redhound/widget/battery/icons/battery-minus.svg
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="full" width="240" height="240" viewBox="0 0 24.00 24.00" enable-background="new 0 0 24.00 24.00" xml:space="preserve">
|
||||
<path fill="#FFFFFF" fill-opacity="1" stroke-width="0.2" stroke-linejoin="round" d="M 16.6664,3.99805C 17.4027,3.99805 17.9994,4.59505 17.9994,5.33105L 17.9994,20.665C 17.9994,21.401 17.4027,21.998 16.6664,21.998L 7.33239,21.998C 6.59608,21.998 5.9994,21.401 5.9994,20.665L 5.9994,5.33105C 5.9994,4.59505 6.59608,3.99805 7.33239,3.99805L 8.9994,3.99805L 9,2L 14.9994,1.99805L 14.9994,3.99805L 16.6664,3.99805 Z M 8,12.0001L 8,14.0001L 16,14.0001L 16,12.0001"/>
|
||||
</svg>
|
||||
5
RICE/redhound/widget/battery/icons/battery-negative.svg
Normal file
5
RICE/redhound/widget/battery/icons/battery-negative.svg
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="full" width="240" height="240" viewBox="0 0 24.00 24.00" enable-background="new 0 0 24.00 24.00" xml:space="preserve">
|
||||
<path fill="#FFFFFF" fill-opacity="1" stroke-width="0.2" stroke-linejoin="round" d="M 11.667,4C 12.4033,4 13,4.59701 13,5.33301L 13,20.667C 13,21.403 12.4033,22 11.667,22L 2.33299,22C 1.59668,22 1,21.403 1,20.667L 1,5.33301C 1,4.59701 1.59668,4 2.33299,4L 4,4L 4.0006,2.00196L 10,2L 10,4L 11.667,4 Z M 15.0006,12.002L 23.0006,12.002L 23.0006,14.002L 15.0006,14.002L 15.0006,12.002 Z M 3,13L 11,13L 11,6L 3,6L 3,13 Z "/>
|
||||
</svg>
|
||||
5
RICE/redhound/widget/battery/icons/battery-outline.svg
Normal file
5
RICE/redhound/widget/battery/icons/battery-outline.svg
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="full" width="240" height="240" viewBox="0 0 24.00 24.00" enable-background="new 0 0 24.00 24.00" xml:space="preserve">
|
||||
<path fill="#FFFFFF" fill-opacity="1" stroke-width="0.2" stroke-linejoin="round" d="M 16,20L 7.99999,20L 7.9994,5.99805L 15.9994,5.99805M 16.6664,3.99805L 14.9994,3.99805L 14.9994,1.99805L 8.9994,1.99805L 8.9994,3.99805L 7.33239,3.99805C 6.59608,3.99805 5.9994,4.59503 5.9994,5.33105L 5.9994,20.665C 5.9994,21.4011 6.59608,21.998 7.33239,21.998L 16.6664,21.998C 17.4027,21.998 17.9994,21.4011 17.9994,20.665L 17.9994,5.33105C 17.9994,4.59503 17.4027,3.99805 16.6664,3.99805 Z "/>
|
||||
</svg>
|
||||
5
RICE/redhound/widget/battery/icons/battery-plus.svg
Normal file
5
RICE/redhound/widget/battery/icons/battery-plus.svg
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="full" width="240" height="240" viewBox="0 0 24.00 24.00" enable-background="new 0 0 24.00 24.00" xml:space="preserve">
|
||||
<path fill="#FFFFFF" fill-opacity="1" stroke-width="0.2" stroke-linejoin="round" d="M 16.6664,3.99805C 17.4027,3.99805 17.9994,4.59505 17.9994,5.33105L 17.9994,20.665C 17.9994,21.401 17.4027,21.998 16.6664,21.998L 7.33239,21.998C 6.59608,21.998 5.9994,21.401 5.9994,20.665L 5.9994,5.33105C 5.9994,4.59505 6.59608,3.99805 7.33239,3.99805L 8.9994,3.99805L 9,2L 14.9994,1.99805L 14.9994,3.99805L 16.6664,3.99805 Z M 16,14.0001L 16,12.0001L 13,12L 13,9.00008L 11,9.00008L 11,12L 8,12.0001L 8,14.0001L 11,14L 11,17.0001L 13,17.0001L 13,14L 16,14.0001 Z "/>
|
||||
</svg>
|
||||
5
RICE/redhound/widget/battery/icons/battery-positive.svg
Normal file
5
RICE/redhound/widget/battery/icons/battery-positive.svg
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="full" width="240" height="240" viewBox="0 0 24.00 24.00" enable-background="new 0 0 24.00 24.00" xml:space="preserve">
|
||||
<path fill="#FFFFFF" fill-opacity="1" stroke-width="0.2" stroke-linejoin="round" d="M 11.667,4C 12.4033,4 13,4.59701 13,5.33301L 13,20.667C 13,21.403 12.4033,22 11.667,22L 2.33299,22C 1.59668,22 1,21.403 1,20.667L 1,5.33301C 1,4.59701 1.59668,4 2.33299,4L 4,4L 4.0006,2.00196L 10,2L 10,4L 11.667,4 Z M 23.0006,14.002L 20.0006,14.0019L 20.0006,17.002L 18.0006,17.002L 18.0006,14.0019L 15.0006,14.002L 15.0006,12.002L 18.0006,12.0019L 18.0006,9.00196L 20.0006,9.00196L 20.0006,12.0019L 23.0006,12.002L 23.0006,14.002 Z M 3,13L 11,13L 11,6L 3,6L 3,13 Z "/>
|
||||
</svg>
|
||||
5
RICE/redhound/widget/battery/icons/battery-standard.svg
Normal file
5
RICE/redhound/widget/battery/icons/battery-standard.svg
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="full" width="240" height="240" viewBox="0 0 24.00 24.00" enable-background="new 0 0 24.00 24.00" xml:space="preserve">
|
||||
<path fill="#FFFFFF" fill-opacity="1" stroke-width="0.2" stroke-linejoin="round" d="M 15.9994,11.998L 7.9994,11.998L 7.9994,5.99805L 15.9994,5.99805M 16.6664,3.99805L 14.9994,3.99805L 14.9994,1.99805L 8.9994,1.99805L 8.9994,3.99805L 7.33241,3.99805C 6.59608,3.99805 5.9994,4.59503 5.9994,5.33105L 5.9994,20.665C 5.9994,21.4011 6.59608,21.998 7.33241,21.998L 16.6664,21.998C 17.4027,21.998 17.9994,21.4011 17.9994,20.665L 17.9994,5.33105C 17.9994,4.59503 17.4027,3.99805 16.6664,3.99805 Z "/>
|
||||
</svg>
|
||||
5
RICE/redhound/widget/battery/icons/battery-unknown.svg
Normal file
5
RICE/redhound/widget/battery/icons/battery-unknown.svg
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="full" width="240" height="240" viewBox="0 0 24.00 24.00" enable-background="new 0 0 24.00 24.00" xml:space="preserve">
|
||||
<path fill="#FFFFFF" fill-opacity="1" stroke-width="0.2" stroke-linejoin="round" d="M 15.066,12.252L 14.171,13.17C 13.634,13.7069 13.251,14.179 13.087,14.998L 11.05,14.998C 11.164,14.0959 11.559,13.2809 12.171,12.67L 13.414,11.412C 13.775,11.05 13.999,10.55 13.999,9.99796C 13.999,8.89395 13.104,7.99796 11.999,7.99796C 10.895,7.99796 9.99896,8.89395 9.99896,9.99796L 7.99899,9.99796C 7.99899,7.78894 9.78998,5.99796 11.999,5.99796C 14.209,5.99796 15.999,7.78894 15.999,9.99796C 15.999,10.878 15.643,11.675 15.066,12.252 Z M 12.999,18.998L 10.999,18.998L 10.999,16.998L 12.999,16.998M 16.666,3.99796L 14.999,3.99796L 14.999,1.99796L 8.99896,1.99796L 8.99896,3.99796L 7.33298,3.99796C 6.59598,3.99796 5.99899,4.59494 5.99899,5.33194L 5.99899,20.6649C 5.99899,21.4009 6.59598,21.998 7.33298,21.998L 16.666,21.998C 17.402,21.998 17.999,21.4009 17.999,20.6649L 17.999,5.33194C 17.999,4.59494 17.402,3.99796 16.666,3.99796 Z "/>
|
||||
</svg>
|
||||
5
RICE/redhound/widget/battery/icons/battery.svg
Normal file
5
RICE/redhound/widget/battery/icons/battery.svg
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="full" width="240" height="240" viewBox="0 0 24.00 24.00" enable-background="new 0 0 24.00 24.00" xml:space="preserve">
|
||||
<path fill="#FFFFFF" fill-opacity="1" stroke-width="0.2" stroke-linejoin="round" d="M 16.6664,3.99805L 14.9994,3.99805L 14.9994,1.99805L 8.9994,1.99805L 8.9994,3.99805L 7.33239,3.99805C 6.59608,3.99805 5.9994,4.59503 5.9994,5.33105L 5.9994,20.665C 5.9994,21.4011 6.59608,21.998 7.33239,21.998L 16.6664,21.998C 17.4027,21.998 17.9994,21.4011 17.9994,20.665L 17.9994,5.33105C 17.9994,4.59503 17.4027,3.99805 16.6664,3.99805 Z "/>
|
||||
</svg>
|
||||
146
RICE/redhound/widget/battery/init.lua
Normal file
146
RICE/redhound/widget/battery/init.lua
Normal file
|
|
@ -0,0 +1,146 @@
|
|||
-------------------------------------------------
|
||||
-- Battery Widget for Awesome Window Manager
|
||||
-- Shows the battery status using the ACPI tool
|
||||
-- More details could be found here:
|
||||
-- https://github.com/streetturtle/awesome-wm-widgets/tree/master/battery-widget
|
||||
|
||||
-- @author Pavel Makhov
|
||||
-- @copyright 2017 Pavel Makhov
|
||||
-------------------------------------------------
|
||||
|
||||
local awful = require('awful')
|
||||
local naughty = require('naughty')
|
||||
local watch = require('awful.widget.watch')
|
||||
local wibox = require('wibox')
|
||||
local clickable_container = require('widget.material.clickable-container')
|
||||
local gears = require('gears')
|
||||
local dpi = require('beautiful').xresources.apply_dpi
|
||||
|
||||
-- acpi sample outputs
|
||||
-- Battery 0: Discharging, 75%, 01:51:38 remaining
|
||||
-- Battery 0: Charging, 53%, 00:57:43 until charged
|
||||
|
||||
local HOME = os.getenv('HOME')
|
||||
local PATH_TO_ICONS = HOME .. '/.config/awesome/widget/battery/icons/'
|
||||
|
||||
local widget =
|
||||
wibox.widget {
|
||||
{
|
||||
id = 'icon',
|
||||
widget = wibox.widget.imagebox,
|
||||
resize = true
|
||||
},
|
||||
layout = wibox.layout.fixed.horizontal,
|
||||
opacity = 0.8
|
||||
}
|
||||
|
||||
local widget_button = clickable_container(wibox.container.margin(widget, dpi(0), dpi(8), dpi(8), dpi(8)))
|
||||
widget_button:buttons(
|
||||
gears.table.join(
|
||||
awful.button(
|
||||
{},
|
||||
1,
|
||||
nil,
|
||||
function()
|
||||
awful.spawn('xfce4-power-manager-settings')
|
||||
end
|
||||
)
|
||||
)
|
||||
)
|
||||
-- Alternative to naughty.notify - tooltip. You can compare both and choose the preferred one
|
||||
local battery_popup =
|
||||
awful.tooltip(
|
||||
{
|
||||
objects = {widget_button},
|
||||
mode = 'outside',
|
||||
align = 'left',
|
||||
preferred_positions = {'right', 'left', 'top', 'bottom'}
|
||||
}
|
||||
)
|
||||
|
||||
-- To use colors from beautiful theme put
|
||||
-- following lines in rc.lua before require("battery"):
|
||||
--beautiful.tooltip_fg = beautiful.fg_normal
|
||||
--beautiful.tooltip_bg = beautiful.bg_normal
|
||||
|
||||
local function show_battery_warning()
|
||||
naughty.notify {
|
||||
icon = PATH_TO_ICONS .. 'battery-alert.svg',
|
||||
icon_size = dpi(48),
|
||||
text = 'Huston, we have a problem',
|
||||
title = 'Battery is dying',
|
||||
timeout = 5,
|
||||
hover_timeout = 0.5,
|
||||
position = 'bottom_left',
|
||||
bg = '#d32f2f',
|
||||
fg = '#EEE9EF',
|
||||
width = 248
|
||||
}
|
||||
end
|
||||
|
||||
local last_battery_check = os.time()
|
||||
|
||||
watch(
|
||||
'acpi -i',
|
||||
1,
|
||||
function(_, stdout)
|
||||
local batteryIconName = 'battery'
|
||||
|
||||
local battery_info = {}
|
||||
local capacities = {}
|
||||
for s in stdout:gmatch('[^\r\n]+') do
|
||||
local status, charge_str, time = string.match(s, '.+: (%a+), (%d?%d?%d)%%,?.*')
|
||||
if status ~= nil then
|
||||
table.insert(battery_info, {status = status, charge = tonumber(charge_str)})
|
||||
else
|
||||
local cap_str = string.match(s, '.+:.+last full capacity (%d+)')
|
||||
table.insert(capacities, tonumber(cap_str))
|
||||
end
|
||||
end
|
||||
|
||||
local capacity = 0
|
||||
for _, cap in ipairs(capacities) do
|
||||
capacity = capacity + cap
|
||||
end
|
||||
|
||||
local charge = 0
|
||||
local status
|
||||
for i, batt in ipairs(battery_info) do
|
||||
if batt.charge >= charge then
|
||||
status = batt.status -- use most charged battery status
|
||||
-- this is arbitrary, and maybe another metric should be used
|
||||
end
|
||||
|
||||
charge = charge + batt.charge * capacities[i]
|
||||
end
|
||||
charge = charge / capacity
|
||||
|
||||
if (charge >= 0 and charge < 15) then
|
||||
if status ~= 'Charging' and os.difftime(os.time(), last_battery_check) > 300 then
|
||||
-- if 5 minutes have elapsed since the last warning
|
||||
last_battery_check = _G.time()
|
||||
|
||||
show_battery_warning()
|
||||
end
|
||||
end
|
||||
|
||||
if status == 'Charging' or status == 'Full' then
|
||||
batteryIconName = batteryIconName .. '-charging'
|
||||
end
|
||||
|
||||
local roundedCharge = math.floor(charge / 10) * 10
|
||||
if (roundedCharge == 0) then
|
||||
batteryIconName = batteryIconName .. '-outline'
|
||||
elseif (roundedCharge ~= 100) then
|
||||
batteryIconName = batteryIconName .. '-' .. roundedCharge
|
||||
end
|
||||
|
||||
widget.icon:set_image(PATH_TO_ICONS .. batteryIconName .. '.svg')
|
||||
-- Update popup text
|
||||
battery_popup.text = string.gsub(stdout, '\n$', '')
|
||||
collectgarbage('collect')
|
||||
end,
|
||||
widget
|
||||
)
|
||||
|
||||
return widget_button
|
||||
5
RICE/redhound/widget/bluetooth/icons/bluetooth-off.svg
Normal file
5
RICE/redhound/widget/bluetooth/icons/bluetooth-off.svg
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="full" width="240" height="240" viewBox="0 0 24.00 24.00" enable-background="new 0 0 24.00 24.00" xml:space="preserve">
|
||||
<path fill="#ffffff" fill-opacity="1" stroke-width="0.2" stroke-linejoin="round" d="M 12.9975,5.83L 14.8775,7.71L 13.2813,9.31125L 14.6925,10.7175L 17.71,7.7L 12.0025,2.0025L 11.0013,2.0025L 11.0013,7.03125L 12.9975,9.02875M 5.41,3.99875L 3.99875,5.41L 10.5912,12.0025L 5,17.5875L 6.41125,18.9988L 11.0013,14.4088L 11.0013,22.0025L 12.0025,22.0025L 16.2887,17.71L 18.5888,20L 20,18.5887M 12.9975,18.1687L 12.9975,14.4088L 14.8775,16.2888"/>
|
||||
</svg>
|
||||
5
RICE/redhound/widget/bluetooth/icons/bluetooth.svg
Normal file
5
RICE/redhound/widget/bluetooth/icons/bluetooth.svg
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="full" width="240" height="240" viewBox="0 0 24.00 24.00" enable-background="new 0 0 24.00 24.00" xml:space="preserve">
|
||||
<path fill="#ffffff" fill-opacity="1" stroke-width="0.2" stroke-linejoin="round" d="M 14.8783,16.2911L 12.9993,18.1701L 12.9993,14.4121M 12.9993,5.82607L 14.8783,7.70507L 12.9993,9.58407M 17.7063,7.70507L 11.9993,1.99807L 10.9993,1.99807L 10.9993,9.58407L 6.41331,4.99807L 4.99931,6.41207L 10.5853,11.9981L 4.99931,17.5841L 6.41331,18.9981L 10.9993,14.4121L 10.9993,21.9981L 11.9993,21.9981L 17.7063,16.2911L 13.4133,11.9981L 17.7063,7.70507 Z "/>
|
||||
</svg>
|
||||
1
RICE/redhound/widget/bluetooth/init.lua
Normal file
1
RICE/redhound/widget/bluetooth/init.lua
Normal file
|
|
@ -0,0 +1 @@
|
|||
-- TODO
|
||||
49
RICE/redhound/widget/brightness/brightness-slider.lua
Normal file
49
RICE/redhound/widget/brightness/brightness-slider.lua
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
local wibox = require('wibox')
|
||||
local mat_list_item = require('widget.material.list-item')
|
||||
local mat_slider = require('widget.material.slider')
|
||||
local mat_icon_button = require('widget.material.icon-button')
|
||||
local clickable_container = require('widget.material.clickable-container')
|
||||
local icons = require('theme.icons')
|
||||
local watch = require('awful.widget.watch')
|
||||
local spawn = require('awful.spawn')
|
||||
|
||||
local slider =
|
||||
wibox.widget {
|
||||
read_only = false,
|
||||
widget = mat_slider
|
||||
}
|
||||
|
||||
slider:connect_signal(
|
||||
'property::value',
|
||||
function()
|
||||
spawn('xbacklight -set ' .. math.max(slider.value, 5))
|
||||
end
|
||||
)
|
||||
|
||||
watch(
|
||||
[[bash -c "xbacklight -get"]],
|
||||
1,
|
||||
function(widget, stdout, stderr, exitreason, exitcode)
|
||||
local brightness = string.match(stdout, '(%d+)')
|
||||
|
||||
slider:set_value(tonumber(brightness))
|
||||
collectgarbage('collect')
|
||||
end
|
||||
)
|
||||
|
||||
local icon =
|
||||
wibox.widget {
|
||||
image = icons.brightness,
|
||||
widget = wibox.widget.imagebox
|
||||
}
|
||||
|
||||
local button = mat_icon_button(icon)
|
||||
|
||||
local brightness_setting =
|
||||
wibox.widget {
|
||||
button,
|
||||
slider,
|
||||
widget = mat_list_item
|
||||
}
|
||||
|
||||
return brightness_setting
|
||||
50
RICE/redhound/widget/cpu/cpu-meter.lua
Normal file
50
RICE/redhound/widget/cpu/cpu-meter.lua
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
local wibox = require('wibox')
|
||||
local mat_list_item = require('widget.material.list-item')
|
||||
local mat_slider = require('widget.material.slider')
|
||||
local mat_icon = require('widget.material.icon')
|
||||
local icons = require('theme.icons')
|
||||
local watch = require('awful.widget.watch')
|
||||
local dpi = require('beautiful').xresources.apply_dpi
|
||||
|
||||
local total_prev = 0
|
||||
local idle_prev = 0
|
||||
|
||||
local slider =
|
||||
wibox.widget {
|
||||
read_only = true,
|
||||
widget = mat_slider
|
||||
}
|
||||
|
||||
watch(
|
||||
[[bash -c "cat /proc/stat | grep '^cpu '"]],
|
||||
1,
|
||||
function(_, stdout)
|
||||
local user, nice, system, idle, iowait, irq, softirq, steal, guest, guest_nice =
|
||||
stdout:match('(%d+)%s(%d+)%s(%d+)%s(%d+)%s(%d+)%s(%d+)%s(%d+)%s(%d+)%s(%d+)%s(%d+)%s')
|
||||
|
||||
local total = user + nice + system + idle + iowait + irq + softirq + steal
|
||||
|
||||
local diff_idle = idle - idle_prev
|
||||
local diff_total = total - total_prev
|
||||
local diff_usage = (1000 * (diff_total - diff_idle) / diff_total + 5) / 10
|
||||
|
||||
slider:set_value(diff_usage)
|
||||
|
||||
total_prev = total
|
||||
idle_prev = idle
|
||||
collectgarbage('collect')
|
||||
end
|
||||
)
|
||||
|
||||
local cpu_meter =
|
||||
wibox.widget {
|
||||
wibox.widget {
|
||||
icon = icons.chart,
|
||||
size = dpi(24),
|
||||
widget = mat_icon
|
||||
},
|
||||
slider,
|
||||
widget = mat_list_item
|
||||
}
|
||||
|
||||
return cpu_meter
|
||||
36
RICE/redhound/widget/harddrive/harddrive-meter.lua
Normal file
36
RICE/redhound/widget/harddrive/harddrive-meter.lua
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
local wibox = require('wibox')
|
||||
local mat_list_item = require('widget.material.list-item')
|
||||
local mat_slider = require('widget.material.slider')
|
||||
local mat_icon = require('widget.material.icon')
|
||||
local icons = require('theme.icons')
|
||||
local watch = require('awful.widget.watch')
|
||||
local dpi = require('beautiful').xresources.apply_dpi
|
||||
|
||||
local slider =
|
||||
wibox.widget {
|
||||
read_only = true,
|
||||
widget = mat_slider
|
||||
}
|
||||
|
||||
watch(
|
||||
[[bash -c "df -h /home|grep '^/' | awk '{print $5}'"]],
|
||||
10,
|
||||
function(_, stdout)
|
||||
local space_consumed = stdout:match('(%d+)')
|
||||
slider:set_value(tonumber(space_consumed))
|
||||
collectgarbage('collect')
|
||||
end
|
||||
)
|
||||
|
||||
local harddrive_meter =
|
||||
wibox.widget {
|
||||
wibox.widget {
|
||||
icon = icons.harddisk,
|
||||
size = dpi(24),
|
||||
widget = mat_icon
|
||||
},
|
||||
slider,
|
||||
widget = mat_list_item
|
||||
}
|
||||
|
||||
return harddrive_meter
|
||||
52
RICE/redhound/widget/material/clickable-container.lua
Normal file
52
RICE/redhound/widget/material/clickable-container.lua
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
local wibox = require('wibox')
|
||||
|
||||
function build(widget)
|
||||
local container =
|
||||
wibox.widget {
|
||||
widget,
|
||||
widget = wibox.container.background
|
||||
}
|
||||
local old_cursor, old_wibox
|
||||
|
||||
container:connect_signal(
|
||||
'mouse::enter',
|
||||
function()
|
||||
container.bg = '#ffffff11'
|
||||
-- Hm, no idea how to get the wibox from this signal's arguments...
|
||||
local w = _G.mouse.current_wibox
|
||||
if w then
|
||||
old_cursor, old_wibox = w.cursor, w
|
||||
w.cursor = 'hand1'
|
||||
end
|
||||
end
|
||||
)
|
||||
|
||||
container:connect_signal(
|
||||
'mouse::leave',
|
||||
function()
|
||||
container.bg = '#ffffff00'
|
||||
if old_wibox then
|
||||
old_wibox.cursor = old_cursor
|
||||
old_wibox = nil
|
||||
end
|
||||
end
|
||||
)
|
||||
|
||||
container:connect_signal(
|
||||
'button::press',
|
||||
function()
|
||||
container.bg = '#ffffff22'
|
||||
end
|
||||
)
|
||||
|
||||
container:connect_signal(
|
||||
'button::release',
|
||||
function()
|
||||
container.bg = '#ffffff11'
|
||||
end
|
||||
)
|
||||
|
||||
return container
|
||||
end
|
||||
|
||||
return build
|
||||
29
RICE/redhound/widget/material/icon-button.lua
Normal file
29
RICE/redhound/widget/material/icon-button.lua
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
local wibox = require('wibox')
|
||||
local gears = require('gears')
|
||||
local clickable_container = require('widget.material.clickable-container')
|
||||
local dpi = require('beautiful').xresources.apply_dpi
|
||||
|
||||
function build(imagebox, args)
|
||||
-- return wibox.container.margin(container, 6, 6, 6, 6)
|
||||
return wibox.widget {
|
||||
wibox.widget {
|
||||
wibox.widget {
|
||||
imagebox,
|
||||
top = dpi(6),
|
||||
left = dpi(6),
|
||||
right = dpi(6),
|
||||
bottom = dpi(6),
|
||||
widget = wibox.container.margin
|
||||
},
|
||||
shape = gears.shape.circle,
|
||||
widget = clickable_container
|
||||
},
|
||||
top = dpi(6),
|
||||
left = dpi(6),
|
||||
right = dpi(6),
|
||||
bottom = dpi(6),
|
||||
widget = wibox.container.margin
|
||||
}
|
||||
end
|
||||
|
||||
return build
|
||||
80
RICE/redhound/widget/material/icon.lua
Normal file
80
RICE/redhound/widget/material/icon.lua
Normal file
|
|
@ -0,0 +1,80 @@
|
|||
-- Default widget requirements
|
||||
local base = require('wibox.widget.base')
|
||||
local gtable = require('gears.table')
|
||||
local setmetatable = setmetatable
|
||||
|
||||
-- Commons requirements
|
||||
local wibox = require('wibox')
|
||||
|
||||
-- Local declarations
|
||||
|
||||
local mat_list_item = {mt = {}}
|
||||
|
||||
function mat_list_item:layout(_, width, height)
|
||||
local layout = {}
|
||||
|
||||
-- Add divider if present
|
||||
if self._private.icon then
|
||||
table.insert(
|
||||
layout,
|
||||
base.place_widget_at(
|
||||
self._private.imagebox,
|
||||
width / 2 - self._private.size / 2,
|
||||
height / 2 - self._private.size / 2,
|
||||
self._private.size,
|
||||
self._private.size
|
||||
)
|
||||
)
|
||||
end
|
||||
return layout
|
||||
end
|
||||
|
||||
function mat_list_item:fit(_, width, height)
|
||||
local min = math.min(width, height)
|
||||
return min, min
|
||||
end
|
||||
|
||||
function mat_list_item:set_icon(icon)
|
||||
self._private.icon = icon
|
||||
self._private.imagebox.image = icon
|
||||
end
|
||||
|
||||
function mat_list_item:get_icon()
|
||||
return self._private.icon
|
||||
end
|
||||
|
||||
function mat_list_item:set_size(size)
|
||||
self._private.size = size
|
||||
self:emit_signal('widget::layout_changed')
|
||||
end
|
||||
|
||||
function mat_list_item:get_size()
|
||||
return self._private.size
|
||||
end
|
||||
|
||||
local function new(icon, size)
|
||||
local ret =
|
||||
base.make_widget(
|
||||
nil,
|
||||
nil,
|
||||
{
|
||||
enable_properties = true
|
||||
}
|
||||
)
|
||||
|
||||
gtable.crush(ret, mat_list_item, true)
|
||||
ret._private.icon = icon
|
||||
ret._private.imagebox = wibox.widget.imagebox(icon)
|
||||
ret._private.size = size
|
||||
return ret
|
||||
end
|
||||
|
||||
function mat_list_item.mt:__call(...)
|
||||
return new(...)
|
||||
end
|
||||
|
||||
--@DOC_widget_COMMON@
|
||||
|
||||
--@DOC_object_COMMON@
|
||||
|
||||
return setmetatable(mat_list_item, mat_list_item.mt)
|
||||
191
RICE/redhound/widget/material/list-item.lua
Normal file
191
RICE/redhound/widget/material/list-item.lua
Normal file
|
|
@ -0,0 +1,191 @@
|
|||
-- Default widget requirements
|
||||
local base = require('wibox.widget.base')
|
||||
local gtable = require('gears.table')
|
||||
local setmetatable = setmetatable
|
||||
local dpi = require('beautiful').xresources.apply_dpi
|
||||
|
||||
-- Commons requirements
|
||||
local wibox = require('wibox')
|
||||
local clickable_container = require('widget.material.clickable-container')
|
||||
-- Local declarations
|
||||
|
||||
local mat_list_item = {mt = {}}
|
||||
|
||||
function mat_list_item:build_separator()
|
||||
self._private.separator =
|
||||
wibox.widget {
|
||||
orientation = 'horizontal',
|
||||
forced_height = 1,
|
||||
opacity = 0.08,
|
||||
widget = wibox.widget.separator
|
||||
}
|
||||
self:emit_signal('widget::layout_changed')
|
||||
end
|
||||
|
||||
function mat_list_item:build_clickable_container()
|
||||
self._private.clickable_container =
|
||||
wibox.widget {
|
||||
wibox.widget {
|
||||
widget = wibox.widget.textbox
|
||||
},
|
||||
widget = clickable_container
|
||||
}
|
||||
self:emit_signal('widget::layout_changed')
|
||||
end
|
||||
|
||||
function mat_list_item:layout(_, width, height)
|
||||
local content_width = width - dpi(32)
|
||||
local content_x = dpi(dpi(16))
|
||||
local layout = {}
|
||||
|
||||
-- Add divider if present
|
||||
if self._private.divider then
|
||||
table.insert(layout, base.place_widget_at(self._private.separator, 0, 0, width, 1))
|
||||
end
|
||||
|
||||
-- Add clickable_container if clickable
|
||||
if self._private.clickable then
|
||||
table.insert(layout, base.place_widget_at(self._private.clickable_container, 0, 0, width, height))
|
||||
end
|
||||
|
||||
if self._private.prefix then
|
||||
content_x = content_x + dpi(54)
|
||||
content_width = content_width - dpi(54)
|
||||
table.insert(layout, base.place_widget_at(self._private.prefix, dpi(16), 0, dpi(48), height))
|
||||
end
|
||||
|
||||
if self._private.suffix then
|
||||
content_width = content_width - dpi(54)
|
||||
table.insert(layout, base.place_widget_at(self._private.suffix, width - dpi(40), dpi(12), width, height))
|
||||
end
|
||||
table.insert(layout, base.place_widget_at(self._private.content, content_x, 0, content_width, height))
|
||||
return layout
|
||||
end
|
||||
|
||||
function mat_list_item:fit(_, width)
|
||||
return width, dpi(48)
|
||||
end
|
||||
|
||||
---- Properties ----
|
||||
|
||||
-- Property clickable
|
||||
function mat_list_item:set_clickable(value)
|
||||
if self._private.clickable ~= value then
|
||||
self._private.clickable = value
|
||||
self:emit_signal('property::clickable')
|
||||
self:emit_signal('widget::layout_changed')
|
||||
|
||||
if self._private.clickable and not self._private.clickable_container then
|
||||
self:build_clickable_container()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function mat_list_item:get_clickable()
|
||||
return self._private.clickable
|
||||
end
|
||||
|
||||
-- Property divider
|
||||
|
||||
function mat_list_item:set_divider(value)
|
||||
if self._private.divider ~= value then
|
||||
self._private.divider = value
|
||||
self:emit_signal('property::divider')
|
||||
self:emit_signal('widget::layout_changed')
|
||||
|
||||
if self._private.divider and not self._private.separator then
|
||||
self:build_separator()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function mat_list_item:get_divider()
|
||||
return self._private.divider
|
||||
end
|
||||
|
||||
function mat_list_item:set_prefix(widget)
|
||||
if widget then
|
||||
base.check_widget(widget)
|
||||
end
|
||||
self._private.prefix = widget
|
||||
self:emit_signal('widget::layout_changed')
|
||||
end
|
||||
|
||||
function mat_list_item:get_prefix()
|
||||
return self._private.prefix
|
||||
end
|
||||
|
||||
function mat_list_item:set_suffix(widget)
|
||||
if widget then
|
||||
base.check_widget(widget)
|
||||
end
|
||||
self._private.suffix = widget
|
||||
self:emit_signal('widget::layout_changed')
|
||||
end
|
||||
|
||||
function mat_list_item:get_suffix()
|
||||
return self._private.suffix
|
||||
end
|
||||
|
||||
--- The widget who will be the content.
|
||||
-- @property content
|
||||
-- @tparam widget widget The widget
|
||||
|
||||
function mat_list_item:set_content(widget)
|
||||
if widget then
|
||||
base.check_widget(widget)
|
||||
end
|
||||
self._private.content = widget
|
||||
self:emit_signal('widget::layout_changed')
|
||||
end
|
||||
|
||||
function mat_list_item:get_content()
|
||||
return self._private.content
|
||||
end
|
||||
|
||||
-- Get the number of children element
|
||||
-- @treturn table The children
|
||||
function mat_list_item:get_children()
|
||||
return {self._private.widget}
|
||||
end
|
||||
|
||||
-- Replace the layout children
|
||||
-- This layout only accept one children, all others will be ignored
|
||||
-- @tparam table children A table composed of valid widgets
|
||||
function mat_list_item:set_children(children)
|
||||
if not children[2] then
|
||||
self:set_content(children[1])
|
||||
else
|
||||
self:set_prefix(children[1])
|
||||
self:set_content(children[2])
|
||||
end
|
||||
if children[3] then
|
||||
self:set_suffix(children[3])
|
||||
end
|
||||
end
|
||||
|
||||
local function new(widget)
|
||||
local ret =
|
||||
base.make_widget(
|
||||
nil,
|
||||
nil,
|
||||
{
|
||||
enable_properties = true
|
||||
}
|
||||
)
|
||||
|
||||
gtable.crush(ret, mat_list_item, true)
|
||||
|
||||
ret._private.content = widget
|
||||
return ret
|
||||
end
|
||||
|
||||
function mat_list_item.mt:__call(...)
|
||||
return new(...)
|
||||
end
|
||||
|
||||
--@DOC_widget_COMMON@
|
||||
|
||||
--@DOC_object_COMMON@
|
||||
|
||||
return setmetatable(mat_list_item, mat_list_item.mt)
|
||||
125
RICE/redhound/widget/material/slider.lua
Normal file
125
RICE/redhound/widget/material/slider.lua
Normal file
|
|
@ -0,0 +1,125 @@
|
|||
-- Default widget requirements
|
||||
local base = require('wibox.widget.base')
|
||||
local gtable = require('gears.table')
|
||||
local setmetatable = setmetatable
|
||||
local dpi = require('beautiful').xresources.apply_dpi
|
||||
|
||||
-- Commons requirements
|
||||
local wibox = require('wibox')
|
||||
local gears = require('gears')
|
||||
local beautiful = require('beautiful')
|
||||
local mat_colors = require('theme.mat-colors')
|
||||
-- Local declarations
|
||||
|
||||
local mat_slider = {mt = {}}
|
||||
|
||||
local properties = {
|
||||
read_only = false
|
||||
}
|
||||
|
||||
function mat_slider:set_value(value)
|
||||
if self._private.value ~= value then
|
||||
self._private.value = value
|
||||
self._private.progress_bar:set_value(self._private.value)
|
||||
self._private.slider:set_value(self._private.value)
|
||||
self:emit_signal('property::value')
|
||||
--self:emit_signal('widget::layout_changed')
|
||||
end
|
||||
end
|
||||
|
||||
function mat_slider:get_value(value)
|
||||
return self._private.value
|
||||
end
|
||||
|
||||
function mat_slider:set_read_only(value)
|
||||
if self._private.read_only ~= value then
|
||||
self._private.read_only = value
|
||||
self:emit_signal('property::read_only')
|
||||
self:emit_signal('widget::layout_changed')
|
||||
end
|
||||
end
|
||||
|
||||
function mat_slider:get_read_only(value)
|
||||
return self._private.read_only
|
||||
end
|
||||
|
||||
function mat_slider:layout(_, width, height)
|
||||
local layout = {}
|
||||
table.insert(layout, base.place_widget_at(self._private.progress_bar, 0, dpi(21), width, height - dpi(42)))
|
||||
if (not self._private.read_only) then
|
||||
table.insert(layout, base.place_widget_at(self._private.slider, 0, dpi(6), width, height - dpi(12)))
|
||||
end
|
||||
return layout
|
||||
end
|
||||
|
||||
function mat_slider:draw(_, cr, width, height)
|
||||
if (self._private.read_only) then
|
||||
self._private.slider.forced_height = 0
|
||||
end
|
||||
end
|
||||
|
||||
function mat_slider:fit(_, width, height)
|
||||
return width, height
|
||||
end
|
||||
|
||||
local function new(args)
|
||||
local ret =
|
||||
base.make_widget(
|
||||
nil,
|
||||
nil,
|
||||
{
|
||||
enable_properties = true
|
||||
}
|
||||
)
|
||||
|
||||
gtable.crush(ret._private, args or {})
|
||||
|
||||
gtable.crush(ret, mat_slider, true)
|
||||
|
||||
ret._private.progress_bar =
|
||||
wibox.widget {
|
||||
max_value = 100,
|
||||
value = 25,
|
||||
forced_height = dpi(6),
|
||||
paddings = 0,
|
||||
shape = gears.shape.rounded_rect,
|
||||
background_color = beautiful.background.hue_800,
|
||||
color = beautiful.primary.hue_500,
|
||||
widget = wibox.widget.progressbar
|
||||
}
|
||||
|
||||
ret._private.slider =
|
||||
wibox.widget {
|
||||
forced_height = dpi(8),
|
||||
bar_shape = gears.shape.rounded_rect,
|
||||
bar_height = 0,
|
||||
bar_color = beautiful.primary.hue_500,
|
||||
handle_color = beautiful.primary.hue_300,
|
||||
handle_shape = gears.shape.circle,
|
||||
handle_border_color = '#00000012',
|
||||
handle_border_width = dpi(3),
|
||||
value = 25,
|
||||
widget = wibox.widget.slider
|
||||
}
|
||||
|
||||
ret._private.slider:connect_signal(
|
||||
'property::value',
|
||||
function()
|
||||
ret:set_value(ret._private.slider.value)
|
||||
end
|
||||
)
|
||||
|
||||
ret._private.read_only = false
|
||||
|
||||
return ret
|
||||
end
|
||||
|
||||
function mat_slider.mt:__call(...)
|
||||
return new(...)
|
||||
end
|
||||
|
||||
--@DOC_widget_COMMON@
|
||||
|
||||
--@DOC_object_COMMON@
|
||||
|
||||
return setmetatable(mat_slider, mat_slider.mt)
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="full" width="240" height="240" viewBox="0 0 24.00 24.00" enable-background="new 0 0 24.00 24.00" xml:space="preserve">
|
||||
<path fill="#00c853" fill-opacity="1" stroke-linejoin="round" d="M 20.54,5.23C 20.83,5.57 21,6.02 21,6.5L 21,19C 21,20.1 20.1,21 19,21L 5,21C 3.9,21 3,20.1 3,19L 3,6.5C 3,6.02 3.17,5.57 3.46,5.23L 4.84,3.55C 5.12,3.21 5.53,3 6,3L 18,3C 18.47,3 18.88,3.21 19.15,3.55L 20.54,5.23 Z M 5.12,5.00001L 18.87,5.00001L 17.93,4.00001L 5.93,4.00001L 5.12,5.00001 Z M 12,9.5L 6.5,15L 10,15L 10,17L 14,17L 14,15L 17.5,15L 12,9.5 Z "/>
|
||||
</svg>
|
||||
5
RICE/redhound/widget/package-updater/icons/package.svg
Normal file
5
RICE/redhound/widget/package-updater/icons/package.svg
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="full" width="240" height="240" viewBox="0 0 24.00 24.00" enable-background="new 0 0 24.00 24.00" xml:space="preserve">
|
||||
<path fill="#ffffff" fill-opacity="1" stroke-width="0.2" stroke-linejoin="round" d="M 5.12,5L 18.87,5L 17.93,4L 5.93,4L 5.12,5 Z M 20.54,5.23001C 20.8301,5.57001 21,6.02001 21,6.50001L 21,19C 21,20.1 20.1,21 19,21L 5,21C 3.9,21 3,20.1 3,19L 3,6.50001C 3,6.02001 3.17,5.57001 3.46,5.23001L 4.84,3.55001C 5.12,3.21001 5.52999,3.00001 6,3.00001L 18,3.00001C 18.47,3.00001 18.88,3.21001 19.15,3.55001L 20.54,5.23001 Z M 6,18L 12,18L 12,15L 6,15L 6,18 Z "/>
|
||||
</svg>
|
||||
112
RICE/redhound/widget/package-updater/init.lua
Normal file
112
RICE/redhound/widget/package-updater/init.lua
Normal file
|
|
@ -0,0 +1,112 @@
|
|||
-------------------------------------------------
|
||||
-- Battery Widget for Awesome Window Manager
|
||||
-- Shows the battery status using the ACPI tool
|
||||
-- More details could be found here:
|
||||
-- https://github.com/streetturtle/awesome-wm-widgets/tree/master/battery-widget
|
||||
|
||||
-- @author Pavel Makhov
|
||||
-- @copyright 2017 Pavel Makhov
|
||||
-------------------------------------------------
|
||||
|
||||
local awful = require('awful')
|
||||
local naughty = require('naughty')
|
||||
local watch = require('awful.widget.watch')
|
||||
local wibox = require('wibox')
|
||||
local clickable_container = require('widget.material.clickable-container')
|
||||
local gears = require('gears')
|
||||
local dpi = require('beautiful').xresources.apply_dpi
|
||||
|
||||
-- acpi sample outputs
|
||||
-- Battery 0: Discharging, 75%, 01:51:38 remaining
|
||||
-- Battery 0: Charging, 53%, 00:57:43 until charged
|
||||
|
||||
local HOME = os.getenv('HOME')
|
||||
local PATH_TO_ICONS = HOME .. '/.config/awesome/widget/package-updater/icons/'
|
||||
local updateAvailable = false
|
||||
local numOfUpdatesAvailable
|
||||
|
||||
local widget =
|
||||
wibox.widget {
|
||||
{
|
||||
id = 'icon',
|
||||
widget = wibox.widget.imagebox,
|
||||
resize = true
|
||||
},
|
||||
layout = wibox.layout.align.horizontal
|
||||
}
|
||||
|
||||
local widget_button = clickable_container(wibox.container.margin(widget, dpi(14), dpi(14), dpi(4), dpi(4)))
|
||||
widget_button:buttons(
|
||||
gears.table.join(
|
||||
awful.button(
|
||||
{},
|
||||
1,
|
||||
nil,
|
||||
function()
|
||||
if updateAvailable then
|
||||
awful.spawn('pamac-manager --updates')
|
||||
else
|
||||
awful.spawn('pamac-manager')
|
||||
end
|
||||
end
|
||||
)
|
||||
)
|
||||
)
|
||||
-- Alternative to naughty.notify - tooltip. You can compare both and choose the preferred one
|
||||
awful.tooltip(
|
||||
{
|
||||
objects = {widget_button},
|
||||
mode = 'outside',
|
||||
align = 'right',
|
||||
timer_function = function()
|
||||
if updateAvailable then
|
||||
return numOfUpdatesAvailable .. ' updates are available'
|
||||
else
|
||||
return 'We are up-to-date!'
|
||||
end
|
||||
end,
|
||||
preferred_positions = {'right', 'left', 'top', 'bottom'}
|
||||
}
|
||||
)
|
||||
|
||||
-- To use colors from beautiful theme put
|
||||
-- following lines in rc.lua before require("battery"):
|
||||
--beautiful.tooltip_fg = beautiful.fg_normal
|
||||
--beautiful.tooltip_bg = beautiful.bg_normal
|
||||
|
||||
local function show_battery_warning()
|
||||
naughty.notify {
|
||||
icon = PATH_TO_ICONS .. 'battery-alert.svg',
|
||||
icon_size = dpi(48),
|
||||
text = 'Huston, we have a problem',
|
||||
title = 'Battery is dying',
|
||||
timeout = 5,
|
||||
hover_timeout = 0.5,
|
||||
position = 'bottom_left',
|
||||
bg = '#d32f2f',
|
||||
fg = '#EEE9EF',
|
||||
width = 248
|
||||
}
|
||||
end
|
||||
|
||||
local last_battery_check = os.time()
|
||||
watch(
|
||||
'pamac checkupdates',
|
||||
60,
|
||||
function(_, stdout)
|
||||
numOfUpdatesAvailable = tonumber(stdout:match('.-\n'):match('%d*'))
|
||||
local widgetIconName
|
||||
if (numOfUpdatesAvailable ~= nil) then
|
||||
updateAvailable = true
|
||||
widgetIconName = 'package-up'
|
||||
else
|
||||
updateAvailable = false
|
||||
widgetIconName = 'package'
|
||||
end
|
||||
widget.icon:set_image(PATH_TO_ICONS .. widgetIconName .. '.svg')
|
||||
collectgarbage('collect')
|
||||
end,
|
||||
widget
|
||||
)
|
||||
|
||||
return widget_button
|
||||
37
RICE/redhound/widget/ram/ram-meter.lua
Normal file
37
RICE/redhound/widget/ram/ram-meter.lua
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
local wibox = require('wibox')
|
||||
local mat_list_item = require('widget.material.list-item')
|
||||
local mat_slider = require('widget.material.slider')
|
||||
local mat_icon = require('widget.material.icon')
|
||||
local icons = require('theme.icons')
|
||||
local watch = require('awful.widget.watch')
|
||||
local dpi = require('beautiful').xresources.apply_dpi
|
||||
|
||||
local slider =
|
||||
wibox.widget {
|
||||
read_only = true,
|
||||
widget = mat_slider
|
||||
}
|
||||
|
||||
watch(
|
||||
'bash -c "free | grep -z Mem.*Swap.*"',
|
||||
1,
|
||||
function(_, stdout)
|
||||
local total, used, free, shared, buff_cache, available, total_swap, used_swap, free_swap =
|
||||
stdout:match('(%d+)%s*(%d+)%s*(%d+)%s*(%d+)%s*(%d+)%s*(%d+)%s*Swap:%s*(%d+)%s*(%d+)%s*(%d+)')
|
||||
slider:set_value(used / total * 100)
|
||||
collectgarbage('collect')
|
||||
end
|
||||
)
|
||||
|
||||
local ram_meter =
|
||||
wibox.widget {
|
||||
wibox.widget {
|
||||
icon = icons.memory,
|
||||
size = dpi(24),
|
||||
widget = mat_icon
|
||||
},
|
||||
slider,
|
||||
widget = mat_list_item
|
||||
}
|
||||
|
||||
return ram_meter
|
||||
163
RICE/redhound/widget/tag-list.lua
Normal file
163
RICE/redhound/widget/tag-list.lua
Normal file
|
|
@ -0,0 +1,163 @@
|
|||
local awful = require('awful')
|
||||
local wibox = require('wibox')
|
||||
local dpi = require('beautiful').xresources.apply_dpi
|
||||
local capi = {button = _G.button}
|
||||
local clickable_container = require('widget.material.clickable-container')
|
||||
local modkey = require('configuration.keys.mod').modKey
|
||||
--- Common method to create buttons.
|
||||
-- @tab buttons
|
||||
-- @param object
|
||||
-- @treturn table
|
||||
local function create_buttons(buttons, object)
|
||||
if buttons then
|
||||
local btns = {}
|
||||
for _, b in ipairs(buttons) do
|
||||
-- Create a proxy button object: it will receive the real
|
||||
-- press and release events, and will propagate them to the
|
||||
-- button object the user provided, but with the object as
|
||||
-- argument.
|
||||
local btn = capi.button {modifiers = b.modifiers, button = b.button}
|
||||
btn:connect_signal(
|
||||
'press',
|
||||
function()
|
||||
b:emit_signal('press', object)
|
||||
end
|
||||
)
|
||||
btn:connect_signal(
|
||||
'release',
|
||||
function()
|
||||
b:emit_signal('release', object)
|
||||
end
|
||||
)
|
||||
btns[#btns + 1] = btn
|
||||
end
|
||||
|
||||
return btns
|
||||
end
|
||||
end
|
||||
|
||||
local function list_update(w, buttons, label, data, objects)
|
||||
-- update the widgets, creating them if needed
|
||||
w:reset()
|
||||
for i, o in ipairs(objects) do
|
||||
local cache = data[o]
|
||||
local ib, tb, bgb, tbm, ibm, l, bg_clickable
|
||||
if cache then
|
||||
ib = cache.ib
|
||||
tb = cache.tb
|
||||
bgb = cache.bgb
|
||||
tbm = cache.tbm
|
||||
ibm = cache.ibm
|
||||
else
|
||||
ib = wibox.widget.imagebox()
|
||||
tb = wibox.widget.textbox()
|
||||
bgb = wibox.container.background()
|
||||
tbm = wibox.container.margin(tb, dpi(8), dpi(8), dpi(2), dpi(2))
|
||||
ibm = wibox.container.margin(ib, dpi(8), dpi(8), dpi(9), dpi(9))
|
||||
l = wibox.layout.fixed.horizontal()
|
||||
bg_clickable = clickable_container()
|
||||
|
||||
-- All of this is added in a fixed widget
|
||||
l:fill_space(true)
|
||||
l:add(ibm)
|
||||
-- l:add(tbm)
|
||||
bg_clickable:set_widget(l)
|
||||
|
||||
-- And all of this gets a background
|
||||
bgb:set_widget(bg_clickable)
|
||||
|
||||
bgb:buttons(create_buttons(buttons, o))
|
||||
|
||||
data[o] = {
|
||||
ib = ib,
|
||||
tb = tb,
|
||||
bgb = bgb,
|
||||
tbm = tbm,
|
||||
ibm = ibm
|
||||
}
|
||||
end
|
||||
|
||||
local text, bg, bg_image, icon, args = label(o, tb)
|
||||
args = args or {}
|
||||
|
||||
-- The text might be invalid, so use pcall.
|
||||
if text == nil or text == '' then
|
||||
tbm:set_margins(0)
|
||||
else
|
||||
if not tb:set_markup_silently(text) then
|
||||
tb:set_markup('<i><Invalid text></i>')
|
||||
end
|
||||
end
|
||||
bgb:set_bg(bg)
|
||||
if type(bg_image) == 'function' then
|
||||
-- TODO: Why does this pass nil as an argument?
|
||||
bg_image = bg_image(tb, o, nil, objects, i)
|
||||
end
|
||||
bgb:set_bgimage(bg_image)
|
||||
if icon then
|
||||
ib.image = icon
|
||||
else
|
||||
ibm:set_margins(0)
|
||||
end
|
||||
|
||||
bgb.shape = args.shape
|
||||
bgb.shape_border_width = args.shape_border_width
|
||||
bgb.shape_border_color = args.shape_border_color
|
||||
|
||||
w:add(bgb)
|
||||
end
|
||||
end
|
||||
|
||||
local TagList = function(s)
|
||||
return awful.widget.taglist(
|
||||
s,
|
||||
awful.widget.taglist.filter.all,
|
||||
awful.util.table.join(
|
||||
awful.button(
|
||||
{},
|
||||
1,
|
||||
function(t)
|
||||
t:view_only()
|
||||
end
|
||||
),
|
||||
awful.button(
|
||||
{modkey},
|
||||
1,
|
||||
function(t)
|
||||
if _G.client.focus then
|
||||
_G.client.focus:move_to_tag(t)
|
||||
t:view_only()
|
||||
end
|
||||
end
|
||||
),
|
||||
awful.button({}, 3, awful.tag.viewtoggle),
|
||||
awful.button(
|
||||
{modkey},
|
||||
3,
|
||||
function(t)
|
||||
if _G.client.focus then
|
||||
_G.client.focus:toggle_tag(t)
|
||||
end
|
||||
end
|
||||
),
|
||||
awful.button(
|
||||
{},
|
||||
4,
|
||||
function(t)
|
||||
awful.tag.viewprev(t.screen)
|
||||
end
|
||||
),
|
||||
awful.button(
|
||||
{},
|
||||
5,
|
||||
function(t)
|
||||
awful.tag.viewnext(t.screen)
|
||||
end
|
||||
)
|
||||
),
|
||||
{},
|
||||
list_update,
|
||||
wibox.layout.fixed.horizontal()
|
||||
)
|
||||
end
|
||||
return TagList
|
||||
220
RICE/redhound/widget/task-list.lua
Normal file
220
RICE/redhound/widget/task-list.lua
Normal file
|
|
@ -0,0 +1,220 @@
|
|||
local awful = require('awful')
|
||||
local wibox = require('wibox')
|
||||
local dpi = require('beautiful').xresources.apply_dpi
|
||||
local capi = {button = _G.button}
|
||||
local gears = require('gears')
|
||||
local clickable_container = require('widget.material.clickable-container')
|
||||
local tasklist_mode = 'icon' --anything else = text
|
||||
local tasklist_close = false
|
||||
--- Common method to create buttons.
|
||||
-- @tab buttons
|
||||
-- @param object
|
||||
-- @treturn table
|
||||
local function create_buttons(buttons, object)
|
||||
if buttons then
|
||||
local btns = {}
|
||||
for _, b in ipairs(buttons) do
|
||||
-- Create a proxy button object: it will receive the real
|
||||
-- press and release events, and will propagate them to the
|
||||
-- button object the user provided, but with the object as
|
||||
-- argument.
|
||||
local btn = capi.button {modifiers = b.modifiers, button = b.button}
|
||||
btn:connect_signal(
|
||||
'press',
|
||||
function()
|
||||
b:emit_signal('press', object)
|
||||
end
|
||||
)
|
||||
btn:connect_signal(
|
||||
'release',
|
||||
function()
|
||||
b:emit_signal('release', object)
|
||||
end
|
||||
)
|
||||
btns[#btns + 1] = btn
|
||||
end
|
||||
|
||||
return btns
|
||||
end
|
||||
end
|
||||
|
||||
local function list_update(w, buttons, label, data, objects)
|
||||
-- update the widgets, creating them if needed
|
||||
w:reset()
|
||||
for i, o in ipairs(objects) do
|
||||
local cache = data[o]
|
||||
local ib, cb, tb, cbm, bgb, tbm, ibm, tt, l, ll, bg_clickable
|
||||
if cache then
|
||||
ib = cache.ib
|
||||
tb = cache.tb
|
||||
bgb = cache.bgb
|
||||
tbm = cache.tbm
|
||||
ibm = cache.ibm
|
||||
tt = cache.tt
|
||||
else
|
||||
ib = wibox.widget.imagebox()
|
||||
tb = wibox.widget.textbox()
|
||||
cb =
|
||||
clickable_container(
|
||||
wibox.container.margin(
|
||||
wibox.widget.imagebox(os.getenv('HOME') .. '/.config/awesome/theme/icons/tag-list/tag/close.png'),
|
||||
4,
|
||||
4,
|
||||
4,
|
||||
4
|
||||
)
|
||||
)
|
||||
cb.shape = gears.shape.circle
|
||||
cbm = wibox.container.margin(cb, dpi(4), dpi(8), dpi(12), dpi(12))
|
||||
cbm:buttons(
|
||||
gears.table.join(
|
||||
awful.button(
|
||||
{},
|
||||
1,
|
||||
nil,
|
||||
function()
|
||||
o.kill(o)
|
||||
end
|
||||
)
|
||||
)
|
||||
)
|
||||
bg_clickable = clickable_container()
|
||||
bgb = wibox.container.background()
|
||||
tbm = wibox.container.margin(tb, dpi(4), dpi(4))
|
||||
ibm = wibox.container.margin(ib, dpi(12), dpi(8), dpi(8), dpi(8))
|
||||
l = wibox.layout.fixed.horizontal()
|
||||
ll = wibox.layout.fixed.horizontal()
|
||||
|
||||
-- All of this is added in a fixed widget
|
||||
l:fill_space(true)
|
||||
l:add(ibm)
|
||||
l:add(tbm)
|
||||
ll:add(l)
|
||||
if tasklist_close then
|
||||
ll:add(cbm)
|
||||
end
|
||||
|
||||
bg_clickable:set_widget(ll)
|
||||
-- And all of this gets a background
|
||||
bgb:set_widget(bg_clickable)
|
||||
|
||||
l:buttons(create_buttons(buttons, o))
|
||||
|
||||
-- Tooltip to display whole title, if it was truncated
|
||||
tt = awful.tooltip({
|
||||
objects = {tb},
|
||||
mode = 'outside',
|
||||
align = 'bottom',
|
||||
delay_show = 1,
|
||||
})
|
||||
|
||||
data[o] = {
|
||||
ib = ib,
|
||||
tb = tb,
|
||||
bgb = bgb,
|
||||
tbm = tbm,
|
||||
ibm = ibm,
|
||||
tt = tt
|
||||
}
|
||||
end
|
||||
|
||||
local text, bg, bg_image, icon, args = label(o, tb)
|
||||
args = args or {}
|
||||
|
||||
-- The text might be invalid, so use pcall.
|
||||
if tasklist_mode == 'icon' then
|
||||
text = nil
|
||||
end
|
||||
if text == nil or text == '' then
|
||||
tbm:set_margins(0)
|
||||
else
|
||||
-- truncate when title is too long
|
||||
local textOnly = text:match('>(.-)<')
|
||||
if (textOnly:len() > 24) then
|
||||
text = text:gsub('>(.-)<', '>' .. textOnly:sub(1, 21) .. '...<')
|
||||
tt:set_text(textOnly)
|
||||
tt:add_to_object(tb)
|
||||
else
|
||||
tt:remove_from_object(tb)
|
||||
end
|
||||
if not tb:set_markup_silently(text) then
|
||||
tb:set_markup('<i><Invalid text></i>')
|
||||
end
|
||||
end
|
||||
bgb:set_bg(bg)
|
||||
if type(bg_image) == 'function' then
|
||||
-- TODO: Why does this pass nil as an argument?
|
||||
bg_image = bg_image(tb, o, nil, objects, i)
|
||||
end
|
||||
bgb:set_bgimage(bg_image)
|
||||
if icon then
|
||||
ib.image = icon
|
||||
ib.resize = true
|
||||
else
|
||||
ibm:set_margins(0)
|
||||
end
|
||||
|
||||
bgb.shape = args.shape
|
||||
bgb.shape_border_width = args.shape_border_width
|
||||
bgb.shape_border_color = args.shape_border_color
|
||||
|
||||
w:add(bgb)
|
||||
end
|
||||
end
|
||||
local tasklist_buttons =
|
||||
awful.util.table.join(
|
||||
awful.button(
|
||||
{},
|
||||
1,
|
||||
function(c)
|
||||
if c == _G.client.focus then
|
||||
c.minimized = true
|
||||
else
|
||||
-- Without this, the following
|
||||
-- :isvisible() makes no sense
|
||||
c.minimized = false
|
||||
if not c:isvisible() and c.first_tag then
|
||||
c.first_tag:view_only()
|
||||
end
|
||||
-- This will also un-minimize
|
||||
-- the client, if needed
|
||||
_G.client.focus = c
|
||||
c:raise()
|
||||
end
|
||||
end
|
||||
),
|
||||
awful.button(
|
||||
{},
|
||||
2,
|
||||
function(c)
|
||||
c.kill(c)
|
||||
end
|
||||
),
|
||||
awful.button(
|
||||
{},
|
||||
4,
|
||||
function()
|
||||
awful.client.focus.byidx(1)
|
||||
end
|
||||
),
|
||||
awful.button(
|
||||
{},
|
||||
5,
|
||||
function()
|
||||
awful.client.focus.byidx(-1)
|
||||
end
|
||||
)
|
||||
)
|
||||
|
||||
local TaskList = function(s)
|
||||
return awful.widget.tasklist(
|
||||
s,
|
||||
awful.widget.tasklist.filter.currenttags,
|
||||
tasklist_buttons,
|
||||
{},
|
||||
list_update,
|
||||
wibox.layout.fixed.horizontal()
|
||||
)
|
||||
end
|
||||
|
||||
return TaskList
|
||||
37
RICE/redhound/widget/temperature/temperature-meter.lua
Normal file
37
RICE/redhound/widget/temperature/temperature-meter.lua
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
local wibox = require('wibox')
|
||||
local mat_list_item = require('widget.material.list-item')
|
||||
local mat_slider = require('widget.material.slider')
|
||||
local mat_icon = require('widget.material.icon')
|
||||
local icons = require('theme.icons')
|
||||
local watch = require('awful.widget.watch')
|
||||
local dpi = require('beautiful').xresources.apply_dpi
|
||||
|
||||
local slider =
|
||||
wibox.widget {
|
||||
read_only = true,
|
||||
widget = mat_slider
|
||||
}
|
||||
|
||||
local max_temp = 80
|
||||
watch(
|
||||
'bash -c "cat /sys/class/thermal/thermal_zone0/temp"',
|
||||
1,
|
||||
function(_, stdout)
|
||||
local temp = stdout:match('(%d+)')
|
||||
slider:set_value((temp / 1000) / max_temp * 100)
|
||||
collectgarbage('collect')
|
||||
end
|
||||
)
|
||||
|
||||
local temperature_meter =
|
||||
wibox.widget {
|
||||
wibox.widget {
|
||||
icon = icons.thermometer,
|
||||
size = dpi(24),
|
||||
widget = mat_icon
|
||||
},
|
||||
slider,
|
||||
widget = mat_list_item
|
||||
}
|
||||
|
||||
return temperature_meter
|
||||
48
RICE/redhound/widget/volume/volume-slider.lua
Normal file
48
RICE/redhound/widget/volume/volume-slider.lua
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
local wibox = require('wibox')
|
||||
local mat_list_item = require('widget.material.list-item')
|
||||
local mat_slider = require('widget.material.slider')
|
||||
local mat_icon_button = require('widget.material.icon-button')
|
||||
local icons = require('theme.icons')
|
||||
local watch = require('awful.widget.watch')
|
||||
local spawn = require('awful.spawn')
|
||||
|
||||
local slider =
|
||||
wibox.widget {
|
||||
read_only = false,
|
||||
widget = mat_slider
|
||||
}
|
||||
|
||||
slider:connect_signal(
|
||||
'property::value',
|
||||
function()
|
||||
spawn('amixer -D pulse sset Master ' .. slider.value .. '%')
|
||||
end
|
||||
)
|
||||
|
||||
watch(
|
||||
[[bash -c "amixer -D pulse sget Master"]],
|
||||
1,
|
||||
function(_, stdout)
|
||||
local mute = string.match(stdout, '%[(o%D%D?)%]')
|
||||
local volume = string.match(stdout, '(%d?%d?%d)%%')
|
||||
slider:set_value(tonumber(volume))
|
||||
collectgarbage('collect')
|
||||
end
|
||||
)
|
||||
|
||||
local icon =
|
||||
wibox.widget {
|
||||
image = icons.volume,
|
||||
widget = wibox.widget.imagebox
|
||||
}
|
||||
|
||||
local button = mat_icon_button(icon)
|
||||
|
||||
local volume_setting =
|
||||
wibox.widget {
|
||||
button,
|
||||
slider,
|
||||
widget = mat_list_item
|
||||
}
|
||||
|
||||
return volume_setting
|
||||
5
RICE/redhound/widget/wifi/icons/wifi-off.svg
Normal file
5
RICE/redhound/widget/wifi/icons/wifi-off.svg
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="full" width="240" height="240" viewBox="0 0 24.00 24.00" enable-background="new 0 0 24.00 24.00" xml:space="preserve">
|
||||
<path fill="#ffffff" fill-opacity="1" stroke-width="0.2" stroke-linejoin="round" d="M 2.275,2.9978L 1.00125,4.2675L 2.47125,5.7425C 2.03625,6.01125 1.60625,6.29375 1.20125,6.60125L 2.9975,8.99875C 3.525,8.60375 4.0775,8.2475 4.65875,7.925L 6.885,10.1563C 6.1475,10.4975 5.44375,10.9125 4.8,11.3963L 6.60125,13.7987C 7.3775,13.2175 8.25625,12.7737 9.19875,12.4663L 11.7525,15.02C 10.4975,15.0738 9.34125,15.4937 8.39875,16.2013L 12.0025,21.0012L 14.4575,17.725L 17.735,21.0012L 18.9988,19.7213M 12.0025,2.9978C 9.85375,2.9978 7.8025,3.38354 5.89875,4.0725L 8.29125,6.465C 9.4775,6.1625 10.7175,6.00125 12.0025,6.00125C 15.3763,6.00125 18.4912,7.11375 21.0013,8.99875L 22.8025,6.60125C 19.79,4.34125 16.055,2.9978 12.0025,2.9978 Z M 12.0025,8.99875C 11.6212,8.99875 11.25,9.01875 10.8788,9.0525L 14.0675,12.2463C 15.2925,12.5337 16.4262,13.0662 17.4025,13.7987L 19.1988,11.3963C 17.1975,9.8925 14.7025,8.99875 12.0025,8.99875 Z "/>
|
||||
</svg>
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="full" width="240" height="240" viewBox="0 0 24.00 24.00" enable-background="new 0 0 24.00 24.00" xml:space="preserve">
|
||||
<path fill="#ffffff" fill-opacity="1" stroke-width="0.2" stroke-linejoin="round" d="M 12.0025,2.9978C 7.7875,3.0075 3.70125,4.41375 0.376253,7.0025C 4.41375,12.06 7.89125,16.3725 12.0113,21.4887C 14.4537,18.4475 16.675,15.6838 18.9988,12.7837L 18.9988,9.585L 15.605,13.8088C 14.4775,13.2813 13.2475,13.0075 12.0025,12.9975C 10.7525,13.0025 9.52125,13.2762 8.38875,13.8038L 3.27125,7.43625C 5.90875,5.85 8.92625,5.01 12.0025,5C 15.0737,5.015 18.0863,5.85875 20.7125,7.45125L 20.2734,7.9975L 22.8412,7.9975C 23.0859,7.7 23.4125,7.29 23.6475,7.0025C 20.3175,4.40875 16.2212,3.0025 12.0025,2.9978 Z M 21.0013,10L 21.0013,17.9975L 22.9975,17.9975L 22.9975,10M 21.0013,20L 21.0013,22.0025L 22.9975,22.0025L 22.9975,20"/>
|
||||
</svg>
|
||||
5
RICE/redhound/widget/wifi/icons/wifi-strength-1-lock.svg
Normal file
5
RICE/redhound/widget/wifi/icons/wifi-strength-1-lock.svg
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="full" width="240" height="240" viewBox="0 0 24.00 24.00" enable-background="new 0 0 24.00 24.00" xml:space="preserve">
|
||||
<path fill="#ffffff" fill-opacity="1" stroke-width="0.2" stroke-linejoin="miter" d="M 12,3C 16.2186,3.0034 20.3164,4.4107 23.6465,7L 21.5449,9.6152L 20.5,9.5C 19.9322,9.5017 19.3688,9.6001 18.834,9.791L 20.7148,7.4492C 18.0847,5.8602 15.0729,5.0137 12,5C 8.92354,5.0077 5.90684,5.8502 3.27148,7.4375L 8.39063,13.8047C 9.52116,13.2779 10.7528,13.0033 12,13C 13.228,13.0054 14.4394,13.2762 15.5547,13.7891L 15.5,14.5L 15.5,17.1445L 12.0098,21.4902L 0.375001,7C 3.69964,4.4152 7.78879,3.0082 12,3 Z M 23,16C 23.5,16 24,16.5 24,17L 24,21C 24,21.5 23.5,22 23,22L 18,22C 17.5,22 17,21.5 17,21L 17,17C 17,16.5 17.5,16 18,16L 18,14.5C 18,13.1 19.1,12 20.5,12C 21.9,12 23,13.1 23,14.5L 23,16 Z M 22,16L 22,14.5C 22,13.7 21.3,13 20.5,13C 19.7,13 19,13.7 19,14.5L 19,16L 22,16 Z "/>
|
||||
</svg>
|
||||
5
RICE/redhound/widget/wifi/icons/wifi-strength-1.svg
Normal file
5
RICE/redhound/widget/wifi/icons/wifi-strength-1.svg
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="full" width="240" height="240" viewBox="0 0 24.00 24.00" enable-background="new 0 0 24.00 24.00" xml:space="preserve">
|
||||
<path fill="#ffffff" fill-opacity="1" stroke-width="0.2" stroke-linejoin="round" d="M 12.0025,2.9978C 7.7875,3.0075 3.70125,4.41375 0.376253,7.0025C 4.41375,12.06 7.89125,16.3725 12.0113,21.4887C 16.0787,16.4212 20.2393,11.235 23.6475,7.0025C 20.3175,4.40875 16.2212,3.0025 12.0025,2.9978 Z M 12.0025,5C 15.0737,5.015 18.0863,5.85875 20.7125,7.45125L 15.605,13.8088C 14.4775,13.2813 13.2475,13.0075 12.0025,12.9975C 10.7525,13.0025 9.52125,13.2762 8.38875,13.8038L 3.27125,7.43625C 5.90875,5.85 8.92625,5.01 12.0025,5 Z "/>
|
||||
</svg>
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="full" width="240" height="240" viewBox="0 0 24.00 24.00" enable-background="new 0 0 24.00 24.00" xml:space="preserve">
|
||||
<path fill="#ffffff" fill-opacity="1" stroke-width="0.2" stroke-linejoin="round" d="M 12.0025,2.9978C 7.7875,3.0075 3.70125,4.41375 0.376253,7.0025C 4.41375,12.06 7.89125,16.3725 12.0113,21.4887C 14.4537,18.4475 16.675,15.6838 18.9988,12.7837L 18.9988,9.585L 17.525,11.4263C 16.26,10.7425 14.37,10 12.0025,10C 9.61875,10 7.74375,10.7475 6.485,11.4312L 3.27125,7.43625C 5.90875,5.85 8.92625,5.01 12.0025,5C 15.0737,5.015 18.0863,5.85875 20.7125,7.45125L 20.2734,7.9975L 22.8412,7.9975C 23.0859,7.7 23.4125,7.29 23.6475,7.0025C 20.3175,4.40875 16.2212,3.0025 12.0025,2.9978 Z M 21.0013,10L 21.0013,17.9975L 22.9975,17.9975L 22.9975,10M 21.0013,20L 21.0013,22.0025L 22.9975,22.0025L 22.9975,20"/>
|
||||
</svg>
|
||||
5
RICE/redhound/widget/wifi/icons/wifi-strength-2-lock.svg
Normal file
5
RICE/redhound/widget/wifi/icons/wifi-strength-2-lock.svg
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="full" width="240" height="240" viewBox="0 0 24.00 24.00" enable-background="new 0 0 24.00 24.00" xml:space="preserve">
|
||||
<path fill="#ffffff" fill-opacity="1" stroke-width="1.33333" stroke-linejoin="miter" d="M 12,3C 7.78879,3.0082 3.69964,4.4152 0.375001,7C 4.41565,12.0621 7.89151,16.3706 12.0098,21.4902C 13.2298,19.9701 14.2858,18.6573 15.5,17.1445L 15.5,14.5C 15.5015,13.2371 15.9809,12.0216 16.8418,11.0977C 15.6151,10.5259 13.9903,10 12,10C 9.6198,10 7.74414,10.7453 6.48242,11.4316L 3.27148,7.4375C 5.90684,5.8502 8.92354,5.0077 12,5C 15.0729,5.0137 18.0847,5.8602 20.7148,7.4492L 18.834,9.791C 19.3688,9.6001 19.9322,9.5017 20.5,9.5C 20.8514,9.5016 21.2016,9.5402 21.5449,9.6152C 22.2041,8.7951 23.0317,7.7642 23.6465,7C 20.316,4.4107 16.2186,3.0034 12,3 Z M 20.5,12C 19.1,12 18,13.1 18,14.5L 18,16C 17.5,16 17,16.5 17,17L 17,21C 17,21.5 17.5,22 18,22L 23,22C 23.5,22 24,21.5 24,21L 24,17C 24,16.5 23.5,16 23,16L 23,14.5C 23,13.1 21.9,12 20.5,12 Z M 20.5,13C 21.3,13 22,13.7 22,14.5L 22,16L 19,16L 19,14.5C 19,13.7 19.7,13 20.5,13 Z "/>
|
||||
</svg>
|
||||
5
RICE/redhound/widget/wifi/icons/wifi-strength-2.svg
Normal file
5
RICE/redhound/widget/wifi/icons/wifi-strength-2.svg
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="full" width="240" height="240" viewBox="0 0 24.00 24.00" enable-background="new 0 0 24.00 24.00" xml:space="preserve">
|
||||
<path fill="#ffffff" fill-opacity="1" stroke-width="0.2" stroke-linejoin="round" d="M 12.0025,2.9978C 7.7875,3.0075 3.70125,4.41375 0.376253,7.0025C 4.41375,12.06 7.89125,16.3725 12.0113,21.4887C 16.0787,16.4212 20.2393,11.235 23.6475,7.0025C 20.3175,4.40875 16.2212,3.0025 12.0025,2.9978 Z M 12.0025,5C 15.0737,5.015 18.0863,5.85875 20.7125,7.45125L 17.525,11.4263C 16.26,10.7425 14.37,10 12.0025,10C 9.61875,10 7.74375,10.7475 6.485,11.4312L 3.27125,7.43625C 5.90875,5.85 8.92625,5.01 12.0025,5 Z "/>
|
||||
</svg>
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="full" width="240" height="240" viewBox="0 0 24.00 24.00" enable-background="new 0 0 24.00 24.00" xml:space="preserve">
|
||||
<path fill="#ffffff" fill-opacity="1" stroke-width="0.2" stroke-linejoin="round" d="M 12.0025,2.9978C 7.7875,3.0075 3.70125,4.41375 0.376253,7.0025C 4.41375,12.06 7.89125,16.3725 12.0113,21.4887C 14.4537,18.4475 16.675,15.6838 18.9988,12.7837L 18.9988,9.585L 18.765,9.8825C 17.2612,8.98375 14.8775,7.9975 12.0025,7.9975C 8.98875,7.9975 6.68,9.00875 5.205,9.84375L 3.27125,7.43625C 5.90875,5.85 8.92625,5.01 12.0025,5C 15.0737,5.015 18.0863,5.85875 20.7125,7.45125L 20.2734,7.9975L 22.8412,7.9975C 23.0859,7.7 23.4125,7.29 23.6475,7.0025C 20.3175,4.40875 16.2212,3.0025 12.0025,2.9978 Z M 21.0013,10L 21.0013,17.9975L 22.9975,17.9975L 22.9975,10M 21.0013,20L 21.0013,22.0025L 22.9975,22.0025L 22.9975,20"/>
|
||||
</svg>
|
||||
5
RICE/redhound/widget/wifi/icons/wifi-strength-3-lock.svg
Normal file
5
RICE/redhound/widget/wifi/icons/wifi-strength-3-lock.svg
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="full" width="240" height="240" viewBox="0 0 24.00 24.00" enable-background="new 0 0 24.00 24.00" xml:space="preserve">
|
||||
<path fill="#ffffff" fill-opacity="1" stroke-width="0.2" stroke-linejoin="miter" d="M 12,3C 7.78879,3.0082 3.69964,4.4152 0.375001,7C 4.41565,12.0621 7.89151,16.3706 12.0098,21.4902C 13.2298,19.9701 14.2858,18.6573 15.5,17.1445L 15.5,14.5C 15.5021,12.4384 16.7694,10.5895 18.6914,9.8437C 17.1861,8.9591 14.8388,8 12,8C 8.98887,8 6.67914,9.0065 5.20313,9.8418L 3.27148,7.4375C 5.90684,5.8502 8.92354,5.0077 12,5C 15.0729,5.0137 18.0847,5.8602 20.7148,7.4492L 18.8359,9.791C 19.3701,9.6003 19.9328,9.5019 20.5,9.5C 20.8514,9.5016 21.2016,9.5402 21.5449,9.6152C 22.2041,8.7951 23.0317,7.7642 23.6465,7C 20.3164,4.4107 16.2186,3.0034 12,3 Z M 20.5,12C 19.1,12 18,13.1 18,14.5L 18,16C 17.5,16 17,16.5 17,17L 17,21C 17,21.5 17.5,22 18,22L 23,22C 23.5,22 24,21.5 24,21L 24,17C 24,16.5 23.5,16 23,16L 23,14.5C 23,13.1 21.9,12 20.5,12 Z M 20.5,13C 21.3,13 22,13.7 22,14.5L 22,16L 19,16L 19,14.5C 19,13.7 19.7,13 20.5,13 Z "/>
|
||||
</svg>
|
||||
5
RICE/redhound/widget/wifi/icons/wifi-strength-3.svg
Normal file
5
RICE/redhound/widget/wifi/icons/wifi-strength-3.svg
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="full" width="240" height="240" viewBox="0 0 24.00 24.00" enable-background="new 0 0 24.00 24.00" xml:space="preserve">
|
||||
<path fill="#ffffff" fill-opacity="1" stroke-width="0.2" stroke-linejoin="round" d="M 12.0025,2.9978C 7.7875,3.0075 3.70125,4.41375 0.376253,7.0025C 4.41375,12.06 7.89125,16.3725 12.0113,21.4887C 16.0787,16.4212 20.2393,11.235 23.6475,7.0025C 20.3175,4.40875 16.2212,3.0025 12.0025,2.9978 Z M 12.0025,5C 15.0737,5.015 18.0863,5.85875 20.7125,7.45125L 18.765,9.8825C 17.2612,8.98375 14.8775,7.9975 12.0025,7.9975C 8.98875,7.9975 6.68,9.00875 5.205,9.84375L 3.27125,7.43625C 5.90875,5.85 8.92625,5.01 12.0025,5 Z "/>
|
||||
</svg>
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="full" width="240" height="240" viewBox="0 0 24.00 24.00" enable-background="new 0 0 24.00 24.00" xml:space="preserve">
|
||||
<path fill="#ffffff" fill-opacity="1" stroke-width="0.2" stroke-linejoin="round" d="M 12.0025,2.9978C 7.7875,3.0075 3.70125,4.41375 0.376253,7.0025C 4.41375,12.06 7.89125,16.3725 12.0113,21.4887C 14.4537,18.4475 16.675,15.6838 18.9988,12.7837L 18.9988,7.9975L 22.8412,7.9975C 23.0859,7.7 23.4125,7.29 23.6475,7.0025C 20.3175,4.40875 16.2212,3.0025 12.0025,2.9978 Z M 21.0013,10L 21.0013,17.9975L 22.9975,17.9975L 22.9975,10M 21.0013,20L 21.0013,22.0025L 22.9975,22.0025L 22.9975,20"/>
|
||||
</svg>
|
||||
5
RICE/redhound/widget/wifi/icons/wifi-strength-4-lock.svg
Normal file
5
RICE/redhound/widget/wifi/icons/wifi-strength-4-lock.svg
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="full" width="240" height="240" viewBox="0 0 24.00 24.00" enable-background="new 0 0 24.00 24.00" xml:space="preserve">
|
||||
<path fill="#ffffff" fill-opacity="1" stroke-width="1.33333" stroke-linejoin="miter" d="M 12,3C 7.78879,3.0082 3.69964,4.4152 0.375001,7C 4.41565,12.0621 7.89151,16.3706 12.0098,21.4902C 13.2298,19.9701 14.2858,18.6573 15.5,17.1445L 15.5,14.5C 15.5,11.7386 17.7386,9.5 20.5,9.5C 20.8514,9.5016 21.2016,9.5402 21.5449,9.6152C 22.2041,8.7951 23.0317,7.7642 23.6465,7C 20.316,4.4107 16.2186,3.0034 12,3 Z M 20.5,12C 19.1,12 18,13.1 18,14.5L 18,16C 17.5,16 17,16.5 17,17L 17,21C 17,21.5 17.5,22 18,22L 23,22C 23.5,22 24,21.5 24,21L 24,17C 24,16.5 23.5,16 23,16L 23,14.5C 23,13.1 21.9,12 20.5,12 Z M 20.5,13C 21.3,13 22,13.7 22,14.5L 22,16L 19,16L 19,14.5C 19,13.7 19.7,13 20.5,13 Z "/>
|
||||
</svg>
|
||||
5
RICE/redhound/widget/wifi/icons/wifi-strength-4.svg
Normal file
5
RICE/redhound/widget/wifi/icons/wifi-strength-4.svg
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="full" width="240" height="240" viewBox="0 0 24.00 24.00" enable-background="new 0 0 24.00 24.00" xml:space="preserve">
|
||||
<path fill="#ffffff" fill-opacity="1" stroke-width="0.2" stroke-linejoin="round" d="M 12.0025,2.9978C 7.7875,3.0075 3.70125,4.41375 0.376253,7.0025C 4.41375,12.06 7.89125,16.3725 12.0113,21.4887C 16.0787,16.4212 20.2393,11.235 23.6475,7.0025C 20.3175,4.40875 16.2212,3.0025 12.0025,2.9978 Z "/>
|
||||
</svg>
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="full" width="240" height="240" viewBox="0 0 24.00 24.00" enable-background="new 0 0 24.00 24.00" xml:space="preserve">
|
||||
<path fill="#ffffff" fill-opacity="1" stroke-width="0.2" stroke-linejoin="round" d="M 12.0025,2.9978C 7.7875,3.0075 3.70125,4.41375 0.376253,7.0025L 0.361252,7.0025C 4.24375,11.8313 8.125,16.66 12.0113,21.4887C 14.3413,18.5887 16.67,15.6838 18.9988,12.7837L 18.9988,9.585L 12.0025,18.3013L 3.27125,7.43625C 5.90375,5.85 8.92125,5.005 12.0025,5C 15.0737,5.015 18.0863,5.85875 20.7125,7.45125L 20.2734,7.9975L 22.8375,7.9975C 23.105,7.66625 23.3737,7.33375 23.6425,7.0025L 23.6475,7.0025C 20.3175,4.40875 16.2212,3.0025 12.0025,2.9978 Z M 21.0013,10L 21.0013,17.9975L 22.9975,17.9975L 22.9975,10M 21.0013,20L 21.0013,22.0025L 22.9975,22.0025L 22.9975,20"/>
|
||||
</svg>
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="full" width="240" height="240" viewBox="0 0 24.00 24.00" enable-background="new 0 0 24.00 24.00" xml:space="preserve">
|
||||
<path fill="#ffffff" fill-opacity="1" stroke-width="1.33333" stroke-linejoin="miter" d="M 12,3C 7.78946,3.0086 3.70106,4.4156 0.376954,7C 4.60705,12.3026 8.15995,16.7043 12.0098,21.4902C 13.2095,19.9999 14.2927,18.6499 15.5,17.1445L 15.5,14.5C 15.5019,14.2962 15.5162,14.0927 15.543,13.8906L 12.0039,18.2988L 3.26953,7.4355C 5.90565,5.8486 8.92306,5.0068 12,5C 15.0729,5.0137 18.0847,5.8602 20.7148,7.4492L 18.834,9.791C 19.3688,9.6001 19.9322,9.5017 20.5,9.5C 20.8521,9.5021 21.203,9.5414 21.5469,9.6172C 22.2135,8.7884 23.0231,7.7739 23.6484,7C 20.3175,4.4103 16.2192,3.003 12,3 Z M 20.5,12C 19.1,12 18,13.1 18,14.5L 18,16C 17.5,16 17,16.5 17,17L 17,21C 17,21.5 17.5,22 18,22L 23,22C 23.5,22 24,21.5 24,21L 24,17C 24,16.5 23.5,16 23,16L 23,14.5C 23,13.1 21.9,12 20.5,12 Z M 20.5,13C 21.3,13 22,13.7 22,14.5L 22,16L 19,16L 19,14.5C 19,13.7 19.7,13 20.5,13 Z "/>
|
||||
</svg>
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="full" width="240" height="240" viewBox="0 0 24.00 24.00" enable-background="new 0 0 24.00 24.00" xml:space="preserve">
|
||||
<path fill="#ffffff" fill-opacity="1" stroke-width="0.2" stroke-linejoin="round" d="M 3.27125,1.44L 2.0025,2.71948L 4.0525,4.77C 2.75375,5.37125 1.51875,6.11375 0.376253,7.0025C 4.20375,11.7963 8.135,16.67 12.0113,21.4887L 15.9087,16.6313L 19.2288,19.9513L 20.4975,18.6813C 14.8688,13.0425 3.27125,1.44 3.27125,1.44 Z M 12.0025,2.9978C 10.5962,3.0025 9.20875,3.17375 7.86125,3.48125L 9.56,5.185C 10.3662,5.06875 11.1812,5 12.0025,5C 15.0737,5.015 18.0863,5.85875 20.7125,7.45125L 16.7575,12.3825L 18.1787,13.8038C 20.0787,11.4312 22.0163,9.02375 23.6475,7.0025C 20.3175,4.40875 16.2212,3.0025 12.0025,2.9978 Z M 5.56625,6.28875L 14.4875,15.205L 12.0025,18.3013L 3.27125,7.43625C 4.00875,6.9925 4.775,6.61125 5.56625,6.28875 Z "/>
|
||||
</svg>
|
||||
5
RICE/redhound/widget/wifi/icons/wifi-strength-off.svg
Normal file
5
RICE/redhound/widget/wifi/icons/wifi-strength-off.svg
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="full" width="240" height="240" viewBox="0 0 24.00 24.00" enable-background="new 0 0 24.00 24.00" xml:space="preserve">
|
||||
<path fill="#ffffff" fill-opacity="1" stroke-width="0.2" stroke-linejoin="round" d="M 3.27125,1.44L 2.0025,2.71948L 4.0525,4.77C 2.75375,5.37125 1.51875,6.11375 0.376253,7.0025C 4.41375,12.06 12.0113,21.4887 12.0113,21.4887L 15.9125,16.6313L 19.2288,19.9513L 20.4975,18.6813M 12.0025,2.9978C 10.5962,3.0025 9.20875,3.17375 7.86125,3.48125L 18.1787,13.8088C 20.025,11.5087 22.0462,8.98875 23.6475,7.0025C 20.3175,4.40875 16.2212,3.0025 12.0025,2.9978 Z "/>
|
||||
</svg>
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="full" width="240" height="240" viewBox="0 0 24.00 24.00" enable-background="new 0 0 24.00 24.00" xml:space="preserve">
|
||||
<path fill="#ffffff" fill-opacity="1" stroke-width="0.2" stroke-linejoin="round" d="M 12.0025,2.9978C 7.7875,3.0075 3.70125,4.41375 0.376253,7.0025L 0.361252,7.0025C 4.24375,11.8313 8.125,16.66 12.0113,21.4887C 15.8888,16.66 19.7662,11.8313 23.6425,7.0025L 23.6475,7.0025C 20.3175,4.40875 16.2212,3.0025 12.0025,2.9978 Z M 12.0025,5C 15.0737,5.015 18.0863,5.85875 20.7125,7.45125L 12.0025,18.3013L 3.27125,7.43625C 5.90375,5.85 8.92125,5.005 12.0025,5 Z "/>
|
||||
</svg>
|
||||
5
RICE/redhound/widget/wifi/icons/wifi.svg
Normal file
5
RICE/redhound/widget/wifi/icons/wifi.svg
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="full" width="240" height="240" viewBox="0 0 24.00 24.00" enable-background="new 0 0 24.00 24.00" xml:space="preserve">
|
||||
<path fill="#ffffff" fill-opacity="1" stroke-width="0.2" stroke-linejoin="round" d="M 12,21L 15.6002,16.1997C 14.5974,15.4464 13.3508,15 12,15C 10.6492,15 9.40262,15.4464 8.39979,16.1997L 12,21 Z M 12,3C 7.94753,3 4.20785,4.33919 1.19937,6.59916L 2.99947,8.9993C 5.50654,7.116 8.62294,6.00001 12,6.00001C 15.377,6.00001 18.4934,7.116 21.0005,8.99931L 22.8006,6.59916C 19.7921,4.33919 16.0525,3 12,3 Z M 12,9C 9.29836,9 6.80524,9.8928 4.79958,11.3994L 6.59968,13.7996C 8.10393,12.6696 9.97376,12 12,12C 14.0262,12 15.8961,12.6696 17.4003,13.7996L 19.2004,11.3994C 17.1948,9.8928 14.7016,9 12,9 Z "/>
|
||||
</svg>
|
||||
115
RICE/redhound/widget/wifi/init.lua
Normal file
115
RICE/redhound/widget/wifi/init.lua
Normal file
|
|
@ -0,0 +1,115 @@
|
|||
-------------------------------------------------
|
||||
-- Battery Widget for Awesome Window Manager
|
||||
-- Shows the battery status using the ACPI tool
|
||||
-- More details could be found here:
|
||||
-- https://github.com/streetturtle/awesome-wm-widgets/tree/master/battery-widget
|
||||
|
||||
-- @author Pavel Makhov
|
||||
-- @copyright 2017 Pavel Makhov
|
||||
-------------------------------------------------
|
||||
|
||||
local awful = require('awful')
|
||||
local watch = require('awful.widget.watch')
|
||||
local wibox = require('wibox')
|
||||
local clickable_container = require('widget.material.clickable-container')
|
||||
local gears = require('gears')
|
||||
local dpi = require('beautiful').xresources.apply_dpi
|
||||
|
||||
-- acpi sample outputs
|
||||
-- Battery 0: Discharging, 75%, 01:51:38 remaining
|
||||
-- Battery 0: Charging, 53%, 00:57:43 until charged
|
||||
|
||||
local HOME = os.getenv('HOME')
|
||||
local PATH_TO_ICONS = HOME .. '/.config/awesome/widget/wifi/icons/'
|
||||
local interface = 'wlp3s0'
|
||||
local connected = false
|
||||
local essid = 'N/A'
|
||||
|
||||
local widget =
|
||||
wibox.widget {
|
||||
{
|
||||
id = 'icon',
|
||||
widget = wibox.widget.imagebox,
|
||||
resize = true
|
||||
},
|
||||
layout = wibox.layout.align.horizontal
|
||||
}
|
||||
|
||||
local widget_button = clickable_container(wibox.container.margin(widget, dpi(14), dpi(14), dpi(4), dpi(4)))
|
||||
widget_button:buttons(
|
||||
gears.table.join(
|
||||
awful.button(
|
||||
{},
|
||||
1,
|
||||
nil,
|
||||
function()
|
||||
awful.spawn('wicd-client -n')
|
||||
end
|
||||
)
|
||||
)
|
||||
)
|
||||
-- Alternative to naughty.notify - tooltip. You can compare both and choose the preferred one
|
||||
awful.tooltip(
|
||||
{
|
||||
objects = {widget_button},
|
||||
mode = 'outside',
|
||||
align = 'right',
|
||||
timer_function = function()
|
||||
if connected then
|
||||
return 'Connected to ' .. essid
|
||||
else
|
||||
return 'Wireless network is disconnected'
|
||||
end
|
||||
end,
|
||||
preferred_positions = {'right', 'left', 'top', 'bottom'},
|
||||
margin_leftright = dpi(8),
|
||||
margin_topbottom = dpi(8)
|
||||
}
|
||||
)
|
||||
|
||||
local function grabText()
|
||||
if connected then
|
||||
awful.spawn.easy_async(
|
||||
'iw dev ' .. interface .. ' link',
|
||||
function(stdout)
|
||||
essid = stdout:match('SSID:(.-)\n')
|
||||
if (essid == nil) then
|
||||
essid = 'N/A'
|
||||
end
|
||||
end
|
||||
)
|
||||
end
|
||||
end
|
||||
|
||||
watch(
|
||||
"awk 'NR==3 {printf \"%3.0f\" ,($3/70)*100}' /proc/net/wireless",
|
||||
5,
|
||||
function(_, stdout)
|
||||
local widgetIconName = 'wifi-strength'
|
||||
local wifi_strength = tonumber(stdout)
|
||||
if (wifi_strength ~= nil) then
|
||||
connected = true
|
||||
-- Update popup text
|
||||
local wifi_strength_rounded = math.floor(wifi_strength / 25 + 0.5)
|
||||
widgetIconName = widgetIconName .. '-' .. wifi_strength_rounded
|
||||
widget.icon:set_image(PATH_TO_ICONS .. widgetIconName .. '.svg')
|
||||
else
|
||||
connected = false
|
||||
widget.icon:set_image(PATH_TO_ICONS .. widgetIconName .. '-off' .. '.svg')
|
||||
end
|
||||
if (connected and (essid == 'N/A' or essid == nil)) then
|
||||
grabText()
|
||||
end
|
||||
collectgarbage('collect')
|
||||
end,
|
||||
widget
|
||||
)
|
||||
|
||||
widget:connect_signal(
|
||||
'mouse::enter',
|
||||
function()
|
||||
grabText()
|
||||
end
|
||||
)
|
||||
|
||||
return widget_button
|
||||
Loading…
Add table
Add a link
Reference in a new issue