Implemented majority of dashboard
This commit is contained in:
@@ -1,38 +1,114 @@
|
||||
const Shortcuts = () => {
|
||||
const handleClick = (action) => {
|
||||
App.closeWindow("dashboardmenu");
|
||||
Utils.execAsync(action)
|
||||
.then(res => res)
|
||||
.catch(err => err);
|
||||
}
|
||||
return Widget.Box({
|
||||
class_name: "shortcuts-container",
|
||||
hpack: "fill",
|
||||
hexpand: true,
|
||||
children: [
|
||||
Widget.Box({
|
||||
class_name: "most-used-container",
|
||||
class_name: "container most-used dashboard-card",
|
||||
hexpand: true,
|
||||
children: [
|
||||
Widget.Button({
|
||||
class_name: "dashboard-button edge",
|
||||
Widget.Box({
|
||||
class_name: "card-button-left-section",
|
||||
vertical: true,
|
||||
hexpand: true,
|
||||
children: [
|
||||
Widget.Button({
|
||||
class_name: "dashboard-button edge top-button",
|
||||
on_primary_click: () => handleClick("microsoft-edge-stable"),
|
||||
child: Widget.Label({
|
||||
class_name: "button-label",
|
||||
label: "",
|
||||
}),
|
||||
}),
|
||||
Widget.Button({
|
||||
class_name: "dashboard-button spotify",
|
||||
on_primary_click: () => handleClick("spotify-launcher"),
|
||||
child: Widget.Label({
|
||||
class_name: "button-label",
|
||||
label: "",
|
||||
}),
|
||||
}),
|
||||
],
|
||||
}),
|
||||
Widget.Button({
|
||||
class_name: "dashboard-button spotify",
|
||||
}),
|
||||
Widget.Button({
|
||||
class_name: "dashboard-button discord",
|
||||
}),
|
||||
Widget.Button({
|
||||
class_name: "dashboard-button search",
|
||||
Widget.Box({
|
||||
vertical: true,
|
||||
hexpand: true,
|
||||
children: [
|
||||
Widget.Button({
|
||||
class_name: "dashboard-button discord top-button",
|
||||
on_primary_click: () => handleClick("discord"),
|
||||
child: Widget.Label({
|
||||
class_name: "button-label",
|
||||
label: "",
|
||||
}),
|
||||
}),
|
||||
Widget.Button({
|
||||
class_name: "dashboard-button search",
|
||||
on_primary_click: () => handleClick("rofi -show drun"),
|
||||
child: Widget.Label({
|
||||
class_name: "button-label",
|
||||
label: "",
|
||||
}),
|
||||
}),
|
||||
],
|
||||
}),
|
||||
],
|
||||
}),
|
||||
Widget.Box({
|
||||
class_name: "utilities-container",
|
||||
class_name: "container utilities dashboard-card",
|
||||
hexpand: true,
|
||||
children: [
|
||||
Widget.Button({
|
||||
class_name: "dashboard-button utility",
|
||||
Widget.Box({
|
||||
class_name: "card-button-left-section",
|
||||
vertical: true,
|
||||
hexpand: true,
|
||||
children: [
|
||||
Widget.Button({
|
||||
class_name: "dashboard-button colorpicker top-button",
|
||||
on_primary_click: () => handleClick("hyprpicker"),
|
||||
child: Widget.Label({
|
||||
class_name: "button-label",
|
||||
label: "",
|
||||
}),
|
||||
}),
|
||||
Widget.Button({
|
||||
class_name: "dashboard-button settings",
|
||||
on_primary_click: () => handleClick('bash -c "kitty -e nvim $HOME/.config/hypr/hyprland.conf"'),
|
||||
child: Widget.Label({
|
||||
class_name: "button-label",
|
||||
label: "",
|
||||
}),
|
||||
}),
|
||||
],
|
||||
}),
|
||||
Widget.Button({
|
||||
class_name: "dashboard-button utility",
|
||||
}),
|
||||
Widget.Button({
|
||||
class_name: "dashboard-button utility",
|
||||
}),
|
||||
Widget.Button({
|
||||
class_name: "dashboard-button utility",
|
||||
Widget.Box({
|
||||
vertical: true,
|
||||
hexpand: true,
|
||||
children: [
|
||||
Widget.Button({
|
||||
class_name: "dashboard-button snapshot top-button",
|
||||
on_primary_click: () => handleClick("grimblast --notify copysave area"),
|
||||
child: Widget.Label({
|
||||
class_name: "button-label",
|
||||
label: "",
|
||||
}),
|
||||
}),
|
||||
Widget.Button({
|
||||
class_name: "dashboard-button record",
|
||||
on_primary_click: () => handleClick("rofi -show drun"),
|
||||
child: Widget.Label({
|
||||
class_name: "button-label",
|
||||
label: "",
|
||||
}),
|
||||
}),
|
||||
],
|
||||
}),
|
||||
],
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user