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"
|
||||
}
|
||||
},
|
||||
"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": {
|
||||
"inputs": {
|
||||
"naersk": "naersk",
|
||||
|
@ -3559,6 +3579,7 @@
|
|||
"nixpkgs-wayland": "nixpkgs-wayland",
|
||||
"nixvim": "nixvim",
|
||||
"nur": "nur",
|
||||
"quickshell": "quickshell",
|
||||
"schizofox": "schizofox",
|
||||
"spicetify-nix": "spicetify-nix",
|
||||
"split-monitor-workspaces": "split-monitor-workspaces",
|
||||
|
|
|
@ -58,6 +58,11 @@
|
|||
};
|
||||
|
||||
ags.url = "github:Aylur/ags";
|
||||
|
||||
quickshell = {
|
||||
url = "git+https://git.outfoxxed.me/outfoxxed/quickshell";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
schizofox = {
|
||||
url = "github:schizofox/schizofox";
|
||||
inputs = {
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
inherit (inputs) self;
|
||||
inherit (self) lib;
|
||||
in {
|
||||
temperance = lib.nixosSystem {
|
||||
temperance = lib.nixosSystem rec {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = {inherit lib inputs self;};
|
||||
specialArgs = {inherit lib inputs self system;};
|
||||
modules = [
|
||||
./vali/temperance
|
||||
../modules
|
||||
|
@ -13,9 +13,9 @@ in {
|
|||
inputs.stylix.nixosModules.stylix
|
||||
];
|
||||
};
|
||||
hermit = lib.nixosSystem {
|
||||
hermit = lib.nixosSystem rec {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = {inherit lib inputs self;};
|
||||
specialArgs = {inherit lib inputs self system;};
|
||||
modules = [
|
||||
./vali/hermit
|
||||
../modules
|
||||
|
|
|
@ -21,6 +21,8 @@
|
|||
experimental-features = ["nix-command" "flakes"];
|
||||
# reduce file size used & automatic garbage collector
|
||||
auto-optimise-store = true;
|
||||
max-jobs = 3;
|
||||
cores = 4;
|
||||
};
|
||||
};
|
||||
security.sudo.package = pkgs.sudo.override {withInsults = true;};
|
||||
|
@ -94,7 +96,8 @@
|
|||
pipewire.enable = true;
|
||||
dunst.enable = true;
|
||||
};
|
||||
themes = {
|
||||
theming = {
|
||||
quickshell.enable = true;
|
||||
stylix = {
|
||||
enable = true;
|
||||
# scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-dark-pale.yaml";
|
||||
|
|
|
@ -18,6 +18,7 @@ in {
|
|||
browsh
|
||||
bun
|
||||
cachix
|
||||
calc
|
||||
cmake
|
||||
difftastic
|
||||
dig
|
||||
|
|
|
@ -1,34 +1,30 @@
|
|||
local opt = vim.opt
|
||||
local options = {
|
||||
showmode = false, -- disable the -- STATUS -- line
|
||||
showtabline = 0, -- never show the tabline
|
||||
startofline = true, -- motions like "G" also move to the first char
|
||||
virtualedit = 'block', -- visual-block mode can select beyond end of line
|
||||
showmatch = true, -- when closing a bracket, briefly flash the matching one
|
||||
matchtime = 1, -- duration of that flashing n deci-seconds
|
||||
signcolumn = 'yes:1', -- static width
|
||||
report = 9001, -- disable "x more/fewer lines" messages
|
||||
diffopt = opt.diffopt:append('vertical'), -- diff mode: vertical splits
|
||||
backspace = { 'indent', 'eol', 'start' }, -- backspace through everything in insert mode
|
||||
hidden = true, -- Enable background buffers
|
||||
history = 100, -- Remember N lines in history
|
||||
lazyredraw = false, -- Faster scrolling if enabled, breaks noice
|
||||
synmaxcol = 240, -- Max column for syntax highlight
|
||||
updatetime = 250, -- ms to wait for trigger an event
|
||||
showmode = false, -- disable the -- STATUS -- line
|
||||
showtabline = 0, -- never show the tabline
|
||||
startofline = true, -- motions like "G" also move to the first char
|
||||
virtualedit = 'block', -- visual-block mode can select beyond end of line
|
||||
showmatch = true, -- when closing a bracket, briefly flash the matching one
|
||||
matchtime = 1, -- duration of that flashing n deci-seconds
|
||||
signcolumn = 'yes:1', -- static width
|
||||
report = 9001, -- disable "x more/fewer lines" messages
|
||||
diffopt = opt.diffopt:append('vertical'), -- diff mode: vertical splits
|
||||
backspace = { 'indent', 'eol', 'start' }, -- backspace through everything in insert mode
|
||||
hidden = true, -- Enable background buffers
|
||||
history = 100, -- Remember N lines in history
|
||||
lazyredraw = false, -- Faster scrolling if enabled, breaks noice
|
||||
synmaxcol = 240, -- Max column for syntax highlight
|
||||
updatetime = 250, -- ms to wait for trigger an event
|
||||
|
||||
-- If 0, move cursor line will not scroll window.
|
||||
-- If 999, cursor line will always be in middle of window.
|
||||
scrolloff = 0,
|
||||
-- If 0, move cursor line will not scroll window.
|
||||
-- If 999, cursor line will always be in middle of window.
|
||||
scrolloff = 0,
|
||||
}
|
||||
|
||||
-- iterate over the options table and set the options
|
||||
-- for each key = value pair
|
||||
for key, value in pairs(options) do
|
||||
opt[key] = value
|
||||
end
|
||||
|
||||
if not vim.g.vscode then
|
||||
opt.timeoutlen = 300 -- Time out on mappings
|
||||
opt[key] = value
|
||||
end
|
||||
|
||||
-- Don't auto-comment new lines automatically
|
||||
|
|
|
@ -11,13 +11,13 @@ in {
|
|||
colorizer.enable = true;
|
||||
modes-nvim.enable = true;
|
||||
illuminate.enable = true;
|
||||
|
||||
|
||||
breadcrumbs = {
|
||||
enable = true;
|
||||
source = "nvim-navic";
|
||||
navbuddy.enable = false;
|
||||
};
|
||||
|
||||
|
||||
smartcolumn = {
|
||||
enable = true;
|
||||
setupOpts = {
|
||||
|
@ -30,7 +30,7 @@ in {
|
|||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
borders = {
|
||||
enable = true;
|
||||
globalStyle = "rounded";
|
||||
|
|
|
@ -70,16 +70,16 @@ in {
|
|||
# I have come to realise that spellfile contents are
|
||||
# actually **not** loaded when luaConfigRC is used.
|
||||
# as spellfile is a vim thing, this should be fine
|
||||
# configRC.spellfile = entryAnywhere ''
|
||||
# set spellfile=${toString ./spell/runtime/en.utf-8.add} " toString sanitizes the path
|
||||
# '';
|
||||
configRC.spellfile = entryAnywhere ''
|
||||
set spellfile=${toString ./spell/runtime/en.utf-8.add} " toString sanitizes the path
|
||||
'';
|
||||
|
||||
# additional lua configuration that I can append
|
||||
# or, to be more precise, randomly inject into
|
||||
# the lua configuration of my Neovim configuration
|
||||
# wrapper. this is recursively read from the lua
|
||||
# directory, so we do not need to use require
|
||||
/*
|
||||
|
||||
luaConfigRC = let
|
||||
# get the name of each lua file in the lua directory, where setting files reside
|
||||
# and import them recursively
|
||||
|
@ -94,7 +94,6 @@ in {
|
|||
'');
|
||||
in
|
||||
luaConfig;
|
||||
*/
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -5,10 +5,10 @@
|
|||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.modules.themes.gtk;
|
||||
username = config.modules.other.system.username;
|
||||
cfg = config.modules.theming.gtk;
|
||||
inherit (config.modules.other.system) username;
|
||||
in {
|
||||
options.modules.themes.gtk = {
|
||||
options.modules.theming.gtk = {
|
||||
enable = mkEnableOption "gtk theming";
|
||||
name = mkOption {
|
||||
description = "gtk theme name";
|
||||
|
|
|
@ -9,10 +9,10 @@ with lib; let
|
|||
package = pkgs.gruvbox-gtk-theme;
|
||||
name = "Gruvbox-Dark-BL";
|
||||
};
|
||||
cfg = config.modules.themes.qt;
|
||||
cfg = config.modules.theming.qt;
|
||||
inherit (config.modules.other.system) username;
|
||||
in {
|
||||
options.modules.themes.qt = {
|
||||
options.modules.theming.qt = {
|
||||
enable = mkEnableOption "qt theming";
|
||||
name = mkOption {
|
||||
description = "qt theme name";
|
||||
|
|
|
@ -2,5 +2,6 @@ _: {
|
|||
imports = [
|
||||
./ags.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,
|
||||
...
|
||||
}: let
|
||||
cfg = config.modules.themes.stylix;
|
||||
inherit (config.modules.themes.stylix) scheme image;
|
||||
inherit (config.modules.themes.stylix.cursor) size;
|
||||
inherit (config.modules.themes.stylix.fontsizes) terminal popups applications;
|
||||
cfg = config.modules.theming.stylix;
|
||||
inherit (config.modules.theming.stylix) scheme image;
|
||||
inherit (config.modules.theming.stylix.cursor) size;
|
||||
inherit (config.modules.theming.stylix.fontsizes) terminal popups applications;
|
||||
in {
|
||||
options.modules.themes.stylix = {
|
||||
options.modules.theming.stylix = {
|
||||
enable = lib.mkEnableOption "stylix";
|
||||
scheme = lib.mkOption {
|
||||
description = " Color Scheme";
|
||||
|
|
|
@ -25,11 +25,14 @@ in {
|
|||
# xdg Portal
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
configPackages = [
|
||||
hyprland
|
||||
];
|
||||
extraPortals = [
|
||||
pkgs.xdg-desktop-portal-gtk
|
||||
inputs.hyprland.packages.${pkgs.system}.xdg-desktop-portal-hyprland
|
||||
];
|
||||
config.common.default = "*";
|
||||
#config.common.default = "hyprland";
|
||||
};
|
||||
home-manager.users.${username} = {
|
||||
wayland.windowManager.hyprland = {
|
||||
|
@ -123,6 +126,9 @@ in {
|
|||
follow_mouse = true;
|
||||
repeat_rate = 50;
|
||||
repeat_delay = 250;
|
||||
touchpad = {
|
||||
disable_while_typing = true;
|
||||
};
|
||||
};
|
||||
general = {
|
||||
sensitivity = 1.0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue