Starting off quickshell widgets replacing waybar and utils
|
After Width: | Height: | Size: 417 KiB |
|
After Width: | Height: | Size: 20 KiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 895 KiB |
|
After Width: | Height: | Size: 1.6 MiB |
|
After Width: | Height: | Size: 150 KiB |
|
After Width: | Height: | Size: 747 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 27 KiB |
@@ -1,3 +1,5 @@
|
||||
hl.bind("SUPEr + A", hl.dsp.global("quickshell:show_active_title"))
|
||||
|
||||
return {
|
||||
start = function()
|
||||
hl.exec_cmd("waybar")
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
synthwave
|
||||
@@ -0,0 +1,61 @@
|
||||
{
|
||||
"name": "Synthwave",
|
||||
|
||||
"radius": 48,
|
||||
"appRadius": 34,
|
||||
"orbitMultiplier": 2,
|
||||
|
||||
"centerIcon": "img/center/synthwave.png",
|
||||
|
||||
"colors": {
|
||||
"overlay": "#090914cc",
|
||||
"centerBackground": "#ff2bd6",
|
||||
"centerBorder": "#00eaff",
|
||||
"appBackground": "#16162acc",
|
||||
"appBorder": "#ffcc00",
|
||||
"appHoverBackground": "#302050ee"
|
||||
},
|
||||
|
||||
"programs": [
|
||||
{
|
||||
"name": "Chat",
|
||||
"icon": "img/apps/chat.png",
|
||||
"command": ["ssh -t nichkara.eu tmux new-session -A -t office"]
|
||||
},
|
||||
{
|
||||
"name": "Files",
|
||||
"icon": "img/apps/files.png",
|
||||
"command": ["nemo"]
|
||||
},
|
||||
{
|
||||
"name": "Media",
|
||||
"icon": "img/apps/media.png",
|
||||
"command": ["delfin"]
|
||||
},
|
||||
{
|
||||
"name": "Music",
|
||||
"icon": "img/apps/music.png",
|
||||
"command": ["finamp"]
|
||||
},
|
||||
{
|
||||
"name": "Terminal",
|
||||
"icon": "img/apps/terminal.png",
|
||||
"command": ["kitty"]
|
||||
},
|
||||
{
|
||||
"name": "No logs Browser",
|
||||
"icon": "img/apps/nologs.png",
|
||||
"command": ["firefox --private-window"]
|
||||
},
|
||||
{
|
||||
"name": "Browser",
|
||||
"icon": "img/apps/browser.png",
|
||||
"command": ["firefox"]
|
||||
},
|
||||
{
|
||||
"name": "E-Mail",
|
||||
"icon": "img/apps/mail.png",
|
||||
"command": ["thunderbird"]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,158 @@
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
import Quickshell.Io
|
||||
import Quickshell.Widgets
|
||||
|
||||
PanelWindow {
|
||||
id: launcher
|
||||
|
||||
required property bool open
|
||||
required property string repoRoot
|
||||
required property string flavorName
|
||||
|
||||
signal closeRequested()
|
||||
|
||||
visible: open
|
||||
focusable: true
|
||||
aboveWindows: true
|
||||
color: "transparent"
|
||||
|
||||
anchors {
|
||||
top: true
|
||||
right: true
|
||||
bottom: true
|
||||
left: true
|
||||
}
|
||||
|
||||
FileView {
|
||||
id: flavorFile
|
||||
|
||||
path: launcher.repoRoot + "/theme/flavors/" + launcher.flavorName + "/launcher.json"
|
||||
blockLoading: true
|
||||
watchChanges: true
|
||||
|
||||
onFileChanged: reload()
|
||||
}
|
||||
|
||||
readonly property var flavor: JSON.parse(flavorFile.text())
|
||||
|
||||
Process {
|
||||
id: appProcess
|
||||
}
|
||||
|
||||
function fileUrl(path) {
|
||||
if (!path || path.length === 0)
|
||||
return ""
|
||||
|
||||
if (path.startsWith("/"))
|
||||
return "file://" + path
|
||||
|
||||
return "file://" + launcher.repoRoot + "/" + path
|
||||
}
|
||||
|
||||
function launchProgram(program) {
|
||||
launcher.closeRequested()
|
||||
|
||||
appProcess.command = program.command
|
||||
appProcess.startDetached()
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
color: launcher.flavor.colors.overlay
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
onClicked: launcher.closeRequested()
|
||||
}
|
||||
|
||||
Item {
|
||||
id: dial
|
||||
|
||||
property real r: launcher.flavor.radius
|
||||
property real appR: launcher.flavor.appRadius
|
||||
property real orbit: launcher.flavor.orbitMultiplier * r
|
||||
|
||||
width: orbit * 2 + appR * 2
|
||||
height: orbit * 2 + appR * 2
|
||||
|
||||
anchors.centerIn: parent
|
||||
|
||||
Rectangle {
|
||||
id: center
|
||||
|
||||
width: dial.r * 2
|
||||
height: dial.r * 2
|
||||
radius: dial.r
|
||||
|
||||
anchors.centerIn: parent
|
||||
|
||||
color: launcher.flavor.colors.centerBackground
|
||||
border.color: launcher.flavor.colors.centerBorder
|
||||
border.width: 2
|
||||
|
||||
clip: true
|
||||
|
||||
Image {
|
||||
anchors.fill: parent
|
||||
anchors.margins: 6
|
||||
|
||||
source: launcher.fileUrl(launcher.flavor.centerIcon)
|
||||
fillMode: Image.PreserveAspectFit
|
||||
smooth: true
|
||||
}
|
||||
}
|
||||
|
||||
Repeater {
|
||||
model: launcher.flavor.programs
|
||||
|
||||
delegate: Item {
|
||||
id: appButton
|
||||
|
||||
required property int index
|
||||
required property var modelData
|
||||
|
||||
property real angle: (index * 45 - 90) * Math.PI / 180
|
||||
|
||||
width: dial.appR * 2
|
||||
height: dial.appR * 2
|
||||
|
||||
x: dial.width / 2 + Math.cos(angle) * dial.orbit - width / 2
|
||||
y: dial.height / 2 + Math.sin(angle) * dial.orbit - height / 2
|
||||
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
radius: width / 2
|
||||
|
||||
color: mouse.containsMouse
|
||||
? launcher.flavor.colors.appHoverBackground
|
||||
: launcher.flavor.colors.appBackground
|
||||
|
||||
border.color: launcher.flavor.colors.appBorder
|
||||
border.width: 2
|
||||
|
||||
clip: true
|
||||
|
||||
Image {
|
||||
anchors.fill: parent
|
||||
anchors.margins: 7
|
||||
|
||||
source: launcher.fileUrl(appButton.modelData.icon)
|
||||
fillMode: Image.PreserveAspectFit
|
||||
smooth: true
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
id: mouse
|
||||
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
|
||||
onClicked: launcher.launchProgram(appButton.modelData)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
import Quickshell
|
||||
import Quickshell.Wayland
|
||||
import Quickshell.Hyprland
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
|
||||
PanelWindow {
|
||||
anchors.top: true
|
||||
anchors.left: false
|
||||
anchors.right: true
|
||||
anchors.bottom: true
|
||||
|
||||
property bool expanded: false
|
||||
property int collapsedWidth: 48
|
||||
property int expandedWidth: 320
|
||||
|
||||
implicitWidth: expanded ? expandedWidth : collapsedWidth
|
||||
|
||||
margins.top: 10
|
||||
margins.bottom: 10
|
||||
margins.right: 4
|
||||
|
||||
color: "transparent"
|
||||
|
||||
Behavior on implicitWidth {
|
||||
NumberAnimation {
|
||||
duration: 220
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
radius: 16
|
||||
color: "#77330077"
|
||||
border.width: 1
|
||||
border.color: "#000000"
|
||||
}
|
||||
|
||||
Item {
|
||||
width: 48
|
||||
height: 48
|
||||
|
||||
Image {
|
||||
anchors.fill: parent
|
||||
source: Quickshell.shellDir + "/../../img/launcher/nixos_black.png"
|
||||
fillMode: Image.PreserveAspectFit
|
||||
smooth: true
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onClicked: {
|
||||
Quickshell.execDetached(["wofi", "--show", "drun"])
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Text {
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 56
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
rightPadding: 12
|
||||
|
||||
visible: expanded
|
||||
opacity: expanded ? 1.0 : 0.0
|
||||
Behavior on opacity {
|
||||
NumberAnimation {
|
||||
duration: 160
|
||||
}
|
||||
}
|
||||
|
||||
text: Hyprland.activeToplevel ? Hyprland.activeToplevel.title : ""
|
||||
color: "white"
|
||||
elide: Text.ElideRight
|
||||
}
|
||||
|
||||
GlobalShortcut {
|
||||
name: "toggle_title_bar"
|
||||
description: "Expand bar and show active window title"
|
||||
onPressed: {
|
||||
expanded = !expanded
|
||||
}
|
||||
}
|
||||
|
||||
GlobalShortcut {
|
||||
name: "show_active_title"
|
||||
description: "Show the active window title"
|
||||
onPressed: {
|
||||
expanded = true
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
local mainMod = "ALT"
|
||||
local mainMod = "SUPER"
|
||||
|
||||
-- Move window in direction
|
||||
hl.bind(mainMod .. " + SHIFT + H", hl.dsp.window.move({ direction = "left" }))
|
||||
@@ -6,6 +6,11 @@ hl.bind(mainMod .. " + SHIFT + L", hl.dsp.window.move({ direction = "right" }))
|
||||
hl.bind(mainMod .. " + SHIFT + K", hl.dsp.window.move({ direction = "up" }))
|
||||
hl.bind(mainMod .. " + SHIFT + J", hl.dsp.window.move({ direction = "down" }))
|
||||
|
||||
hl.bind(mainMod .. " + H", hl.dsp.focus({ direction = "left" }))
|
||||
hl.bind(mainMod .. " + J", hl.dsp.focus({ direction = "down" }))
|
||||
hl.bind(mainMod .. " + K", hl.dsp.focus({ direction = "up" }))
|
||||
hl.bind(mainMod .. " + L", hl.dsp.focus({ direction = "right" }))
|
||||
|
||||
-- Switch to numbered workspaces
|
||||
for i = 1, 10 do
|
||||
local key = i % 10 -- workspace 10 -> key 0
|
||||
@@ -13,20 +18,20 @@ for i = 1, 10 do
|
||||
end
|
||||
|
||||
-- Previous / next workspace
|
||||
hl.bind("CTRL + ALT + H", hl.dsp.focus({ workspace = "-1" }))
|
||||
hl.bind("CTRL + ALT + L", hl.dsp.focus({ workspace = "+1" }))
|
||||
hl.bind("CTRL + ALT + LEFT", hl.dsp.focus({ workspace = "-1" }))
|
||||
hl.bind("CTRL + ALT + RIGHT", hl.dsp.focus({ workspace = "+1" }))
|
||||
hl.bind(mainMod .. " + ALT + H", hl.dsp.focus({ workspace = "-1" }))
|
||||
hl.bind(mainMod .. " + ALT + L", hl.dsp.focus({ workspace = "+1" }))
|
||||
-- hl.bind("CTRL + ALT + LEFT", hl.dsp.focus({ workspace = "-1" }))
|
||||
-- hl.bind("CTRL + ALT + RIGHT", hl.dsp.focus({ workspace = "+1" }))
|
||||
|
||||
-- Move window to previous / next workspace (follows the window)
|
||||
hl.bind("CTRL + ALT + SHIFT + H", hl.dsp.window.move({ workspace = "-1" }))
|
||||
hl.bind("CTRL + ALT + SHIFT + L", hl.dsp.window.move({ workspace = "+1" }))
|
||||
hl.bind("CTRL + ALT + SHIFT + LEFT", hl.dsp.window.move({ workspace = "-1" }))
|
||||
hl.bind("CTRL + ALT + SHIFT + RIGHT", hl.dsp.window.move({ workspace = "+1" }))
|
||||
hl.bind(mainMod .. " + ALT + SHIFT + H", hl.dsp.window.move({ workspace = "-1" }))
|
||||
hl.bind(mainMod .. " + ALT + SHIFT + L", hl.dsp.window.move({ workspace = "+1" }))
|
||||
-- hl.bind("CTRL + ALT + SHIFT + LEFT", hl.dsp.window.move({ workspace = "-1" }))
|
||||
-- hl.bind("CTRL + ALT + SHIFT + RIGHT", hl.dsp.window.move({ workspace = "+1" }))
|
||||
|
||||
-- Move window to previous / next workspace silently
|
||||
hl.bind(mainMod .. " + CTRL + SHIFT + H", hl.dsp.window.move({ workspace = "-1", follow = false }))
|
||||
hl.bind(mainMod .. " + CTRL + SHIFT + L", hl.dsp.window.move({ workspace = "+1", follow = false }))
|
||||
hl.bind(mainMod .. " + ALT + SHIFT + J", hl.dsp.window.move({ workspace = "-1", follow = false }))
|
||||
hl.bind(mainMod .. " + ALT + SHIFT + K", hl.dsp.window.move({ workspace = "+1", follow = false }))
|
||||
-- hl.bind(mainMod .. " + CTRL + SHIFT + LEFT", hl.dsp.window.move({ workspace = "-1", follow = false }))
|
||||
-- hl.bind(mainMod .. " + CTRL + SHIFT + RIGHT", hl.dsp.window.move({ workspace = "+1", follow = false }))
|
||||
|
||||
|
||||