Merge branch 'main' of codeberg.org:dnscio/nix-config

This commit is contained in:
Dennis Schoepf 2025-12-25 19:28:23 +01:00
commit e40ff16759
14 changed files with 315 additions and 190 deletions

View file

@ -3,7 +3,7 @@
./awww
./cliphist
./fuzzel
./ironbar
./waybar
./niri
./swaync
];

View file

@ -8,9 +8,10 @@ for project in ${projects[*]}; do
done
selected=$(printf "$projects_with_names" | fuzzel --dmenu --with-nth=1 --accept-nth=2 --prompt "Work on: ")
session_name=$(basename "$selected")
if [ "$selected" != "" ]; then
niri msg action focus-workspace "code"
firefox &
ghostty --working-directory="$selected"
# niri msg action focus-workspace "code"
# zen-beta &
ghostty -e zellij attach "$session_name" --create
fi

View file

@ -32,7 +32,7 @@ max_length = 40
type = "sys_info"
format = [
"h:dnsc-machine",
" {cpu_percent@sum}% ({temp_c@k10temp Tccd1}°C)",
" {cpu_percent}% ({temp_c@k10temp Tccd1}°C)",
" {memory_used#G:<2.1}/{memory_total#G:<2.1}GB",
" {disk_used#G@/:.1}GB used ({disk_free#G@/:.0}GB free)"
]

View file

@ -34,22 +34,11 @@ input {
mouse {
// off
// natural-scroll
// accel-speed 0.2
accel-speed -0.3
// accel-profile "flat"
// scroll-method "no-scroll"
}
trackpoint {
// off
// natural-scroll
// accel-speed 0.2
// accel-profile "flat"
// scroll-method "on-button-down"
// scroll-button 273
// scroll-button-lock
// middle-emulation
}
tablet {
map-to-output "DP-3"
// calibration-matrix 1.0 1.0 1.0 1.0 1.0 1.0
@ -111,7 +100,7 @@ layout {
// You can change how the focus ring looks.
focus-ring {
// off
width 2
width 3
active-color "#c57faf"
inactive-color "#d369af"
}
@ -188,10 +177,9 @@ layout {
}
// STARTUP
spawn-at-startup "waybar"
spawn-at-startup "swaync"
spawn-at-startup "swww-daemon"
spawn-at-startup "ironbar"
spawn-at-startup "blueman-applet"
spawn-at-startup "tailscale systray"
spawn-sh-at-startup "~/.config/awww/bin/random-bg.sh ~/Pictures/Wallpapers/safe/dark"
@ -217,7 +205,7 @@ screenshot-path "~/Pictures/Screenshots/taken_at_%Y-%m-%d %H-%M-%S.png"
// https://yalter.github.io/niri/Configuration:-Animations
animations {
// Uncomment to turn off all animations.
// off
off
// Slow down all animations by this factor. Values below 1 speed them up instead.
// slowdown 3.0
@ -227,20 +215,12 @@ overview {
backdrop-color "#0f0b15"
}
workspace "main"
workspace "code"
workspace "gaming"
workspace "other"
workspace "chat"
workspace "media"
// Window rules let you adjust behavior for individual windows.
// Find more information on the wiki:
// https://yalter.github.io/niri/Configuration:-Window-Rules
window-rule {
match app-id=r#"^steam$"#
open-on-workspace "gaming"
}
// window-rule {
@ -258,7 +238,7 @@ window-rule {
// This app-id regular expression will work for both:
// - host Firefox (app-id is "firefox")
// - Flatpak Firefox (app-id is "org.mozilla.firefox")
match app-id=r#"firefox$"# title="^Picture-in-Picture$"
match app-id=r#"zen-beta$"# title="^Picture-in-Picture$"
open-floating true
}
@ -437,21 +417,21 @@ binds {
//
// For example, with 2 workspaces + 1 empty, indices 3, 4, 5 and so on
// will all refer to the 3rd workspace.
Alt+1 { focus-workspace "main"; }
Alt+2 { focus-workspace "code"; }
Alt+3 { focus-workspace "gaming"; }
Alt+4 { focus-workspace "other"; }
Alt+5 { focus-workspace "chat"; }
Alt+6 { focus-workspace "media"; }
Alt+1 { focus-workspace 1; }
Alt+2 { focus-workspace 2; }
Alt+3 { focus-workspace 3; }
Alt+4 { focus-workspace 4; }
Alt+5 { focus-workspace 5; }
Alt+6 { focus-workspace 6; }
Alt+7 { focus-workspace 7; }
Alt+8 { focus-workspace 8; }
Alt+9 { focus-workspace 9; }
Alt+Ctrl+1 { move-column-to-workspace "main"; }
Alt+Ctrl+2 { move-column-to-workspace "code"; }
Alt+Ctrl+3 { move-column-to-workspace "gaming"; }
Alt+Ctrl+4 { move-column-to-workspace "other"; }
Alt+Ctrl+5 { move-column-to-workspace "chat"; }
Alt+Ctrl+6 { move-column-to-workspace "media"; }
Alt+Ctrl+1 { move-column-to-workspace 1; }
Alt+Ctrl+2 { move-column-to-workspace 2; }
Alt+Ctrl+3 { move-column-to-workspace 3; }
Alt+Ctrl+4 { move-column-to-workspace 4; }
Alt+Ctrl+5 { move-column-to-workspace 5; }
Alt+Ctrl+6 { move-column-to-workspace 6; }
Alt+Ctrl+7 { move-column-to-workspace 7; }
Alt+Ctrl+8 { move-column-to-workspace 8; }
Alt+Ctrl+9 { move-column-to-workspace 9; }

View file

@ -0,0 +1,126 @@
{
// Bar Options
"output": "DP-3",
"position": "left",
"width": 36,
"margin-left": 8,
"margin-top": 8,
"margin-bottom": 8,
// Placing Modules
"modules-left": [
"clock",
"custom/cpu-label",
"cpu",
"custom/memory-label",
"memory",
"custom/disk-label",
"disk",
"custom/nvidia-label",
"custom/nvidia"
],
"modules-center": [
"niri/workspaces"
],
"modules-right": [
"wireplumber#source",
"wireplumber#sink",
"tray",
"custom/power"
],
// Module Configuration
"niri/workspaces": {
"format": "{icon}",
"format-icons": {
"active": "󰄯",
"default": "󰄰"
}
},
"clock": {
"interval": 60,
"format": "{:%H\n%M}",
"format-alt": "<span color='#d369af'>{:%d\n%m}</span>",
"tooltip": false,
"justify": "center"
},
"custom/cpu-label": {
"format": "CPU",
"tooltip": false
},
"cpu": {
"interval": "30",
"format": "{usage}%",
"max-length": 2
},
"custom/memory-label": {
"format": "MEM",
"tooltip": false
},
"memory": {
"interval": "30",
"format": "{percentage}%",
"max-length": 2
},
"custom/disk-label": {
"format": "SSD",
"tooltip": false
},
"disk": {
"interval": "30",
"format": "{percentage_used}%",
"max-length": 2
},
"custom/nvidia-label": {
"format": "GPU",
"tooltip": false
},
"custom/nvidia": {
"exec": "nvidia-smi --query-gpu=temperature.gpu --format=csv,nounits,noheader",
"format": "{}°",
"tooltip": false,
"interval": 10
},
"wireplumber#source": {
"node-type": "Audio/Source",
"on-click": "wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle",
"on-click-right": "pwvucontrol",
"scroll-step": 5.0,
"tooltip-format": "{node_name} ({source_volume}%)",
"format": "{icon}",
"format-muted": "󰍭",
"format-icons": {
"default": [
"󰍬"
]
}
},
"wireplumber#sink": {
"on-click": "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle",
"on-click-right": "pwvucontrol",
"scroll-step": 5.0,
"tooltip-format": "{node_name} ({volume}%)",
"format": "{icon}",
"format-muted": "󰖁",
"format-icons": {
"default": [
"󰕿",
"󰖀",
"󰕾"
]
}
},
"tray": {
"icon-size": 14,
"spacing": 18
},
"custom/power": {
"format": "󰐥",
"tooltip": false,
"menu": "on-click",
"menu-file": "~/.config/waybar/power_menu.xml",
"menu-actions": {
"lock": "hyprlock",
"reboot": "reboot",
"shutdown": "shutdown now"
}
}
}

View file

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<object class="GtkMenu" id="menu">
<child>
<object class="GtkMenuItem" id="lock">
<property name="label">Lock</property>
</object>
</child>
<child>
<object class="GtkMenuItem" id="reboot">
<property name="label">Reboot</property>
</object>
</child>
<child>
<object class="GtkMenuItem" id="shutdown">
<property name="label">Shutdown</property>
</object>
</child>
</object>
</interface>

View file

@ -0,0 +1,86 @@
* {
font-family: "VictorMono Nerd Font Propo";
font-size: 12px;
font-weight: bold;
background: transparent;
}
tooltip,
menu {
background: rgba(15, 11, 12, 0.9);
border-radius: 8px;
border: 2px solid #572454;
}
menuitem {
color: #ffffff;
margin-left: 4px;
margin-right: 4px;
border-radius: 4px;
}
menuitem:hover {
color: #331531;
background-color: #c57faf;
}
window#waybar {
background-color: rgba(15, 11, 12, 0.95);
border-radius: 8px;
color: #ffffff;
}
#workspaces button {
padding: 2px 10px;
margin: 0;
color: #d369af;
}
#clock {
font-size: 15px;
padding: 8px 0 8px;
}
#custom-cpu-label,
#custom-memory-label,
#custom-disk-label,
#custom-nvidia-label {
color: #572454;
padding-top: 6px;
border-top: 1px solid #572454;
}
#custom-nvidia {
border-bottom: 1px solid #572454;
}
#cpu,
#memory,
#disk,
#custom-nvidia {
color: #d369af;
padding-bottom: 8px;
}
#wireplumber {
font-size: 16px;
margin-top: 4px;
margin-bottom: 4px;
}
#tray {
margin: 4px;
margin-top: 0;
border-radius: 4px;
padding-top: 10px;
padding-bottom: 10px;
}
#custom-power {
background-color: #331531;
font-size: 16px;
border-bottom-left-radius: 8px;
border-bottom-right-radius: 8px;
padding-top: 6px;
padding-bottom: 6px;
}

View file

@ -0,0 +1,15 @@
{ config, ... }:
{
xdg.configFile."waybar" = {
source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/dev/nix-config/modules/wm/waybar/config";
};
programs.waybar = {
enable = true;
systemd = {
enable = true;
target = "graphical.target";
};
};
}

View file

@ -17,15 +17,15 @@ keybinds clear-defaults=true {
floating true
move_to_focused_tab true
};
SwitchToMode "Locked"
SwitchToMode "Locked";
}
bind "s" {
Run "sessionizer" {
Run "fish" "-ic" "sessionizer" {
close_on_exit true
floating true
};
SwitchToMode "locked";
SwitchToMode "Locked";
}
// Global keybindings
@ -34,10 +34,10 @@ keybinds clear-defaults=true {
bind "x" { CloseFocus; SwitchToMode "Locked"; }
bind "-" { NewPane "Down"; SwitchToMode "Locked"; }
bind "|" { NewPane "Right"; SwitchToMode "Locked"; }
bind "h" "Left" { MoveFocus "Left"; }
bind "l" "Right" { MoveFocus "Right"; }
bind "j" "Down" { MoveFocus "Down"; }
bind "k" "Up" { MoveFocus "Up"; }
bind "h" "Left" { MoveFocus "Left"; SwitchToMode "Locked"; }
bind "l" "Right" { MoveFocus "Right"; SwitchToMode "Locked"; }
bind "j" "Down" { MoveFocus "Down"; SwitchToMode "Locked"; }
bind "k" "Up" { MoveFocus "Up"; SwitchToMode "Locked"; }
bind "1" { GoToTab 1; SwitchToMode "Locked"; }
bind "2" { GoToTab 2; SwitchToMode "Locked"; }
bind "3" { GoToTab 3; SwitchToMode "Locked"; }

View file

@ -41,6 +41,23 @@
id = "53d805fa-2cc1-44b5-929b-a72cc83d9587";
position = 1000;
container = containers."Personal".id;
theme = {
type = "gradient";
texture = 0.7;
opacity = 0.8;
colors = [
{
red = 87;
green = 36;
blue = 84;
}
{
red = 51;
green = 21;
blue = 49;
}
];
};
};
};
pins = {
@ -49,7 +66,7 @@
workspace = spaces.Personal.id;
container = containers.Personal.id;
url = "https://home.dnsc.io";
position = 100;
position = 101;
};
"Apps" = {
id = "092abc24-d7c5-4012-b311-d4ee0b193537";