Hyprl-D
This commit is contained in:
parent
f656d70454
commit
17d5db244b
|
@ -1,8 +1,8 @@
|
|||
# wdisplays
|
||||
# hypr-display
|
||||
|
||||
[![License: GPL 3.0 or later][license-img]][license-spdx]
|
||||
|
||||
wdisplays is a graphical application for configuring displays in Wayland
|
||||
hypr-display is a graphical application for configuring displays in Wayland esp Hyprland
|
||||
compositors. It borrows some code from [kanshi]. It should work in any
|
||||
compositor that implements the wlr-output-management-unstable-v1 protocol.
|
||||
Compositors that are known to support the protocol are [Sway] and [Wayfire].
|
||||
|
@ -10,13 +10,13 @@ The goal of this project is to allow precise adjustment of display settings in
|
|||
kiosks, digital signage, and other elaborate multi-monitor setups.
|
||||
|
||||
|
||||
![Screenshot](wdisplays.png)
|
||||
![Screenshot](hypr-display.png)
|
||||
|
||||
# Installation
|
||||
|
||||
[![Repology][repology-img]][repology-pkg]
|
||||
|
||||
Check your distro for a `wdisplays` package. Known distro packages:
|
||||
Check your distro for a `hypr-display` package. Known distro packages:
|
||||
|
||||
- [Alpine](https://pkgs.alpinelinux.org/package/edge/testing/x86_64/wdisplays)
|
||||
- [Arch](https://aur.archlinux.org/packages/wdisplays-git/)
|
||||
|
|
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 44 KiB |
|
@ -1,7 +1,7 @@
|
|||
# SPDX-FileCopyrightText: 2020 Jason Francis <jason@cycles.network>
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
project('network.cycles.wdisplays', 'c',
|
||||
project('network.cycles.hypr-display', 'c',
|
||||
license: 'GPL-3.0-or-later',
|
||||
version: '1.1.1'
|
||||
)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
[Desktop Entry]
|
||||
Type=Application
|
||||
Categories=GTK;Settings;DesktopSettings;
|
||||
Exec=wdisplays
|
||||
Exec=hypr-display
|
||||
Icon=@app_id@
|
||||
|
||||
Name=Displays
|
|
@ -13,7 +13,7 @@
|
|||
</object>
|
||||
<object class="GtkWindow" id="heads_window">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="title" translatable="yes">wdisplays</property>
|
||||
<property name="title" translatable="yes">hypr-display</property>
|
||||
<signal name="destroy" handler="destroy" swapped="no"/>
|
||||
<child>
|
||||
<object class="GtkOverlay" id="overlay">
|
||||
|
@ -183,7 +183,7 @@
|
|||
<object class="GtkHeaderBar">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="title" translatable="yes">wdisplays</property>
|
||||
<property name="title" translatable="yes">hypr-display</property>
|
||||
<property name="has_subtitle">False</property>
|
||||
<property name="show_close_button">True</property>
|
||||
<child>
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<gresources>
|
||||
<gresource prefix="@resource_prefix@">
|
||||
<file compressed="true" preprocess="xml-stripblanks">wdisplays.ui</file>
|
||||
<file compressed="true" preprocess="xml-stripblanks">hypr-display.ui</file>
|
||||
<file compressed="true" preprocess="xml-stripblanks">head.ui</file>
|
||||
<file compressed="true">style.css</file>
|
||||
</gresource>
|
||||
|
|
|
@ -1,662 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:osb="http://www.openswatchbook.org/uri/2009/osb"
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
inkscape:export-ydpi="96"
|
||||
inkscape:export-xdpi="96"
|
||||
inkscape:export-filename="Template.png"
|
||||
width="128"
|
||||
height="128"
|
||||
id="svg11300"
|
||||
sodipodi:version="0.32"
|
||||
inkscape:version="0.92.4 (5da689c313, 2019-01-14)"
|
||||
sodipodi:docname="wdisplays.svg"
|
||||
inkscape:output_extension="org.inkscape.output.svg.inkscape"
|
||||
version="1.0"
|
||||
style="display:inline;enable-background:new"
|
||||
viewBox="0 0 128 128">
|
||||
<metadata
|
||||
id="metadata96">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs3">
|
||||
<linearGradient
|
||||
id="linearGradient4781"
|
||||
osb:paint="solid">
|
||||
<stop
|
||||
style="stop-color:#000000;stop-opacity:1;"
|
||||
offset="0"
|
||||
id="stop4779" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient1019">
|
||||
<stop
|
||||
style="stop-color:#9a9996;stop-opacity:1"
|
||||
offset="0"
|
||||
id="stop1015" />
|
||||
<stop
|
||||
style="stop-color:#3d3846;stop-opacity:1"
|
||||
offset="1"
|
||||
id="stop1017" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
id="linearGradient11745">
|
||||
<stop
|
||||
style="stop-color:#1a5fb4;stop-opacity:1"
|
||||
offset="0"
|
||||
id="stop11741" />
|
||||
<stop
|
||||
id="stop11749"
|
||||
offset="0.04166667"
|
||||
style="stop-color:#1c71d8;stop-opacity:1" />
|
||||
<stop
|
||||
style="stop-color:#1a5fb4;stop-opacity:1"
|
||||
offset="0.08333334"
|
||||
id="stop11751" />
|
||||
<stop
|
||||
id="stop11753"
|
||||
offset="0.91666669"
|
||||
style="stop-color:#1a5fb4;stop-opacity:1" />
|
||||
<stop
|
||||
style="stop-color:#1c71d8;stop-opacity:1"
|
||||
offset="0.95833331"
|
||||
id="stop11755" />
|
||||
<stop
|
||||
style="stop-color:#1a5fb4;stop-opacity:1"
|
||||
offset="1"
|
||||
id="stop11743" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
id="linearGradient11721">
|
||||
<stop
|
||||
style="stop-color:#62a0ea;stop-opacity:1"
|
||||
offset="0"
|
||||
id="stop11717" />
|
||||
<stop
|
||||
style="stop-color:#1c71d8;stop-opacity:1"
|
||||
offset="1"
|
||||
id="stop11719" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
y2="236"
|
||||
x2="96"
|
||||
y1="236"
|
||||
x1="32"
|
||||
gradientTransform="translate(604.81684,170.58641)"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
id="linearGradient1099"
|
||||
xlink:href="#linearGradient1036" />
|
||||
<linearGradient
|
||||
id="linearGradient1036">
|
||||
<stop
|
||||
id="stop1032"
|
||||
offset="0"
|
||||
style="stop-color:#d5d3cf;stop-opacity:1;" />
|
||||
<stop
|
||||
id="stop1034"
|
||||
offset="1"
|
||||
style="stop-color:#f6f5f4;stop-opacity:1" />
|
||||
</linearGradient>
|
||||
<radialGradient
|
||||
r="32"
|
||||
fy="-76"
|
||||
fx="-244"
|
||||
cy="-76"
|
||||
cx="-244"
|
||||
gradientTransform="matrix(0.88333331,0,0,0.88333331,-460.35018,463.11973)"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
id="radialGradient1103"
|
||||
xlink:href="#linearGradient1069" />
|
||||
<linearGradient
|
||||
id="linearGradient1069">
|
||||
<stop
|
||||
id="stop1065"
|
||||
offset="0"
|
||||
style="stop-color:#d5d3cf;stop-opacity:1" />
|
||||
<stop
|
||||
id="stop1067-1"
|
||||
offset="1"
|
||||
style="stop-color:#949390;stop-opacity:1" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
gradientUnits="userSpaceOnUse"
|
||||
y2="232"
|
||||
x2="64"
|
||||
y1="262.5"
|
||||
x1="64"
|
||||
id="linearGradient1027"
|
||||
xlink:href="#linearGradient1025"
|
||||
gradientTransform="translate(-470.5864,432.81685)" />
|
||||
<linearGradient
|
||||
id="linearGradient1025">
|
||||
<stop
|
||||
id="stop1021"
|
||||
offset="0"
|
||||
style="stop-color:#9a9996;stop-opacity:1" />
|
||||
<stop
|
||||
id="stop1023"
|
||||
offset="1"
|
||||
style="stop-color:#77767b;stop-opacity:1" />
|
||||
</linearGradient>
|
||||
<inkscape:path-effect
|
||||
effect="spiro"
|
||||
id="path-effect35304-9"
|
||||
is_visible="true" />
|
||||
<clipPath
|
||||
clipPathUnits="userSpaceOnUse"
|
||||
id="clipPath1609-7">
|
||||
<path
|
||||
sodipodi:nodetypes="cccccc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path1611-5"
|
||||
d="m 252,116 28,-28 v -8 h -36 v 36 z"
|
||||
style="fill:#e74747;stroke:none;stroke-width:0.25px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
|
||||
</clipPath>
|
||||
<linearGradient
|
||||
id="linearGradient1064"
|
||||
x1="88.596001"
|
||||
x2="536.59998"
|
||||
y1="-449.39001"
|
||||
y2="-449.39001"
|
||||
gradientTransform="matrix(0.25,0,0,0.25,-14.149,400.35)"
|
||||
gradientUnits="userSpaceOnUse">
|
||||
<stop
|
||||
id="stop1066"
|
||||
style="stop-color:#5e5c64;stop-opacity:1"
|
||||
offset="0" />
|
||||
<stop
|
||||
id="stop1068"
|
||||
style="stop-color:#77767b;stop-opacity:1"
|
||||
offset=".035714" />
|
||||
<stop
|
||||
id="stop1070"
|
||||
style="stop-color:#5e5c64;stop-opacity:1"
|
||||
offset=".071365" />
|
||||
<stop
|
||||
id="stop1072"
|
||||
style="stop-color:#5e5c64;stop-opacity:1"
|
||||
offset=".92857" />
|
||||
<stop
|
||||
id="stop1074"
|
||||
style="stop-color:#77767b;stop-opacity:1"
|
||||
offset=".96429" />
|
||||
<stop
|
||||
id="stop1076"
|
||||
style="stop-color:#5e5c64;stop-opacity:1"
|
||||
offset="1" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
id="linearGradient1064-9"
|
||||
x1="88.596001"
|
||||
x2="536.59998"
|
||||
y1="-449.39001"
|
||||
y2="-449.39001"
|
||||
gradientTransform="matrix(0.25,0,0,0.25,-14.148999,400.35)"
|
||||
gradientUnits="userSpaceOnUse">
|
||||
<stop
|
||||
id="stop1066-1"
|
||||
style="stop-color:#3d3846;stop-opacity:1"
|
||||
offset="0" />
|
||||
<stop
|
||||
id="stop1068-2"
|
||||
style="stop-color:#77767b;stop-opacity:1"
|
||||
offset=".035714" />
|
||||
<stop
|
||||
id="stop1070-7"
|
||||
style="stop-color:#5e5c64;stop-opacity:1"
|
||||
offset=".071365" />
|
||||
<stop
|
||||
id="stop1072-0"
|
||||
style="stop-color:#5e5c64;stop-opacity:1"
|
||||
offset=".92857" />
|
||||
<stop
|
||||
id="stop1074-9"
|
||||
style="stop-color:#77767b;stop-opacity:1"
|
||||
offset=".96429" />
|
||||
<stop
|
||||
id="stop1076-3"
|
||||
style="stop-color:#3d3846;stop-opacity:1"
|
||||
offset="1" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient11745"
|
||||
id="linearGradient11747"
|
||||
x1="12"
|
||||
y1="240"
|
||||
x2="60"
|
||||
y2="240"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="translate(2,-10)" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient11721"
|
||||
id="radialGradient949"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(6.9999999,-3.4009078e-7,2.1255735e-7,4.3749999,-25.345543,-708.76861)"
|
||||
cx="3.6207857"
|
||||
cy="206.80426"
|
||||
fx="3.6207857"
|
||||
fy="206.80426"
|
||||
r="16" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient11745"
|
||||
id="linearGradient1001"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="translate(54,-10)"
|
||||
x1="12"
|
||||
y1="240"
|
||||
x2="60"
|
||||
y2="240" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient11721"
|
||||
id="radialGradient1003"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(6.9999999,-3.4009078e-7,2.1255735e-7,4.3749999,26.654457,-708.76861)"
|
||||
cx="3.6207857"
|
||||
cy="206.80426"
|
||||
fx="3.6207857"
|
||||
fy="206.80426"
|
||||
r="16" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient11745"
|
||||
id="linearGradient1011"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="translate(28,28)"
|
||||
x1="12"
|
||||
y1="240"
|
||||
x2="60"
|
||||
y2="240" />
|
||||
<radialGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient11721"
|
||||
id="radialGradient1013"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
gradientTransform="matrix(6.9999999,-3.4009078e-7,2.1255735e-7,4.3749999,0.654457,-670.76861)"
|
||||
cx="3.6207857"
|
||||
cy="206.80426"
|
||||
fx="3.6207857"
|
||||
fy="206.80426"
|
||||
r="16" />
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
stroke="#ef2929"
|
||||
fill="#f57900"
|
||||
id="base"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="0.25490196"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="8"
|
||||
inkscape:cx="12.741961"
|
||||
inkscape:cy="57.04762"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="false"
|
||||
inkscape:grid-bbox="true"
|
||||
inkscape:document-units="px"
|
||||
inkscape:showpageshadow="false"
|
||||
inkscape:window-width="1920"
|
||||
inkscape:window-height="1061"
|
||||
inkscape:window-x="1920"
|
||||
inkscape:window-y="0"
|
||||
width="400px"
|
||||
height="300px"
|
||||
inkscape:snap-nodes="true"
|
||||
inkscape:snap-bbox="true"
|
||||
objecttolerance="7"
|
||||
gridtolerance="12"
|
||||
guidetolerance="13"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:pagecheckerboard="false"
|
||||
showguides="false"
|
||||
inkscape:guide-bbox="true"
|
||||
inkscape:locked="false"
|
||||
inkscape:measure-start="0,0"
|
||||
inkscape:measure-end="0,0"
|
||||
inkscape:object-nodes="true"
|
||||
inkscape:bbox-nodes="true"
|
||||
inkscape:snap-global="true"
|
||||
inkscape:object-paths="true"
|
||||
inkscape:snap-intersection-paths="true"
|
||||
inkscape:snap-bbox-edge-midpoints="true"
|
||||
inkscape:snap-bbox-midpoints="true"
|
||||
showborder="false"
|
||||
inkscape:snap-center="true"
|
||||
inkscape:snap-object-midpoints="true"
|
||||
inkscape:snap-midpoints="true"
|
||||
inkscape:snap-smooth-nodes="true"
|
||||
inkscape:snap-text-baseline="true">
|
||||
<inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid5883"
|
||||
spacingx="2"
|
||||
spacingy="2"
|
||||
enabled="true"
|
||||
visible="true"
|
||||
empspacing="4"
|
||||
originx="0"
|
||||
originy="0" />
|
||||
<sodipodi:guide
|
||||
position="64,8"
|
||||
orientation="0,1"
|
||||
id="guide1073"
|
||||
inkscape:locked="false"
|
||||
inkscape:label=""
|
||||
inkscape:color="rgb(0,0,255)" />
|
||||
<sodipodi:guide
|
||||
position="12,64"
|
||||
orientation="1,0"
|
||||
id="guide1075"
|
||||
inkscape:locked="false"
|
||||
inkscape:label=""
|
||||
inkscape:color="rgb(0,0,255)" />
|
||||
<sodipodi:guide
|
||||
position="64,104"
|
||||
orientation="0,1"
|
||||
id="guide1099"
|
||||
inkscape:locked="false"
|
||||
inkscape:label=""
|
||||
inkscape:color="rgb(0,0,255)" />
|
||||
<sodipodi:guide
|
||||
position="64,128"
|
||||
orientation="0,1"
|
||||
id="guide993"
|
||||
inkscape:locked="false"
|
||||
inkscape:label=""
|
||||
inkscape:color="rgb(0,0,255)" />
|
||||
<sodipodi:guide
|
||||
position="104,64"
|
||||
orientation="1,0"
|
||||
id="guide995"
|
||||
inkscape:locked="false"
|
||||
inkscape:label=""
|
||||
inkscape:color="rgb(0,0,255)" />
|
||||
<sodipodi:guide
|
||||
position="9.2651362e-08,64"
|
||||
orientation="1,0"
|
||||
id="guide867"
|
||||
inkscape:locked="false"
|
||||
inkscape:label=""
|
||||
inkscape:color="rgb(0,0,255)" />
|
||||
<sodipodi:guide
|
||||
position="120,64"
|
||||
orientation="1,0"
|
||||
id="guide869"
|
||||
inkscape:locked="false"
|
||||
inkscape:label=""
|
||||
inkscape:color="rgb(0,0,255)" />
|
||||
<sodipodi:guide
|
||||
position="64,116"
|
||||
orientation="0,1"
|
||||
id="guide871"
|
||||
inkscape:locked="false"
|
||||
inkscape:label=""
|
||||
inkscape:color="rgb(0,0,255)" />
|
||||
<inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid873"
|
||||
spacingx="1"
|
||||
spacingy="1"
|
||||
empspacing="8"
|
||||
color="#000000"
|
||||
opacity="0.49019608"
|
||||
empcolor="#000000"
|
||||
empopacity="0.08627451"
|
||||
dotted="true" />
|
||||
<sodipodi:guide
|
||||
position="24,64"
|
||||
orientation="1,0"
|
||||
id="guide877"
|
||||
inkscape:locked="false"
|
||||
inkscape:label=""
|
||||
inkscape:color="rgb(0,0,255)" />
|
||||
<sodipodi:guide
|
||||
position="116,64"
|
||||
orientation="1,0"
|
||||
id="guide879"
|
||||
inkscape:locked="false"
|
||||
inkscape:label=""
|
||||
inkscape:color="rgb(0,0,255)" />
|
||||
<sodipodi:guide
|
||||
position="64,120"
|
||||
orientation="0,1"
|
||||
id="guide881"
|
||||
inkscape:locked="false"
|
||||
inkscape:label=""
|
||||
inkscape:color="rgb(0,0,255)" />
|
||||
<sodipodi:guide
|
||||
position="64,12"
|
||||
orientation="0,1"
|
||||
id="guide883"
|
||||
inkscape:locked="false"
|
||||
inkscape:label=""
|
||||
inkscape:color="rgb(0,0,255)" />
|
||||
<sodipodi:guide
|
||||
position="8,64"
|
||||
orientation="1,0"
|
||||
id="guide885"
|
||||
inkscape:locked="false"
|
||||
inkscape:label=""
|
||||
inkscape:color="rgb(0,0,255)" />
|
||||
<sodipodi:guide
|
||||
position="128,64"
|
||||
orientation="1,0"
|
||||
id="guide887"
|
||||
inkscape:locked="false"
|
||||
inkscape:label=""
|
||||
inkscape:color="rgb(0,0,255)" />
|
||||
<sodipodi:guide
|
||||
position="64,0"
|
||||
orientation="0,1"
|
||||
id="guide897"
|
||||
inkscape:locked="false"
|
||||
inkscape:label=""
|
||||
inkscape:color="rgb(0,0,255)" />
|
||||
<sodipodi:guide
|
||||
position="64,24"
|
||||
orientation="0,1"
|
||||
id="guide899"
|
||||
inkscape:locked="false"
|
||||
inkscape:label=""
|
||||
inkscape:color="rgb(0,0,255)" />
|
||||
<sodipodi:guide
|
||||
position="256,256"
|
||||
orientation="-0.70710678,0.70710678"
|
||||
id="guide950"
|
||||
inkscape:locked="false"
|
||||
inkscape:label=""
|
||||
inkscape:color="rgb(0,0,255)" />
|
||||
<sodipodi:guide
|
||||
position="64,64"
|
||||
orientation="0.70710678,0.70710678"
|
||||
id="guide952"
|
||||
inkscape:locked="false"
|
||||
inkscape:label=""
|
||||
inkscape:color="rgb(0,0,255)" />
|
||||
</sodipodi:namedview>
|
||||
<g
|
||||
id="layer1"
|
||||
inkscape:label="App Icon"
|
||||
inkscape:groupmode="layer"
|
||||
style="display:inline"
|
||||
transform="translate(0,-172)">
|
||||
<rect
|
||||
style="opacity:1;fill:#deddda;fill-opacity:1;stroke:none;stroke-width:4;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:6;stroke-opacity:0.16205534;paint-order:markers fill stroke"
|
||||
id="rect4815"
|
||||
width="108"
|
||||
height="80"
|
||||
x="10"
|
||||
y="202"
|
||||
ry="6"
|
||||
rx="6" />
|
||||
<rect
|
||||
style="display:inline;fill:url(#linearGradient1064-9);stroke:none;paint-order:normal;enable-background:new"
|
||||
ry="8"
|
||||
rx="8"
|
||||
height="88"
|
||||
width="112"
|
||||
y="200"
|
||||
x="8"
|
||||
id="rect1048" />
|
||||
<rect
|
||||
style="display:inline;opacity:1;fill:#9a9996;fill-opacity:1;stroke:none;stroke-width:0.01;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:4;stroke-opacity:1;paint-order:markers fill stroke"
|
||||
id="rect2392"
|
||||
width="112"
|
||||
height="84"
|
||||
x="8"
|
||||
y="200"
|
||||
rx="8"
|
||||
ry="8" />
|
||||
<rect
|
||||
ry="4"
|
||||
rx="4"
|
||||
y="206"
|
||||
x="14"
|
||||
height="34"
|
||||
width="48"
|
||||
id="rect4520"
|
||||
style="opacity:1;fill:url(#linearGradient11747);fill-opacity:1;stroke:none;stroke-width:0.00999999;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:4;stroke-opacity:1;paint-order:markers fill stroke" />
|
||||
<rect
|
||||
style="opacity:1;fill:url(#radialGradient949);fill-opacity:1;stroke:none;stroke-width:0.00999999;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:4;stroke-opacity:1;paint-order:markers fill stroke"
|
||||
id="rect947"
|
||||
width="48"
|
||||
height="32"
|
||||
x="14"
|
||||
y="206"
|
||||
rx="4"
|
||||
ry="4" />
|
||||
<rect
|
||||
style="opacity:1;fill:#99c1f1;fill-opacity:0.21912351;stroke:none;stroke-width:0.01;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:4;stroke-opacity:1;paint-order:markers fill stroke"
|
||||
id="rect937"
|
||||
width="44"
|
||||
height="28"
|
||||
x="16"
|
||||
y="208"
|
||||
rx="2"
|
||||
ry="2" />
|
||||
<rect
|
||||
style="opacity:1;fill:url(#linearGradient1001);fill-opacity:1;stroke:none;stroke-width:0.00999999;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:4;stroke-opacity:1;paint-order:markers fill stroke"
|
||||
id="rect995"
|
||||
width="48"
|
||||
height="34"
|
||||
x="66"
|
||||
y="206"
|
||||
rx="4"
|
||||
ry="4" />
|
||||
<rect
|
||||
ry="4"
|
||||
rx="4"
|
||||
y="206"
|
||||
x="66"
|
||||
height="32"
|
||||
width="48"
|
||||
id="rect997"
|
||||
style="opacity:1;fill:url(#radialGradient1003);fill-opacity:1;stroke:none;stroke-width:0.00999999;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:4;stroke-opacity:1;paint-order:markers fill stroke" />
|
||||
<rect
|
||||
ry="2"
|
||||
rx="2"
|
||||
y="208"
|
||||
x="68"
|
||||
height="28"
|
||||
width="44"
|
||||
id="rect999"
|
||||
style="opacity:1;fill:#99c1f1;fill-opacity:0.21912351;stroke:none;stroke-width:0.01;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:4;stroke-opacity:1;paint-order:markers fill stroke" />
|
||||
<rect
|
||||
ry="4"
|
||||
rx="4"
|
||||
y="244"
|
||||
x="40"
|
||||
height="34"
|
||||
width="48"
|
||||
id="rect1005"
|
||||
style="opacity:1;fill:url(#linearGradient1011);fill-opacity:1;stroke:none;stroke-width:0.00999999;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:4;stroke-opacity:1;paint-order:markers fill stroke" />
|
||||
<rect
|
||||
style="opacity:1;fill:url(#radialGradient1013);fill-opacity:1;stroke:none;stroke-width:0.00999999;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:4;stroke-opacity:1;paint-order:markers fill stroke"
|
||||
id="rect1007"
|
||||
width="48"
|
||||
height="32"
|
||||
x="40"
|
||||
y="244"
|
||||
rx="4"
|
||||
ry="4" />
|
||||
<rect
|
||||
style="opacity:1;fill:#99c1f1;fill-opacity:0.21912351;stroke:none;stroke-width:0.01;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:4;stroke-opacity:1;paint-order:markers fill stroke"
|
||||
id="rect1009"
|
||||
width="44"
|
||||
height="28"
|
||||
x="42"
|
||||
y="246"
|
||||
rx="2"
|
||||
ry="2" />
|
||||
<path
|
||||
sodipodi:nodetypes="cc"
|
||||
inkscape:connector-curvature="0"
|
||||
id="path4777"
|
||||
d="M 14,242 H 114"
|
||||
style="fill:none;stroke:#ffffff;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:4, 4;stroke-dashoffset:4;stroke-opacity:0.16205534" />
|
||||
<path
|
||||
sodipodi:nodetypes="cc"
|
||||
style="fill:none;stroke:#ffffff;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:4, 4;stroke-dashoffset:4;stroke-opacity:0.16205534"
|
||||
d="m 64,206 v 34"
|
||||
id="path4785"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path4787"
|
||||
d="m 38,244 v 34"
|
||||
style="fill:none;stroke:#ffffff;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:4, 4;stroke-dashoffset:4;stroke-opacity:0.16205534"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<path
|
||||
sodipodi:nodetypes="cc"
|
||||
style="fill:none;stroke:#ffffff;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:4, 4;stroke-dashoffset:4;stroke-opacity:0.16205534"
|
||||
d="m 90,244 v 34"
|
||||
id="path4789"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
style="fill:none;stroke:#ffffff;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:4, 4;stroke-dashoffset:4;stroke-opacity:0.16205534"
|
||||
d="M 10,204 H 118"
|
||||
id="path4791"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path4793"
|
||||
d="M 10,280 H 118"
|
||||
style="fill:none;stroke:#ffffff;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:4, 4;stroke-dashoffset:4;stroke-opacity:0.16205534" />
|
||||
<path
|
||||
inkscape:connector-curvature="0"
|
||||
id="path4795"
|
||||
d="m 12,206 v 72"
|
||||
style="fill:none;stroke:#ffffff;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:4, 4;stroke-dashoffset:6;stroke-opacity:0.16205534"
|
||||
sodipodi:nodetypes="cc" />
|
||||
<path
|
||||
id="path4797"
|
||||
sodipodi:nodetypes="cc"
|
||||
style="fill:none;stroke:#ffffff;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:4, 4;stroke-dashoffset:6;stroke-opacity:0.16205534"
|
||||
d="m 116,206 v 72"
|
||||
inkscape:connector-curvature="0" />
|
||||
</g>
|
||||
</svg>
|
Before Width: | Height: | Size: 21 KiB |
|
@ -1,11 +1,11 @@
|
|||
/* SPDX-FileCopyrightText: 2020 Jason Francis <jason@cycles.network>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later */
|
||||
|
||||
#ifndef WDISPLAY_CONFIG_H
|
||||
#define WDISPLAY_CONFIG_H
|
||||
#ifndef HDISPLAY_CONFIG_H
|
||||
#define HDISPLAY_CONFIG_H
|
||||
|
||||
#define WDISPLAYS_APP_ID "@app_id@"
|
||||
#define WDISPLAYS_VERSION "@version@"
|
||||
#define WDISPLAYS_RESOURCE_PREFIX "@resource_prefix@"
|
||||
#define HDISPLAYS_APP_ID "@app_id@"
|
||||
#define HDISPLAYS_VERSION "@version@"
|
||||
#define HDISPLAYS_RESOURCE_PREFIX "@resource_prefix@"
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
/* SPDX-FileCopyrightText: 2020 Jason Francis <jason@cycles.network>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later */
|
||||
|
||||
#ifndef WDISPLAY_GLVIEWPORT_H
|
||||
#define WDISPLAY_GLVIEWPORT_H
|
||||
#ifndef HDISPLAY_GLVIEWPORT_H
|
||||
#define HDISPLAY_GLVIEWPORT_H
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* SPDX-License-Identifier: GPL-3.0-or-later */
|
||||
|
||||
#include "headform.h"
|
||||
#include "wdisplays.h"
|
||||
#include "hypr-display.h"
|
||||
|
||||
typedef struct _WdHeadFormPrivate {
|
||||
GtkWidget *enabled;
|
||||
|
@ -118,7 +118,7 @@ static void wd_head_form_class_init(WdHeadFormClass *class) {
|
|||
G_TYPE_NONE, 1, G_TYPE_INT);
|
||||
|
||||
gtk_widget_class_set_template_from_resource(widget_class,
|
||||
WDISPLAYS_RESOURCE_PREFIX "/head.ui");
|
||||
hypr-display_RESOURCE_PREFIX "/head.ui");
|
||||
|
||||
gtk_widget_class_bind_template_callback(widget_class, enabled_toggled);
|
||||
gtk_widget_class_bind_template_callback(widget_class, mode_spin_changed);
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
/* SPDX-FileCopyrightText: 2020 Jason Francis <jason@cycles.network>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later */
|
||||
|
||||
#ifndef WDISPLAY_HEADFORM_H
|
||||
#define WDISPLAY_HEADFORM_H
|
||||
#ifndef HDISPLAY_HEADFORM_H
|
||||
#define HDISPLAY_HEADFORM_H
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
* https://github.com/emersion/kanshi/blob/38d27474b686fcc8324cc5e454741a49577c0988/include/config.h
|
||||
*/
|
||||
|
||||
#ifndef WDISPLAY_WDISPLAY_H
|
||||
#define WDISPLAY_WDISPLAY_H
|
||||
#ifndef HDISPLAY_HDISPLAY_H
|
||||
#define HDISPLAY_HDISPLAY_H
|
||||
|
||||
#include "config.h"
|
||||
|
|
@ -4,7 +4,7 @@
|
|||
#include <gtk/gtk.h>
|
||||
#include <gdk/gdkwayland.h>
|
||||
|
||||
#include "wdisplays.h"
|
||||
#include "hypr-display.h"
|
||||
#include "glviewport.h"
|
||||
#include "headform.h"
|
||||
|
||||
|
@ -927,7 +927,7 @@ static void activate(GtkApplication* app, gpointer user_data) {
|
|||
|
||||
GtkCssProvider *css_provider = gtk_css_provider_new();
|
||||
gtk_css_provider_load_from_resource(css_provider,
|
||||
WDISPLAYS_RESOURCE_PREFIX "/style.css");
|
||||
hypr-display_RESOURCE_PREFIX "/style.css");
|
||||
gtk_style_context_add_provider_for_screen(gdk_screen_get_default(), GTK_STYLE_PROVIDER(css_provider),
|
||||
GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
|
||||
|
||||
|
@ -936,7 +936,7 @@ static void activate(GtkApplication* app, gpointer user_data) {
|
|||
state->move_cursor = gdk_cursor_new_from_name(gdk_display, "move");
|
||||
|
||||
GtkBuilder *builder = gtk_builder_new_from_resource(
|
||||
WDISPLAYS_RESOURCE_PREFIX "/wdisplays.ui");
|
||||
hypr-display_RESOURCE_PREFIX "/hypr-display.ui");
|
||||
GtkWidget *window = GTK_WIDGET(gtk_builder_get_object(builder, "heads_window"));
|
||||
state->main_box = GTK_WIDGET(gtk_builder_get_object(builder, "main_box"));
|
||||
state->header_stack = GTK_WIDGET(gtk_builder_get_object(builder, "header_stack"));
|
||||
|
@ -1084,7 +1084,7 @@ static void activate(GtkApplication* app, gpointer user_data) {
|
|||
|
||||
int main(int argc, char *argv[]) {
|
||||
g_setenv("GDK_GL", "gles", FALSE);
|
||||
GtkApplication *app = gtk_application_new(WDISPLAYS_APP_ID, G_APPLICATION_FLAGS_NONE);
|
||||
GtkApplication *app = gtk_application_new(hypr-display_APP_ID, G_APPLICATION_FLAGS_NONE);
|
||||
g_signal_connect(app, "activate", G_CALLBACK(activate), NULL);
|
||||
int status = g_application_run(G_APPLICATION(app), argc, argv);
|
||||
g_object_unref(app);
|
||||
|
|
|
@ -12,7 +12,7 @@ epoxy = dependency('epoxy')
|
|||
configure_file(input: 'config.h.in', output: 'config.h', configuration: conf)
|
||||
|
||||
executable(
|
||||
'wdisplays',
|
||||
'hypr-display',
|
||||
[
|
||||
'main.c',
|
||||
'glviewport.c',
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "wdisplays.h"
|
||||
#include "hypr-display.h"
|
||||
|
||||
#include "wlr-output-management-unstable-v1-client-protocol.h"
|
||||
#include "xdg-output-unstable-v1-client-protocol.h"
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#include <gtk/gtk.h>
|
||||
#include <gdk/gdkwayland.h>
|
||||
|
||||
#include "wdisplays.h"
|
||||
#include "hypr-displays.h"
|
||||
|
||||
#include "wlr-layer-shell-unstable-v1-client-protocol.h"
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* SPDX-FileCopyrightText: 2020 Jason Francis <jason@cycles.network>
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later */
|
||||
|
||||
#include "wdisplays.h"
|
||||
#include "hypr-displays.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
|
18
src/store.c
18
src/store.c
|
@ -1,4 +1,4 @@
|
|||
#include "wdisplays.h"
|
||||
#include "hypr-display.h"
|
||||
#include <ctype.h>
|
||||
#include <regex.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -25,16 +25,16 @@ char *get_config_file_path() {
|
|||
char defaultPath[256]; // 假设文件路径不超过256个字符
|
||||
snprintf(defaultPath, sizeof(defaultPath), "%s/.config/kanshi/config", homeDir);
|
||||
|
||||
// 尝试打开并读取 $HOME/.config/wdisplays/config 文件
|
||||
char wdisplaysPath[256];
|
||||
snprintf(wdisplaysPath, sizeof(wdisplaysPath), "%s/.config/wdisplays/config", homeDir);
|
||||
// 尝试打开并读取 $HOME/.config/hypr-display/config 文件
|
||||
char hypr-displayPath[256];
|
||||
snprintf(hypr-displayPath, sizeof(hypr-displayPath), "%s/.config/hypr-display/config", homeDir);
|
||||
|
||||
FILE *wdisplaysFile = fopen(wdisplaysPath, "r");
|
||||
if (wdisplaysFile != NULL) {
|
||||
FILE *hypr-displayFile = fopen(hypr-displayPath, "r");
|
||||
if (hypr-displayFile != NULL) {
|
||||
char line[256]; // 假设行的长度不超过256个字符
|
||||
|
||||
// 逐行读取文件,查找 "store PATH" 配置项
|
||||
while (fgets(line, sizeof(line), wdisplaysFile) != NULL) {
|
||||
while (fgets(line, sizeof(line), hypr-displayFile) != NULL) {
|
||||
if (strstr(line, "store_path") != NULL) {
|
||||
// 找到 "store PATH" 配置项,提取路径
|
||||
char *pathStart = strchr(line, '=');
|
||||
|
@ -43,14 +43,14 @@ char *get_config_file_path() {
|
|||
char *pathEnd = strchr(pathStart, '\n');
|
||||
if (pathEnd != NULL) {
|
||||
*pathEnd = '\0'; // 去除换行符
|
||||
fclose(wdisplaysFile);
|
||||
fclose(hypr-displayFile);
|
||||
return strdup(pathStart); // 返回提取的路径
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fclose(wdisplaysFile);
|
||||
fclose(hypr-displayFile);
|
||||
}
|
||||
|
||||
// 如果没有找到 "store PATH" 配置项,则返回默认路径
|
||||
|
|
Loading…
Reference in New Issue