forked from Shinonome/dots-hyprland
add crosshair
This commit is contained in:
@@ -49,6 +49,12 @@ let configOptions = {
|
||||
'default': "auto",
|
||||
},
|
||||
},
|
||||
'gaming': {
|
||||
'crosshair': {
|
||||
'size': 20,
|
||||
'color': 'rgba(113,227,32,0.9)',
|
||||
},
|
||||
},
|
||||
'music': {
|
||||
'preferredPlayer': "plasma-browser-integration",
|
||||
},
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
import Widget from 'resource:///com/github/Aylur/ags/widget.js';
|
||||
import { enableClickthrough } from "../.widgetutils/clickthrough.js";
|
||||
import { RoundedCorner } from "../.commonwidgets/cairo_roundedcorner.js";
|
||||
|
||||
export default (monitor = 0, ) => {
|
||||
return Widget.Window({
|
||||
monitor,
|
||||
name: `crosshair${monitor}`,
|
||||
layer: 'overlay',
|
||||
exclusivity: 'ignore',
|
||||
child: Widget.Icon({
|
||||
icon: 'crosshair-symbolic',
|
||||
css: `
|
||||
font-size: ${userOptions.gaming.crosshair.size}px;
|
||||
color: ${userOptions.gaming.crosshair.color};
|
||||
`,
|
||||
}),
|
||||
setup: enableClickthrough,
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user