various tweaks, bw->kpxc temporarily
This commit is contained in:
parent
e06ce60bfe
commit
6b2b079a18
15 changed files with 180 additions and 157 deletions
|
@ -55,7 +55,8 @@ scope "programs.firefox" {
|
|||
"vimium-c@gdh1995.cn" = officialAddon "vimium-c";
|
||||
"{b86e4813-687a-43e6-ab65-0bde4ab75758}" = officialAddon "localcdn-fork-of-decentraleyes";
|
||||
"jid1-5Fs7iTLscUaZBgwr@jetpack" = officialAddon "happy-bonobo-disable-webrtc";
|
||||
"{446900e4-71c2-419f-a6a7-df9c091e268b}" = officialAddon "bitwarden-password-mananger";
|
||||
"keepassxc-browser@keepassxc.org" = officialAddon "keepassxc-browser";
|
||||
# "{446900e4-71c2-419f-a6a7-df9c091e268b}" = officialAddon "bitwarden-password-mananger";
|
||||
};
|
||||
|
||||
Preferences = {
|
||||
|
|
|
@ -11,13 +11,16 @@ Singleton {
|
|||
required property real width
|
||||
required property real height
|
||||
property real openTime: 600
|
||||
default property list<LogoutButton> buttons
|
||||
|
||||
Timer {
|
||||
id: closeTimer
|
||||
interval: topLevel.openTime
|
||||
running: false
|
||||
repeat: false
|
||||
onTriggered: logoutData.active = false
|
||||
onTriggered: {
|
||||
logoutData.active = false;
|
||||
}
|
||||
}
|
||||
|
||||
PersistentProperties {
|
||||
|
@ -25,32 +28,7 @@ Singleton {
|
|||
property bool open: false
|
||||
property bool active: false
|
||||
property real openness: 0
|
||||
property var buttons: [
|
||||
{
|
||||
name: "Logout",
|
||||
icon: "",
|
||||
key: "e",
|
||||
action: ["loginctl", "terminate-user", "1000"]
|
||||
},
|
||||
{
|
||||
name: "Suspend",
|
||||
icon: "",
|
||||
key: "s",
|
||||
action: ["systemctl", "suspend"]
|
||||
},
|
||||
{
|
||||
name: "Shutdown",
|
||||
icon: "",
|
||||
key: "d",
|
||||
action: ["systemctl", "poweroff"]
|
||||
},
|
||||
{
|
||||
name: "Reboot",
|
||||
icon: "",
|
||||
key: "r",
|
||||
action: ["systemctl", "reboot"]
|
||||
}
|
||||
]
|
||||
property int selected: -1
|
||||
|
||||
onOpenChanged: {
|
||||
if (open) {
|
||||
|
@ -103,12 +81,28 @@ Singleton {
|
|||
keyboardFocus: WlrKeyboardFocus.Exclusive
|
||||
focusable: true
|
||||
exclusionMode: ExclusionMode.Ignore
|
||||
Item {
|
||||
contentItem {
|
||||
focus: true
|
||||
Keys.onPressed: event => {
|
||||
console.log(event);
|
||||
if (event.key == Qt.Key_Escape) {
|
||||
logoutData.open = false;
|
||||
} else {
|
||||
for (let i = 0; i < topLevel.buttons.length; ++i) {
|
||||
let button = topLevel.buttons[i];
|
||||
if (event.key == button.keybind) {
|
||||
logoutData.open = false;
|
||||
button.exec();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
onClicked: logoutData.open = false
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: gridParent
|
||||
radius: 24
|
||||
|
@ -134,37 +128,24 @@ Singleton {
|
|||
bottomRightRadius: 0
|
||||
topRightRadius: 10
|
||||
bottomLeftRadius: 10
|
||||
Keys.onPressed: event => {
|
||||
console.log(event);
|
||||
if (event.key == Qt.Key_Escape) {
|
||||
logoutData.open = false;
|
||||
}
|
||||
}
|
||||
|
||||
Column {
|
||||
spacing: gridParent.margins.v
|
||||
padding: gridParent.margins.v
|
||||
|
||||
// horizontalItemAlignment: Grid.AlignHCenter
|
||||
// verticalItemAlignment: Grid.AlignVCenter
|
||||
anchors {
|
||||
fill: parent
|
||||
centerIn: parent
|
||||
alignWhenCentered: true
|
||||
verticalCenter: parent.verticalCenter
|
||||
// topMargin: gridParent.margins.v
|
||||
// bottomMargin: gridParent.margins.v
|
||||
}
|
||||
width: parent.width / 3 * 2
|
||||
height: parent.height / 6 * 5
|
||||
Repeater {
|
||||
model: logoutData.buttons.length
|
||||
model: topLevel.buttons.length
|
||||
Button {
|
||||
id: button
|
||||
required property int index
|
||||
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
Process {
|
||||
id: thisProcess
|
||||
running: false
|
||||
command: logoutData.buttons[button.index].action
|
||||
}
|
||||
|
||||
implicitWidth: gridParent.dims.h
|
||||
implicitHeight: gridParent.dims.v
|
||||
|
@ -175,14 +156,20 @@ Singleton {
|
|||
}
|
||||
background: Rectangle {
|
||||
color: button.hovered ? "#ffb852" : "#272a2a"
|
||||
Behavior on color {
|
||||
ColorAnimation {
|
||||
duration: 150
|
||||
}
|
||||
}
|
||||
border.color: "#ffab5b"
|
||||
border.width: 2
|
||||
radius: 6
|
||||
}
|
||||
text: logoutData.buttons[index].name
|
||||
text: topLevel.buttons[index].text
|
||||
onClicked: {
|
||||
logoutData.open = false;
|
||||
thisProcess.running = true;
|
||||
logoutData.selected = index;
|
||||
topLevel.buttons[index].exec();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
20
graphical/desktop/quickshell/logout/LogoutButton.qml
Normal file
20
graphical/desktop/quickshell/logout/LogoutButton.qml
Normal file
|
@ -0,0 +1,20 @@
|
|||
import QtQuick
|
||||
import Quickshell.Io
|
||||
|
||||
QtObject {
|
||||
required property string command
|
||||
required property string text
|
||||
// required property string icon
|
||||
property var keybind: null
|
||||
|
||||
id: button
|
||||
|
||||
readonly property var process: Process {
|
||||
command: ["sh", "-c", button.command]
|
||||
}
|
||||
|
||||
function exec() {
|
||||
process.startDetached();
|
||||
}
|
||||
}
|
||||
|
|
@ -35,7 +35,7 @@ ShellRoot {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// rhs main
|
||||
Variants {
|
||||
model: Quickshell.screens
|
||||
|
@ -196,7 +196,7 @@ ShellRoot {
|
|||
}
|
||||
border {
|
||||
width: 1
|
||||
color: tag.urgent ? Colours.c.red_b : Colours.c.yellow_b
|
||||
color: tag.urgent ? Colours.c.red_b : Colours.c.yellow_b
|
||||
Behavior on color {
|
||||
ColorAnimation {
|
||||
duration: 300
|
||||
|
@ -238,5 +238,25 @@ ShellRoot {
|
|||
Logout.Logout {
|
||||
width: 2560
|
||||
height: 1440
|
||||
Logout.LogoutButton {
|
||||
text: "Logout"
|
||||
keybind: Qt.Key_E
|
||||
command: "loginctl terminate-user 1000"
|
||||
}
|
||||
Logout.LogoutButton {
|
||||
text: "Suspend"
|
||||
keybind: Qt.Key_S
|
||||
command: "systemctl suspend"
|
||||
}
|
||||
Logout.LogoutButton {
|
||||
text: "Shutdown"
|
||||
keybind: Qt.Key_D
|
||||
command: "systemctl poweroff"
|
||||
}
|
||||
Logout.LogoutButton {
|
||||
text: "Reboot"
|
||||
keybind: Qt.Key_R
|
||||
command: "systemctl reboot"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ scope "user" {
|
|||
"https://git.atagen.co/".insteadOf = "atagen:";
|
||||
"https://codeberg.org/".insteadOf = "codeberg:";
|
||||
};
|
||||
credential.helper = "rbw";
|
||||
credential.helper = "keepassxc --git-groups";
|
||||
};
|
||||
integrations = {
|
||||
difftastic.enable = true;
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
_: {
|
||||
networking.networkmanager.enable = true;
|
||||
systemd.services.NetworkManager-wait-online.enable = true;
|
||||
services.resolved = {
|
||||
|
@ -12,5 +11,9 @@
|
|||
dnssec = "false";
|
||||
};
|
||||
services.mullvad-vpn.enable = true;
|
||||
services.tailscale = {
|
||||
enable = true;
|
||||
useRoutingFeatures = "client";
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -1,15 +1,17 @@
|
|||
{ pkgs, lib, ... }:
|
||||
{
|
||||
user.xdg.config.files."rbw/config.json" = {
|
||||
generator = lib.generators.toJSON { };
|
||||
value = {
|
||||
email = "boss@atagen.co";
|
||||
pinentry = lib.getExe pkgs.pinentry-qt;
|
||||
base_url = "https://v.atagen.co";
|
||||
};
|
||||
};
|
||||
# user.xdg.config.files."rbw/config.json" = {
|
||||
# generator = lib.generators.toJSON { };
|
||||
# value = {
|
||||
# email = "boss@atagen.co";
|
||||
# pinentry = lib.getExe pkgs.pinentry-qt;
|
||||
# base_url = "https://v.atagen.co";
|
||||
# };
|
||||
# };
|
||||
|
||||
apps = with pkgs; {
|
||||
migration = keepassxc;
|
||||
migrationCli = git-credential-keepassxc;
|
||||
passwordManager = bitwarden;
|
||||
passwordCli = rbw;
|
||||
};
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
mainUser,
|
||||
...
|
||||
}:
|
||||
{
|
||||
|
@ -24,6 +25,7 @@
|
|||
config = {
|
||||
systemd.user.services =
|
||||
builtins.mapAttrs (name: cmd: {
|
||||
environment.PATH = lib.mkForce "/run/current-system/sw/bin:/run/current-system/sw/sbin:/etc/profiles/per-user/${mainUser}/bin:/etc/profiles/per-user/${mainUser}/sbin";
|
||||
unitConfig = {
|
||||
Description = "${name}";
|
||||
Requires = [
|
||||
|
|
|
@ -17,24 +17,9 @@ in
|
|||
inherit (pkgs) wl-clipboard quickshell;
|
||||
};
|
||||
|
||||
systemd.user.services.quickshell = {
|
||||
environment.PATH = lib.mkForce "/run/current-system/sw/bin:/run/current-system/sw/sbin:/etc/profiles/per-user/bolt/bin:/etc/profiles/per-user/bolt/sbin";
|
||||
unitConfig = {
|
||||
Description = "Quickshell";
|
||||
Requires = [
|
||||
"graphical-session.target"
|
||||
];
|
||||
After = [
|
||||
"graphical-session.target"
|
||||
"niri.target"
|
||||
];
|
||||
};
|
||||
wantedBy = [ "graphical-session.target" ];
|
||||
serviceConfig.ExecStart = "${getExe pkgs.quickshell}";
|
||||
};
|
||||
|
||||
quick.services = {
|
||||
swaync = "${getExe pkgs.swaynotificationcenter}";
|
||||
quickshell = "${getExe pkgs.quickshell}";
|
||||
swayidle =
|
||||
let
|
||||
niri = getFlakePkg' inputs.niri "niri-unstable";
|
||||
|
|
1
graphical/sync.nix
Normal file
1
graphical/sync.nix
Normal file
|
@ -0,0 +1 @@
|
|||
{ scope, ... }: scope "services.syncthing.enable" <| true
|
Loading…
Add table
Add a link
Reference in a new issue