mirror of
https://forge.katzen.cafe/schrottkatze/nix-configs.git
synced 2025-09-05 11:17:23 +02:00
workspace stuff rework
This commit is contained in:
parent
05fdb8a9cb
commit
0522f35453
6 changed files with 100 additions and 32 deletions
|
@ -6,7 +6,7 @@
|
|||
:style "border-bottom: 4px solid ${workspace.color}${workspace.active ? "; background-color: #3c3836" : ""}"
|
||||
:class "${workspace.focused ? "focused" : ""}"
|
||||
:onclick "swaymsg workspace ${workspace.name}"
|
||||
(label :text "${workspace.idx}")
|
||||
(label :text "${workspace.icon ?: workspace.idx}")
|
||||
)
|
||||
)
|
||||
)
|
||||
|
|
|
@ -13,7 +13,7 @@ button {
|
|||
|
||||
.workspaces button {
|
||||
border: 0px;
|
||||
padding: 0 3px;
|
||||
padding: 5px 4px 0 4px;
|
||||
}
|
||||
|
||||
.workspaces button.focused {
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
|
||||
"Mod+Shift+E".action.quit = [ ];
|
||||
"Mod+Shift+Q".action.close-window = [ ];
|
||||
"Mod+Shift+P".action.power-off-monitors = [ ];
|
||||
"Mod+Ctrl+Shift+P".action.power-off-monitors = [ ];
|
||||
|
||||
"Mod+Shift+Ctrl+Slash".action.toggle-keyboard-shortcuts-inhibit = [ ];
|
||||
"Mod+Shift+Ctrl+Slash".allow-inhibiting = false;
|
||||
|
@ -87,30 +87,6 @@
|
|||
"Mod+Shift+Ctrl+K".action.move-column-to-monitor-up = [ ];
|
||||
"Mod+Shift+Ctrl+L".action.move-column-to-monitor-right = [ ];
|
||||
|
||||
# workspace controls
|
||||
"Mod+P".action.focus-workspace-up = [ ];
|
||||
"Mod+N".action.focus-workspace-down = [ ];
|
||||
"Mod+Ctrl+P".action.move-column-to-workspace-up = [ ];
|
||||
"Mod+Ctrl+N".action.move-column-to-workspace-down = [ ];
|
||||
"Mod+1".action.focus-workspace = 1;
|
||||
"Mod+2".action.focus-workspace = 2;
|
||||
"Mod+3".action.focus-workspace = 3;
|
||||
"Mod+4".action.focus-workspace = 4;
|
||||
"Mod+5".action.focus-workspace = 5;
|
||||
"Mod+6".action.focus-workspace = 6;
|
||||
"Mod+7".action.focus-workspace = 7;
|
||||
"Mod+8".action.focus-workspace = 8;
|
||||
"Mod+9".action.focus-workspace = 9;
|
||||
"Mod+Ctrl+1".action.move-column-to-workspace = 1;
|
||||
"Mod+Ctrl+2".action.move-column-to-workspace = 2;
|
||||
"Mod+Ctrl+3".action.move-column-to-workspace = 3;
|
||||
"Mod+Ctrl+4".action.move-column-to-workspace = 4;
|
||||
"Mod+Ctrl+5".action.move-column-to-workspace = 5;
|
||||
"Mod+Ctrl+6".action.move-column-to-workspace = 6;
|
||||
"Mod+Ctrl+7".action.move-column-to-workspace = 7;
|
||||
"Mod+Ctrl+8".action.move-column-to-workspace = 8;
|
||||
"Mod+Ctrl+9".action.move-column-to-workspace = 9;
|
||||
|
||||
# column editing stuffs
|
||||
"Mod+BracketLeft".action.consume-or-expel-window-left = [ ];
|
||||
"Mod+BracketRight".action.consume-or-expel-window-right = [ ];
|
||||
|
@ -120,7 +96,7 @@
|
|||
"Mod+Equal".action.set-column-width = "+5%";
|
||||
"Mod+Shift+Minus".action.set-window-height = "-10%";
|
||||
"Mod+Shift+Equal".action.set-window-height = "+10%";
|
||||
"Mod+W".action.toggle-column-tabbed-display = [ ];
|
||||
"Mod+Shift+W".action.toggle-column-tabbed-display = [ ];
|
||||
|
||||
"Mod+Shift+F".action.expand-column-to-available-width = [ ];
|
||||
"Mod+Ctrl+F".action.fullscreen-window = [ ];
|
||||
|
|
|
@ -1,13 +1,14 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
./xwayland-sat.nix
|
||||
./screenshot.nix
|
||||
./input.nix
|
||||
./binds.nix
|
||||
./style.nix
|
||||
./input.nix
|
||||
./privacy.nix
|
||||
./quirks.nix
|
||||
./screenshot.nix
|
||||
./style.nix
|
||||
./workspaces.nix
|
||||
./xwayland-sat.nix
|
||||
];
|
||||
programs.niri.settings = {
|
||||
outputs."eDP-1" = {
|
||||
|
|
83
modules/desktop/home/niri/workspaces.nix
Normal file
83
modules/desktop/home/niri/workspaces.nix
Normal file
|
@ -0,0 +1,83 @@
|
|||
# { ... }:
|
||||
{
|
||||
programs.niri.settings =
|
||||
let
|
||||
social = "aaa social";
|
||||
browser = "bbb browser";
|
||||
notes = "ccc notes";
|
||||
in
|
||||
{
|
||||
workspaces = {
|
||||
"aaa social" = { };
|
||||
"bbb browser" = { };
|
||||
"ccc notes" = { };
|
||||
};
|
||||
|
||||
spawn-at-startup = [
|
||||
{ command = [ "Discord" ]; }
|
||||
{ command = [ "element-desktop" ]; }
|
||||
{ command = [ "signal-desktop" ]; }
|
||||
{ command = [ ".evolution-wrapped_" ]; }
|
||||
|
||||
{ command = [ "obsidian" ]; }
|
||||
{ command = [ "firefox" ]; }
|
||||
];
|
||||
|
||||
window-rules = [
|
||||
{
|
||||
matches = [
|
||||
{ app-id = "^signal|Element|org\.gnome\.Evolution$|discord"; }
|
||||
];
|
||||
open-on-workspace = social;
|
||||
}
|
||||
{
|
||||
matches = [
|
||||
{ app-id = "^firefox|Chromium-browser$"; }
|
||||
];
|
||||
open-on-workspace = browser;
|
||||
}
|
||||
{
|
||||
matches = [
|
||||
{ app-id = "obsidian"; }
|
||||
];
|
||||
open-on-workspace = notes;
|
||||
}
|
||||
];
|
||||
|
||||
# all workspace binds here,
|
||||
binds = {
|
||||
"Mod+P".action.focus-workspace-up = [ ];
|
||||
"Mod+N".action.focus-workspace-down = [ ];
|
||||
"Mod+Ctrl+P".action.move-workspace-up = [ ];
|
||||
"Mod+Ctrl+N".action.move-workspace-down = [ ];
|
||||
"Mod+Shift+P".action.move-column-to-workspace-up = [ ];
|
||||
"Mod+Shift+N".action.move-column-to-workspace-down = [ ];
|
||||
|
||||
"Mod+Q".action.focus-workspace = social;
|
||||
"Mod+W".action.focus-workspace = browser;
|
||||
"Mod+E".action.focus-workspace = notes;
|
||||
"Mod+Ctrl+Q".action.move-column-to-workspace = social;
|
||||
"Mod+Ctrl+W".action.move-column-to-workspace = browser;
|
||||
"Mod+Ctrl+E".action.move-column-to-workspace = notes;
|
||||
|
||||
"Mod+1".action.focus-workspace = 4;
|
||||
"Mod+2".action.focus-workspace = 5;
|
||||
"Mod+3".action.focus-workspace = 6;
|
||||
"Mod+4".action.focus-workspace = 7;
|
||||
"Mod+5".action.focus-workspace = 8;
|
||||
"Mod+6".action.focus-workspace = 9;
|
||||
"Mod+7".action.focus-workspace = 10;
|
||||
"Mod+8".action.focus-workspace = 11;
|
||||
"Mod+9".action.focus-workspace = 12;
|
||||
"Mod+Ctrl+1".action.move-column-to-workspace = 4;
|
||||
"Mod+Ctrl+2".action.move-column-to-workspace = 5;
|
||||
"Mod+Ctrl+3".action.move-column-to-workspace = 6;
|
||||
"Mod+Ctrl+4".action.move-column-to-workspace = 7;
|
||||
"Mod+Ctrl+5".action.move-column-to-workspace = 8;
|
||||
"Mod+Ctrl+6".action.move-column-to-workspace = 9;
|
||||
"Mod+Ctrl+7".action.move-column-to-workspace = 10;
|
||||
"Mod+Ctrl+8".action.move-column-to-workspace = 11;
|
||||
"Mod+Ctrl+9".action.move-column-to-workspace = 12;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -89,6 +89,7 @@ fn main() -> Result<(), std::io::Error> {
|
|||
output,
|
||||
is_active,
|
||||
is_focused,
|
||||
name,
|
||||
..
|
||||
}| WsData {
|
||||
color: output_colors_lut[&output.clone().expect("unreachable")]
|
||||
|
@ -96,6 +97,12 @@ fn main() -> Result<(), std::io::Error> {
|
|||
idx: *idx,
|
||||
focused: *is_focused,
|
||||
active: *is_active,
|
||||
icon: name.as_ref().map(|name| match name.as_str() {
|
||||
"aaa social" => "",
|
||||
"bbb browser" => "",
|
||||
"ccc notes" => "",
|
||||
&_ => "!",
|
||||
}),
|
||||
},
|
||||
)
|
||||
.collect::<Vec<_>>();
|
||||
|
@ -113,4 +120,5 @@ struct WsData {
|
|||
idx: u8,
|
||||
focused: bool,
|
||||
active: bool,
|
||||
icon: Option<&'static str>,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue