quickshell!
This commit is contained in:
parent
6697dbb64b
commit
dc8e6873c3
17 changed files with 251 additions and 47 deletions
21
flake.lock
generated
21
flake.lock
generated
|
@ -3518,6 +3518,26 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"quickshell": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1720478269,
|
||||||
|
"narHash": "sha256-53nF07+fPxLXfQ9bBuxVZ90UAgryG5WJVBmG1XXSuE0=",
|
||||||
|
"ref": "refs/heads/master",
|
||||||
|
"rev": "db23c0264a1c277b33698e115a9768caf4da4628",
|
||||||
|
"revCount": 240,
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://git.outfoxxed.me/outfoxxed/quickshell"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://git.outfoxxed.me/outfoxxed/quickshell"
|
||||||
|
}
|
||||||
|
},
|
||||||
"rnix-lsp": {
|
"rnix-lsp": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"naersk": "naersk",
|
"naersk": "naersk",
|
||||||
|
@ -3559,6 +3579,7 @@
|
||||||
"nixpkgs-wayland": "nixpkgs-wayland",
|
"nixpkgs-wayland": "nixpkgs-wayland",
|
||||||
"nixvim": "nixvim",
|
"nixvim": "nixvim",
|
||||||
"nur": "nur",
|
"nur": "nur",
|
||||||
|
"quickshell": "quickshell",
|
||||||
"schizofox": "schizofox",
|
"schizofox": "schizofox",
|
||||||
"spicetify-nix": "spicetify-nix",
|
"spicetify-nix": "spicetify-nix",
|
||||||
"split-monitor-workspaces": "split-monitor-workspaces",
|
"split-monitor-workspaces": "split-monitor-workspaces",
|
||||||
|
|
|
@ -58,6 +58,11 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
ags.url = "github:Aylur/ags";
|
ags.url = "github:Aylur/ags";
|
||||||
|
|
||||||
|
quickshell = {
|
||||||
|
url = "git+https://git.outfoxxed.me/outfoxxed/quickshell";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
schizofox = {
|
schizofox = {
|
||||||
url = "github:schizofox/schizofox";
|
url = "github:schizofox/schizofox";
|
||||||
inputs = {
|
inputs = {
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
inherit (inputs) self;
|
inherit (inputs) self;
|
||||||
inherit (self) lib;
|
inherit (self) lib;
|
||||||
in {
|
in {
|
||||||
temperance = lib.nixosSystem {
|
temperance = lib.nixosSystem rec {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
specialArgs = {inherit lib inputs self;};
|
specialArgs = {inherit lib inputs self system;};
|
||||||
modules = [
|
modules = [
|
||||||
./vali/temperance
|
./vali/temperance
|
||||||
../modules
|
../modules
|
||||||
|
@ -13,9 +13,9 @@ in {
|
||||||
inputs.stylix.nixosModules.stylix
|
inputs.stylix.nixosModules.stylix
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
hermit = lib.nixosSystem {
|
hermit = lib.nixosSystem rec {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
specialArgs = {inherit lib inputs self;};
|
specialArgs = {inherit lib inputs self system;};
|
||||||
modules = [
|
modules = [
|
||||||
./vali/hermit
|
./vali/hermit
|
||||||
../modules
|
../modules
|
||||||
|
|
|
@ -21,6 +21,8 @@
|
||||||
experimental-features = ["nix-command" "flakes"];
|
experimental-features = ["nix-command" "flakes"];
|
||||||
# reduce file size used & automatic garbage collector
|
# reduce file size used & automatic garbage collector
|
||||||
auto-optimise-store = true;
|
auto-optimise-store = true;
|
||||||
|
max-jobs = 3;
|
||||||
|
cores = 4;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
security.sudo.package = pkgs.sudo.override {withInsults = true;};
|
security.sudo.package = pkgs.sudo.override {withInsults = true;};
|
||||||
|
@ -94,7 +96,8 @@
|
||||||
pipewire.enable = true;
|
pipewire.enable = true;
|
||||||
dunst.enable = true;
|
dunst.enable = true;
|
||||||
};
|
};
|
||||||
themes = {
|
theming = {
|
||||||
|
quickshell.enable = true;
|
||||||
stylix = {
|
stylix = {
|
||||||
enable = true;
|
enable = true;
|
||||||
# scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-dark-pale.yaml";
|
# scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-dark-pale.yaml";
|
||||||
|
|
|
@ -18,6 +18,7 @@ in {
|
||||||
browsh
|
browsh
|
||||||
bun
|
bun
|
||||||
cachix
|
cachix
|
||||||
|
calc
|
||||||
cmake
|
cmake
|
||||||
difftastic
|
difftastic
|
||||||
dig
|
dig
|
||||||
|
|
|
@ -27,10 +27,6 @@ for key, value in pairs(options) do
|
||||||
opt[key] = value
|
opt[key] = value
|
||||||
end
|
end
|
||||||
|
|
||||||
if not vim.g.vscode then
|
|
||||||
opt.timeoutlen = 300 -- Time out on mappings
|
|
||||||
end
|
|
||||||
|
|
||||||
-- Don't auto-comment new lines automatically
|
-- Don't auto-comment new lines automatically
|
||||||
-- that happens when you press enter at the end
|
-- that happens when you press enter at the end
|
||||||
-- of a comment line, and comments the next line
|
-- of a comment line, and comments the next line
|
||||||
|
|
|
@ -70,16 +70,16 @@ in {
|
||||||
# I have come to realise that spellfile contents are
|
# I have come to realise that spellfile contents are
|
||||||
# actually **not** loaded when luaConfigRC is used.
|
# actually **not** loaded when luaConfigRC is used.
|
||||||
# as spellfile is a vim thing, this should be fine
|
# as spellfile is a vim thing, this should be fine
|
||||||
# configRC.spellfile = entryAnywhere ''
|
configRC.spellfile = entryAnywhere ''
|
||||||
# set spellfile=${toString ./spell/runtime/en.utf-8.add} " toString sanitizes the path
|
set spellfile=${toString ./spell/runtime/en.utf-8.add} " toString sanitizes the path
|
||||||
# '';
|
'';
|
||||||
|
|
||||||
# additional lua configuration that I can append
|
# additional lua configuration that I can append
|
||||||
# or, to be more precise, randomly inject into
|
# or, to be more precise, randomly inject into
|
||||||
# the lua configuration of my Neovim configuration
|
# the lua configuration of my Neovim configuration
|
||||||
# wrapper. this is recursively read from the lua
|
# wrapper. this is recursively read from the lua
|
||||||
# directory, so we do not need to use require
|
# directory, so we do not need to use require
|
||||||
/*
|
|
||||||
luaConfigRC = let
|
luaConfigRC = let
|
||||||
# get the name of each lua file in the lua directory, where setting files reside
|
# get the name of each lua file in the lua directory, where setting files reside
|
||||||
# and import them recursively
|
# and import them recursively
|
||||||
|
@ -94,7 +94,6 @@ in {
|
||||||
'');
|
'');
|
||||||
in
|
in
|
||||||
luaConfig;
|
luaConfig;
|
||||||
*/
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -5,10 +5,10 @@
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib; let
|
with lib; let
|
||||||
cfg = config.modules.themes.gtk;
|
cfg = config.modules.theming.gtk;
|
||||||
username = config.modules.other.system.username;
|
inherit (config.modules.other.system) username;
|
||||||
in {
|
in {
|
||||||
options.modules.themes.gtk = {
|
options.modules.theming.gtk = {
|
||||||
enable = mkEnableOption "gtk theming";
|
enable = mkEnableOption "gtk theming";
|
||||||
name = mkOption {
|
name = mkOption {
|
||||||
description = "gtk theme name";
|
description = "gtk theme name";
|
||||||
|
|
|
@ -9,10 +9,10 @@ with lib; let
|
||||||
package = pkgs.gruvbox-gtk-theme;
|
package = pkgs.gruvbox-gtk-theme;
|
||||||
name = "Gruvbox-Dark-BL";
|
name = "Gruvbox-Dark-BL";
|
||||||
};
|
};
|
||||||
cfg = config.modules.themes.qt;
|
cfg = config.modules.theming.qt;
|
||||||
inherit (config.modules.other.system) username;
|
inherit (config.modules.other.system) username;
|
||||||
in {
|
in {
|
||||||
options.modules.themes.qt = {
|
options.modules.theming.qt = {
|
||||||
enable = mkEnableOption "qt theming";
|
enable = mkEnableOption "qt theming";
|
||||||
name = mkOption {
|
name = mkOption {
|
||||||
description = "qt theme name";
|
description = "qt theme name";
|
||||||
|
|
|
@ -2,5 +2,6 @@ _: {
|
||||||
imports = [
|
imports = [
|
||||||
./ags.nix
|
./ags.nix
|
||||||
./stylix.nix
|
./stylix.nix
|
||||||
|
./quickshell
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
35
modules/styling/quickshell/bar/shell.qml
Normal file
35
modules/styling/quickshell/bar/shell.qml
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
import Quickshell // for ShellRoot and PanelWindow
|
||||||
|
import QtQuick // for text
|
||||||
|
import QtQuick.Layouts
|
||||||
|
import QtQuick.Controls
|
||||||
|
import "workspaces" as Workspaces
|
||||||
|
|
||||||
|
ShellRoot {
|
||||||
|
PanelWindow {
|
||||||
|
anchors {
|
||||||
|
top: true
|
||||||
|
left : true
|
||||||
|
right:true
|
||||||
|
}
|
||||||
|
height: 30
|
||||||
|
ColumnLayout {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
spacing: 0
|
||||||
|
Loader {
|
||||||
|
active: isSoleBar
|
||||||
|
Layout.preferredHeight: active ? implicitHeight: 0;
|
||||||
|
Layout.fillWidth: true
|
||||||
|
sourceComponent: Workspaces.Widget {
|
||||||
|
bar: root
|
||||||
|
wsBaseIndex: 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Workspaces.Widget {
|
||||||
|
bar: root
|
||||||
|
Layout.fillWidth: true
|
||||||
|
wsBaseIndex: 1;
|
||||||
|
hideWhenEmpty: isSoleBar
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
110
modules/styling/quickshell/bar/workspaces/Widget.qml
Normal file
110
modules/styling/quickshell/bar/workspaces/Widget.qml
Normal file
|
@ -0,0 +1,110 @@
|
||||||
|
import QtQuick
|
||||||
|
import QtQuick.Layouts
|
||||||
|
import Quickshell.Hyprland
|
||||||
|
import ".."
|
||||||
|
import "root:."
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
id: root
|
||||||
|
required property var bar;
|
||||||
|
required property int wsBaseIndex;
|
||||||
|
property int wsCount: 10;
|
||||||
|
property bool hideWhenEmpty: false;
|
||||||
|
implicitHeight: column.implicitHeight + 10;
|
||||||
|
acceptedButtons: Qt.NoButton
|
||||||
|
onWheel: event => {
|
||||||
|
event.accepted = true;
|
||||||
|
const step = -Math.sign(event.angleDelta.y);
|
||||||
|
const targetWs = currentIndex + step;
|
||||||
|
if (targetWs >= wsBaseIndex && targetWs < wsBaseIndex + wsCount) {
|
||||||
|
Hyprland.dispatch(`workspace ${targetWs}`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
readonly property HyprlandMonitor monitor: Hyprland.monitorFor(bar.screen);
|
||||||
|
property int currentIndex: 0;
|
||||||
|
property int existsCount: 0;
|
||||||
|
visible: !hideWhenEmpty || existsCount > 0;
|
||||||
|
|
||||||
|
property real animPos: 0;
|
||||||
|
Behavior on animPos { SmoothedAnimation { velocity: 100 } }
|
||||||
|
|
||||||
|
// destructor takes care of nulling
|
||||||
|
signal workspaceAdded(workspace: HyprlandWorkspace);
|
||||||
|
|
||||||
|
ColumnLayout {
|
||||||
|
id: column
|
||||||
|
spacing: 0
|
||||||
|
anchors {
|
||||||
|
fill: parent;
|
||||||
|
topMargin: 0;
|
||||||
|
margins: 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
Repeater {
|
||||||
|
model: 10
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
id: wsItem
|
||||||
|
onPressed: Hyprland.dispatch(`workspace ${wsIndex}`);
|
||||||
|
|
||||||
|
Layout.fillWidth: true
|
||||||
|
implicitHeight: 15
|
||||||
|
|
||||||
|
required property int index;
|
||||||
|
property int wsIndex: wsBaseIndex + index;
|
||||||
|
property HyprlandWorkspace workspace: null;
|
||||||
|
property bool exists: workspace != null;
|
||||||
|
property bool active: (monitor?.activeWorkspace ?? false) && monitor.activeWorkspace == workspace;
|
||||||
|
|
||||||
|
onActiveChanged: {
|
||||||
|
if (active) root.currentIndex = wsIndex;
|
||||||
|
}
|
||||||
|
|
||||||
|
onExistsChanged: {
|
||||||
|
root.existsCount += exists ? 1 : -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
Connections {
|
||||||
|
target: root
|
||||||
|
|
||||||
|
function onWorkspaceAdded(workspace: HyprlandWorkspace) {
|
||||||
|
if (workspace.id == wsItem.wsIndex) {
|
||||||
|
wsItem.workspace = workspace;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
property real animActive: active ? 100 : 0
|
||||||
|
Behavior on animActive { NumberAnimation { duration: 100 } }
|
||||||
|
|
||||||
|
property real animExists: exists ? 100 : 0
|
||||||
|
Behavior on animExists { NumberAnimation { duration: 100 } }
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
anchors.centerIn: parent
|
||||||
|
height: 10
|
||||||
|
width: parent.width
|
||||||
|
scale: 1 + animActive * 0.003
|
||||||
|
radius: height / 2
|
||||||
|
border.color: ShellGlobals.colors.widgetOutline
|
||||||
|
border.width: 1
|
||||||
|
color: ShellGlobals.interpolateColors(animExists * 0.01, ShellGlobals.colors.widget, ShellGlobals.colors.widgetActive);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Connections {
|
||||||
|
target: Hyprland.workspaces
|
||||||
|
|
||||||
|
function onObjectInsertedPost(workspace) {
|
||||||
|
root.workspaceAdded(workspace);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Component.onCompleted: {
|
||||||
|
Hyprland.workspaces.values.forEach(workspace => {
|
||||||
|
root.workspaceAdded(workspace)
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
27
modules/styling/quickshell/default.nix
Normal file
27
modules/styling/quickshell/default.nix
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
system,
|
||||||
|
inputs,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
inherit (inputs) quickshell;
|
||||||
|
inherit (lib) mkIf mkEnableOption;
|
||||||
|
inherit (lib.generators) toKeyValue;
|
||||||
|
inherit (config.modules.other.system) username;
|
||||||
|
cfg = config.modules.theming.quickshell;
|
||||||
|
in {
|
||||||
|
options.modules.theming.quickshell.enable = mkEnableOption "quickshell";
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
qt6.qtimageformats
|
||||||
|
qt6.qt5compat
|
||||||
|
quickshell.packages.${system}.default
|
||||||
|
pamtester
|
||||||
|
];
|
||||||
|
home-manager.users.${username}.xdg.configFile."quickshell/manifest.conf".text = toKeyValue {} {
|
||||||
|
bar = "${./bar}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
0
modules/styling/quickshell/systray/Widget.qml
Normal file
0
modules/styling/quickshell/systray/Widget.qml
Normal file
|
@ -4,12 +4,12 @@
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
cfg = config.modules.themes.stylix;
|
cfg = config.modules.theming.stylix;
|
||||||
inherit (config.modules.themes.stylix) scheme image;
|
inherit (config.modules.theming.stylix) scheme image;
|
||||||
inherit (config.modules.themes.stylix.cursor) size;
|
inherit (config.modules.theming.stylix.cursor) size;
|
||||||
inherit (config.modules.themes.stylix.fontsizes) terminal popups applications;
|
inherit (config.modules.theming.stylix.fontsizes) terminal popups applications;
|
||||||
in {
|
in {
|
||||||
options.modules.themes.stylix = {
|
options.modules.theming.stylix = {
|
||||||
enable = lib.mkEnableOption "stylix";
|
enable = lib.mkEnableOption "stylix";
|
||||||
scheme = lib.mkOption {
|
scheme = lib.mkOption {
|
||||||
description = " Color Scheme";
|
description = " Color Scheme";
|
||||||
|
|
|
@ -25,11 +25,14 @@ in {
|
||||||
# xdg Portal
|
# xdg Portal
|
||||||
xdg.portal = {
|
xdg.portal = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
configPackages = [
|
||||||
|
hyprland
|
||||||
|
];
|
||||||
extraPortals = [
|
extraPortals = [
|
||||||
pkgs.xdg-desktop-portal-gtk
|
pkgs.xdg-desktop-portal-gtk
|
||||||
inputs.hyprland.packages.${pkgs.system}.xdg-desktop-portal-hyprland
|
inputs.hyprland.packages.${pkgs.system}.xdg-desktop-portal-hyprland
|
||||||
];
|
];
|
||||||
config.common.default = "*";
|
#config.common.default = "hyprland";
|
||||||
};
|
};
|
||||||
home-manager.users.${username} = {
|
home-manager.users.${username} = {
|
||||||
wayland.windowManager.hyprland = {
|
wayland.windowManager.hyprland = {
|
||||||
|
@ -123,6 +126,9 @@ in {
|
||||||
follow_mouse = true;
|
follow_mouse = true;
|
||||||
repeat_rate = 50;
|
repeat_rate = 50;
|
||||||
repeat_delay = 250;
|
repeat_delay = 250;
|
||||||
|
touchpad = {
|
||||||
|
disable_while_typing = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
general = {
|
general = {
|
||||||
sensitivity = 1.0;
|
sensitivity = 1.0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue