Moved modules and hm dir to hosts dir. Moved some code to shared and extended lib with custom functions

This commit is contained in:
2025-04-12 17:05:38 +02:00
parent df5bea9cc0
commit e3a1dd36d7
99 changed files with 550 additions and 140 deletions

View File

@ -0,0 +1,102 @@
{ common, ... }:
let
app = common.default;
in
{
wayland.windowManager.hyprland.settings = {
"$mainMod" = "SUPER";
"$shiftMod" = "$mainMod SHIFT";
"$ctrlMod" = "$mainMod CTRL";
"$menu" = "rofi -show drun";
bind = [
"$mainMod, Q, exec, ${app.terminal}"
"$mainMod, C, killactive,"
"$shiftMod, M, exit,"
"$mainMod, E, exec, ${app.fileManager}"
"$mainMod, V, togglefloating,"
"$mainMod, R, exec, $menu"
"$mainMod, P, pseudo," # dwindle
"$mainMod, J, togglesplit," # dwindle
"$mainMod, B, exec, ${app.browser}"
"$mainMod, L, exec, ${app.lockScreen}"
"$mainMod, K, exec, [float] ${app.calculator}"
"$mainMod, ESCAPE, exec, hyprpanel t dashboardmenu"
# Move focus with mainMod + arrow keys
"$mainMod, left, movefocus, l"
"$mainMod, right, movefocus, r"
"$mainMod, up, movefocus, u"
"$mainMod, down, movefocus, d"
# Move window with ctrl + mainMod + arrow keys
"$ctrlMod, left, movewindow, l"
"$ctrlMod, right, movewindow, r"
"$ctrlMod, up, movewindow, u"
"$ctrlMod, down, movewindow, d"
# Switch workspaces with mainMod + [0-9]
"$mainMod, 1, workspace, 1"
"$mainMod, 2, workspace, 2"
"$mainMod, 3, workspace, 3"
"$mainMod, 4, workspace, 4"
"$mainMod, 5, workspace, 5"
"$mainMod, 6, workspace, 6"
"$mainMod, 7, workspace, 7"
"$mainMod, 8, workspace, 8"
"$mainMod, 9, workspace, 9"
"$mainMod, 0, workspace, 10"
# Move active window to a workspace with mainMod + SHIFT + [0-9]
"$shiftMod, 1, movetoworkspace, 1"
"$shiftMod, 2, movetoworkspace, 2"
"$shiftMod, 3, movetoworkspace, 3"
"$shiftMod, 4, movetoworkspace, 4"
"$shiftMod, 5, movetoworkspace, 5"
"$shiftMod, 6, movetoworkspace, 6"
"$shiftMod, 7, movetoworkspace, 7"
"$shiftMod, 8, movetoworkspace, 8"
"$shiftMod, 9, movetoworkspace, 9"
"$shiftMod, 0, movetoworkspace, 10"
# Example special workspace (scratchpad)
"$mainMod, S, togglespecialworkspace, magic"
"$shiftMod, S, movetoworkspace, special:magic"
# Scroll through existing workspaces with mainMod + scroll
"$mainMod, mouse_down, workspace, e+1"
"$mainMod, mouse_up, workspace, e-1"
];
binde = [
# Resize the focused window
"$shiftMod, right, resizeactive, 20 0"
"$shiftMod, left, resizeactive, -20 0"
"$shiftMod, up, resizeactive, 0 -20"
"$shiftMod, down, resizeactive, 0 20"
];
bindm = [
# Move/resize windows with mainMod + LMB/RMB and dragging
"$mainMod, mouse:272, movewindow"
"$mainMod, mouse:273, resizewindow"
];
bindl = [
", XF86AudioNext, exec, playerctl next"
", XF86AudioPause, exec, playerctl play-pause"
", XF86AudioPlay, exec, playerctl play-pause"
", XF86AudioPrev, exec, playerctl previous"
];
bindel = [
# Laptop multimedia keys for volume and LCD brightness
",XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+"
",XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"
",XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
",XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"
",XF86MonBrightnessUp, exec, brightnessctl s 10%+"
",XF86MonBrightnessDown, exec, brightnessctl s 10%-"
];
};
}

View File

@ -0,0 +1,19 @@
# Home configurations for Hyprland. For system configs, see ./modules/hyprland
{
imports = [
./binds.nix
./waybar
./hypridle
./hyprlock
./hyprpanel
./hyprpaper.nix
./hyprshot.nix
./settings.nix
./swaync
];
wayland.windowManager.hyprland = {
enable = true;
systemd.variables = [ "--all" ]; # Import environment into systemd
};
}

View File

@ -0,0 +1,38 @@
let
# Time in seconds
lockAfter = 1200;
screenOffAfter = 1500;
suspendAfter = 7200;
in
{
services.hypridle = {
enable = true;
settings = {
general = {
before_sleep_cmd = "loginctl lock-session";
after_sleep_cmd = "hyprctl dispatch dpms on";
lock_cmd = "pidof hyprlock || hyprlock"; # Avoid running multiple instances of hyprlock
};
listener = [
# Lock
{
timeout = lockAfter;
on-timeout = "loginctl lock-session";
}
# Turn off screens
{
timeout = screenOffAfter;
on-timeout = "hyprctl dispatch dpms off";
on-resume = "hyprctl dispatch dpms on";
}
# Suspend
{
timeout = suspendAfter;
on-timeout = "systemctl suspend"; # suspend pc
}
];
};
};
wayland.windowManager.hyprland.settings.exec-once = [ "hypridle" ];
}

View File

@ -0,0 +1,87 @@
{ theme, ... }:
{
programs.hyprlock = {
enable = true;
settings = {
"$font" = "${theme.nerdFont} Nerd Font";
background = [
{
path = "${theme.wallpaper.lockscreen}";
}
];
# GENERAL
general = {
disable_loading_bar = true;
hide_cursor = true;
};
# LAYOUT
label = [
{
text = "$LAYOUT";
color = "${theme.textRgb}";
font_size = 25;
font_family = "$font";
position = "30, -30";
halign = "left";
valign = "top";
}
# TIME
{
text = "$TIME";
color = "${theme.textRgb}";
font_size = 90;
font_family = "$font";
position = "-30, 0";
halign = "right";
valign = "top";
}
# DATE
{
text = "cmd[update:43200000] date +\"%A, %d %B %Y\"";
color = "${theme.textRgb}";
font_size = 25;
font_family = "$font";
position = "-30, -150";
halign = "right";
valign = "top";
}
];
# USER AVATAR
image = {
path = builtins.toString theme.avatar.image;
size = 100;
border_color = "${theme.blueRgb}";
position = "0, 75";
halign = "center";
valign = "center";
};
# INPUT FIELD
input-field = {
size = "300, 60";
outline_thickness = 4;
dots_size = 0.2;
dots_spacing = 0.2;
dots_center = true;
outer_color = "${theme.blueRgb}";
inner_color = "${theme.surface0Rgb}";
font_color = "${theme.textRgb}";
fade_on_empty = false;
placeholder_text = "<span foreground=\"##${theme.textAlpha}\">󰌾 Logged in as <span foreground=\"##${theme.blueAlpha}\">$USER</span></span>";
hide_input = false;
check_color = "${theme.blueRgb}";
fail_color = "${theme.redRgb}";
fail_text = "<i>$FAIL <b>($ATTEMPTS)</b></i>";
capslock_color = "${theme.yellowRgb}";
position = "0, -47"; # TODO change to use % at 25.05
halign = "center";
valign = "center";
};
};
};
}

View File

@ -0,0 +1,117 @@
{
pkgs,
inputs,
common,
theme,
lib,
...
}:
{
imports = [ inputs.hyprpanel.homeManagerModules.hyprpanel ];
programs.hyprpanel = {
enable = true;
# Add hyprpanel to the Hyprland config 'exec-once'.
hyprland.enable = true;
# Fix the overwrite issue with HyprPanel.
overwrite.enable = true;
# Override the final config with an arbitrary set.
# Useful for overriding colors in your selected theme.
# Default: {}
override = {
theme.bar.menus.text = "#123ABC";
};
# Configure and theme almost all options from the GUI.
# Options that require '{}' or '[]' are not yet implemented,
# except for the layout above.
# See 'https://hyprpanel.com/configuration/settings.html'.
# Default: <same as gui>
settings = {
bar = {
clock.format = "%a %b %d %H:%M";
customModules.kbLayout.leftClick = "hyprctl switchxkblayout keychron-keychron-k8-pro next";
launcher.autoDetectIcon = true;
network.label = false;
volume = {
scrollDown = "${pkgs.hyprpanel}/bin/hyprpanel 'vol -1'";
scrollUp = "${pkgs.hyprpanel}/bin/hyprpanel 'vol +1'";
};
workspaces = {
show_icons = false;
show_numbered = true;
};
};
# Configure bar layouts for monitors.
layout = {
"bar.layouts" = {
"*" = {
left = [
"dashboard"
"workspaces"
"windowtitle"
];
middle = [ "media" ];
right = [
"kbinput"
"volume"
"network"
"systray"
"clock"
"notifications"
];
};
};
};
menus = {
clock = {
time = {
military = true;
hideSeconds = true;
};
weather = {
unit = "metric";
location = "Bergen, Norway";
key = common.secret.weatherApiKey lib;
};
};
dashboard = {
directories.enabled = false;
powermenu.avatar.image = "${theme.avatar.image}";
shortcuts.left = {
shortcut1 = {
command = common.default.browser;
icon = ""; # TODO replace with Zen icon
tooltip = "Zen Browser";
};
shortcut2 = {
command = "spotify";
icon = "";
tooltip = "Spotify";
};
## shortcut3 === discord
## shortcut4 === rofi -show drun
};
stats.enable_gpu = true;
};
};
scalingPriority = "hyprland";
theme = {
bar.transparent = true;
font = {
name = "${theme.nerdFont} NF";
size = "16px";
};
};
wallpaper.enable = false;
};
};
}

View File

@ -0,0 +1,35 @@
# Wallpapers
{
pkgs,
common,
theme,
...
}:
{
home.packages = with pkgs; [ hyprpaper ];
services.hyprpaper = {
enable = true;
settings =
let
monitor1 = builtins.toString theme.wallpaper.monitor1;
monitor2 = builtins.toString theme.wallpaper.monitor2;
in
{
ipc = "on";
splash = false;
splash_offset = 2.0;
preload = [
monitor1
monitor2
];
wallpaper = [
"${common.monitor1},${monitor1}"
"${common.monitor2},${monitor2}"
];
};
};
}

View File

@ -0,0 +1,18 @@
{ common, ... }:
{
wayland.windowManager.hyprland.settings = {
"$mainMod" = "SUPER";
"$shiftMod" = "$mainMod SHIFT";
env = [
"HYPRSHOT_DIR,${common.dir.pictures}/screenshots" # Store screenshots here
];
bind = [
"$mainMod, PRINT, exec, hyprshot -m window" # Window
", PRINT, exec, hyprshot -m output" # Monitor
"$shiftMod, PRINT, exec, hyprshot -m region" # Region
];
};
}

View File

@ -0,0 +1,133 @@
{
lib,
common,
theme,
...
}:
let
app = common.default;
in
{
wayland.windowManager.hyprland.settings = {
monitor = [
"${common.monitor1}, 3440x1440@175, 0x0, 1"
"${common.monitor2}, 3840x2160@60, 3440x0, 1.5, transform, 1"
];
# Autostart
exec-once = [
app.browser
app.terminal
"systemctl --user start hyprpolkitagent"
];
env = [
"ELECTRON_OZONE_PLATFORM_HINT,auto" # Tell Electron apps to use Wayland
];
general = {
gaps_in = 5;
gaps_out = 20;
border_size = 2;
"col.active_border" = lib.mkDefault "${theme.mauveRgb} ${theme.tealRgb} 45deg";
"col.inactive_border" = lib.mkDefault "rgba(${theme.surface2Alpha}aa)";
resize_on_border = true;
allow_tearing = false;
layout = "dwindle";
};
decoration = {
rounding = 10;
# Change transparency of focused and unfocused windows
active_opacity = 1.0;
inactive_opacity = 1.0;
shadow = {
enabled = true;
range = 4;
render_power = 3;
color = lib.mkDefault theme.baseRgb;
};
blur = {
enabled = true;
size = 3;
passes = 1;
vibrancy = 0.1696;
};
};
animations = {
enabled = "yes, please :)";
bezier = [
"easeOutQuint,0.23,1,0.32,1"
"easeInOutCubic,0.65,0.05,0.36,1"
"linear,0,0,1,1"
"almostLinear,0.5,0.5,0.75,1.0"
"quick,0.15,0,0.1,1"
];
animation = [
"global, 1, 10, default"
"border, 1, 5.39, easeOutQuint"
"windows, 1, 4.79, easeOutQuint"
"windowsIn, 1, 4.1, easeOutQuint, popin 87%"
"windowsOut, 1, 1.49, linear, popin 87%"
"fadeIn, 1, 1.73, almostLinear"
"fadeOut, 1, 1.46, almostLinear"
"fade, 1, 3.03, quick"
"layers, 1, 3.81, easeOutQuint"
"layersIn, 1, 4, easeOutQuint, fade"
"layersOut, 1, 1.5, linear, fade"
"fadeLayersIn, 1, 1.79, almostLinear"
"fadeLayersOut, 1, 1.39, almostLinear"
"workspaces, 1, 1.94, almostLinear, fade"
"workspacesIn, 1, 1.21, almostLinear, fade"
"workspacesOut, 1, 1.94, almostLinear, fade"
];
};
dwindle = {
pseudotile = true; # Master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
preserve_split = true; # You probably want this
};
master.new_status = "master";
misc = {
force_default_wallpaper = 0;
disable_hyprland_logo = true;
};
debug.disable_logs = false;
input = {
kb_layout = common.keymaps.layout;
kb_options = common.keymaps.options;
follow_mouse = 1;
sensitivity = 0; # -1.0 - 1.0, 0 means no modification.
touchpad.natural_scroll = false;
};
gestures.workspace_swipe = false;
device = {
name = "logitech-g502-hero-gaming-mouse";
sensitivity = -0.10;
};
windowrulev2 = [
# Ignore maximize requests from apps
"suppressevent maximize, class:.*"
# Fix some dragging issues with XWayland
"nofocus,class:^$,title:^$,xwayland:1,floating:1,fullscreen:0,pinned:0"
# Avoid locking in fullscreen
"idleinhibit fullscreen, class:^(*)$"
"idleinhibit fullscreen, title:^(*)$"
"idleinhibit fullscreen, fullscreen:1"
];
};
}

View File

@ -0,0 +1,461 @@
{ lib, theme, ... }:
{
services.swaync = {
enable = false;
style = lib.mkDefault ''
* {
all: unset;
font-size: 14px;
font-family: "${theme.nerdFont} Nerd Font", monospace;
transition: 200ms;
}
trough highlight {
background: #${theme.textAlpha};
}
scale trough {
margin: 0 1rem;
background-color: #${theme.surface0Alpha};
min-height: 8px;
min-width: 70px;
}
slider {
background-color: #${theme.blueAlpha};
}
.floating-notifications.background .notification-row .notification-background {
box-shadow:
0 0 8px 0 rgba(0, 0, 0, 0.8),
inset 0 0 0 1px #${theme.surface0Alpha};
border-radius: 12.6px;
margin: 18px;
background-color: #${theme.baseAlpha};
color: #${theme.textAlpha};
padding: 0;
}
.floating-notifications.background
.notification-row
.notification-background
.notification {
padding: 7px;
border-radius: 12.6px;
}
.floating-notifications.background
.notification-row
.notification-background
.notification.critical {
box-shadow: inset 0 0 7px 0 #${theme.redAlpha};
}
.floating-notifications.background
.notification-row
.notification-background
.notification
.notification-content {
margin: 7px;
}
.floating-notifications.background
.notification-row
.notification-background
.notification
.notification-content
.summary {
color: #${theme.textAlpha};
}
.floating-notifications.background
.notification-row
.notification-background
.notification
.notification-content
.time {
color: #${theme.subtext0Alpha};
}
.floating-notifications.background
.notification-row
.notification-background
.notification
.notification-content
.body {
color: #${theme.textAlpha};
}
.floating-notifications.background
.notification-row
.notification-background
.notification
> *:last-child
> * {
min-height: 3.4em;
}
.floating-notifications.background
.notification-row
.notification-background
.notification
> *:last-child
> *
.notification-action {
border-radius: 7px;
color: #${theme.textAlpha};
background-color: #${theme.surface0Alpha};
box-shadow: inset 0 0 0 1px #${theme.surface1Alpha};
margin: 7px;
}
.floating-notifications.background
.notification-row
.notification-background
.notification
> *:last-child
> *
.notification-action:hover {
box-shadow: inset 0 0 0 1px #${theme.surface1Alpha};
background-color: #${theme.surface0Alpha};
color: #${theme.textAlpha};
}
.floating-notifications.background
.notification-row
.notification-background
.notification
> *:last-child
> *
.notification-action:active {
box-shadow: inset 0 0 0 1px #${theme.surface1Alpha};
background-color: #${theme.sapphireAlpha};
color: #${theme.textAlpha};
}
/* Close Button */
.floating-notifications.background
.notification-row
.notification-background
.close-button {
margin: 7px;
padding: 2px;
border-radius: 6.3px;
color: #${theme.baseAlpha};
background-color: #${theme.redAlpha};
}
.floating-notifications.background
.notification-row
.notification-background
.close-button:hover {
background-color: #${theme.maroonAlpha};
color: #${theme.baseAlpha};
}
.floating-notifications.background
.notification-row
.notification-background
.close-button:active {
background-color: #${theme.redAlpha};
color: #${theme.baseAlpha};
}
.control-center {
box-shadow:
0 0 8px 0 rgba(0, 0, 0, 0.8),
inset 0 0 0 1px #${theme.surface0Alpha};
border-radius: 12.6px;
margin: 18px;
background-color: #${theme.baseAlpha};
color: #${theme.textAlpha};
padding: 14px;
}
.control-center .widget-title > label {
color: #${theme.textAlpha};
font-size: 1.3em;
}
.control-center .widget-title button {
border-radius: 7px;
color: #${theme.textAlpha};
background-color: #${theme.surface0Alpha};
box-shadow: inset 0 0 0 1px #${theme.surface1Alpha};
padding: 8px;
}
.control-center .widget-title button:hover {
box-shadow: inset 0 0 0 1px #${theme.surface1Alpha};
background-color: #585b70;
color: #${theme.textAlpha};
}
.control-center .widget-title button:active {
box-shadow: inset 0 0 0 1px #${theme.surface1Alpha};
background-color: #${theme.sapphireAlpha};
color: #${theme.baseAlpha};
}
.control-center .notification-row .notification-background {
border-radius: 7px;
color: #${theme.textAlpha};
background-color: #${theme.surface0Alpha};
box-shadow: inset 0 0 0 1px #${theme.surface1Alpha};
margin-top: 14px;
}
.control-center .notification-row .notification-background .notification {
padding: 7px;
border-radius: 7px;
}
.control-center
.notification-row
.notification-background
.notification.critical {
box-shadow: inset 0 0 7px 0 #${theme.redAlpha};
}
.control-center
.notification-row
.notification-background
.notification
.notification-content {
margin: 7px;
}
.control-center
.notification-row
.notification-background
.notification
.notification-content
.summary {
color: #${theme.textAlpha};
}
.control-center
.notification-row
.notification-background
.notification
.notification-content
.time {
color: #a6adc8;
}
.control-center
.notification-row
.notification-background
.notification
.notification-content
.body {
color: #${theme.textAlpha};
}
.control-center
.notification-row
.notification-background
.notification
> *:last-child
> * {
min-height: 3.4em;
}
.control-center
.notification-row
.notification-background
.notification
> *:last-child
> *
.notification-action {
border-radius: 7px;
color: #${theme.textAlpha};
background-color: #${theme.crustAlpha};
box-shadow: inset 0 0 0 1px #${theme.surface1Alpha};
margin: 7px;
}
.control-center
.notification-row
.notification-background
.notification
> *:last-child
> *
.notification-action:hover {
box-shadow: inset 0 0 0 1px #${theme.surface1Alpha};
background-color: #${theme.surface0Alpha};
color: #${theme.textAlpha};
}
.control-center
.notification-row
.notification-background
.notification
> *:last-child
> *
.notification-action:active {
box-shadow: inset 0 0 0 1px #${theme.surface1Alpha};
background-color: #${theme.sapphireAlpha};
color: #${theme.textAlpha};
}
.control-center .notification-row .notification-background .close-button {
margin: 7px;
padding: 2px;
border-radius: 6.3px;
color: #${theme.baseAlpha};
background-color: #${theme.maroonAlpha};
}
.close-button {
border-radius: 6.3px;
}
.control-center .notification-row .notification-background .close-button:hover {
background-color: #${theme.redAlpha};
color: #${theme.baseAlpha};
}
.control-center
.notification-row
.notification-background
.close-button:active {
background-color: #${theme.redAlpha};
color: #${theme.baseAlpha};
}
.control-center .notification-row .notification-background:hover {
box-shadow: inset 0 0 0 1px #${theme.surface1Alpha};
background-color: #${theme.overlay1Alpha};
color: #${theme.textAlpha};
}
.control-center .notification-row .notification-background:active {
box-shadow: inset 0 0 0 1px #${theme.surface1Alpha};
background-color: #${theme.sapphireAlpha};
color: #${theme.textAlpha};
}
.notification.critical progress {
background-color: #${theme.redAlpha};
}
.notification.low progress,
.notification.normal progress {
background-color: #${theme.blueAlpha};
}
.control-center-dnd {
margin-top: 5px;
border-radius: 8px;
background: #${theme.surface0Alpha};
border: 1px solid #${theme.surface1Alpha};
box-shadow: none;
}
.control-center-dnd:checked {
background: #${theme.surface0Alpha};
}
.control-center-dnd slider {
background: #${theme.surface1Alpha};
border-radius: 8px;
}
.widget-dnd {
margin: 0px;
font-size: 1.1rem;
}
.widget-dnd > switch {
font-size: initial;
border-radius: 8px;
background: #${theme.surface0Alpha};
border: 1px solid #${theme.surface1Alpha};
box-shadow: none;
}
.widget-dnd > switch:checked {
background: #${theme.surface0Alpha};
}
.widget-dnd > switch slider {
background: #${theme.surface1Alpha};
border-radius: 8px;
border: 1px solid #${theme.overlay0Alpha};
}
.widget-mpris .widget-mpris-player {
background: #${theme.surface0Alpha};
padding: 7px;
}
.widget-mpris .widget-mpris-title {
font-size: 1.2rem;
}
.widget-mpris .widget-mpris-subtitle {
font-size: 0.8rem;
}
.widget-menubar > box > .menu-button-bar > button > label {
font-size: 3rem;
padding: 0.5rem 2rem;
}
.widget-menubar > box > .menu-button-bar > :last-child {
color: #${theme.redAlpha};
}
.power-buttons button:hover,
.powermode-buttons button:hover,
.screenshot-buttons button:hover {
background: #${theme.surface0Alpha};
}
.control-center .widget-label > label {
color: #${theme.textAlpha};
font-size: 2rem;
}
.widget-buttons-grid {
padding-top: 1rem;
}
.widget-buttons-grid > flowbox > flowboxchild > button label {
font-size: 2.5rem;
}
.widget-volume {
padding-top: 1rem;
}
.widget-volume label {
font-size: 1.5rem;
color: #${theme.sapphireAlpha};
}
.widget-volume trough highlight {
background: #${theme.sapphireAlpha};
}
.widget-backlight trough highlight {
background: #${theme.yellowAlpha};
}
.widget-backlight label {
font-size: 1.5rem;
color: #${theme.yellowAlpha};
}
.widget-backlight .KB {
padding-bottom: 1rem;
}
.image {
padding-right: 0.5rem;
}
'';
};
}

View File

@ -0,0 +1,108 @@
{
"layer": "top",
// Waybar at top layer
"position": "top",
// Waybar position (top|bottom|left|right)
// "width": 1280, // Waybar width
// Choose the order of the modules
"modules-left": ["hyprland/workspaces", "custom/music"],
"modules-center": ["hyprland/window"],
"modules-right": [
"hyprland/language",
"wireplumber",
"backlight",
"clock",
"custom/notification",
"tray",
"custom/lock",
"custom/power"
],
"hyprland/workspaces": {
"disable-scroll": false,
"sort-by-name": true,
"format": " {id} "
},
"hyprland/window": {
"format": "{initialTitle}"
},
"tray": {
"icon-size": 21,
"spacing": 10
},
// TODO better music module
"custom/music": {
"format": "󰓃 {}",
"escape": true,
"interval": 5,
"tooltip": false,
"exec": "playerctl metadata --format='{{ title }}'",
"on-click": "playerctl play-pause",
"max-length": 50
},
"clock": {
"timezone": "Europe/Oslo",
"tooltip-format": "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>",
"format": " {:%H:%M  %d/%m}",
"calendar": {
"mode": "month",
"weeks-pos": "left",
"format": {
"months": "<span color='#ffead3'><b>{}</b></span>",
"days": "<span color='#ecc6d9'><b>{}</b></span>",
"weeks": "<span color='#99ffdd'><b>W{}</b></span>",
"weekdays": "<span color='#ffcc66'><b>{}</b></span>",
"today": "<span color='#ff6699'><b><u>{}</u></b></span>"
}
}
},
"backlight": {
"device": "intel_backlight",
"format": "{icon}",
"format-icons": ["", "", "", "", "", "", "", "", ""]
},
"wireplumber": {
// "scroll-step": 1, // %, can be a float
"format": "{icon} {volume}%",
"format-muted": " ",
"format-icons": {
"default": ["", " ", " "]
},
"on-click": "pavucontrol"
},
"hyprland/language": {
"format-en": "EN",
"format-no": "NO",
"keyboard-name": "logitech-logitech-g710-keyboard",
"on-click": "hyprctl switchxkblayout logitech-logitech-g710-keyboard next"
},
"custom/lock": {
"tooltip": false,
"on-click": "sh -c '(sleep 0.5s; hyprlock)'",
"format": ""
},
"custom/power": {
"tooltip": false,
"on-click": "wlogout &",
"format": " "
},
"custom/notification": {
"tooltip": false,
"format": "{icon}",
"format-icons": {
"notification": "<span foreground='#f38ba8'><sup></sup></span>",
"none": "",
"dnd-notification": "<span foreground='#f38ba8'><sup></sup></span>",
"dnd-none": "",
"inhibited-notification": "<span foreground='#f38ba8'><sup></sup></span>",
"inhibited-none": "",
"dnd-inhibited-notification": "<span foreground='#f38ba8'><sup></sup></span>",
"dnd-inhibited-none": ""
},
"return-type": "json",
"exec-if": "which swaync-client",
"exec": "swaync-client -swb",
"on-click": "swaync-client -t -sw",
"on-click-right": "swaync-client -d -sw",
"escape": true
}
}

View File

@ -0,0 +1,37 @@
/*
*
* Catppuccin Mocha palette
* Maintainer: rubyowo
*
*/
@define-color base #1e1e2e;
@define-color mantle #181825;
@define-color crust #11111b;
@define-color text #cdd6f4;
@define-color subtext0 #a6adc8;
@define-color subtext1 #bac2de;
@define-color surface0 #313244;
@define-color surface1 #45475a;
@define-color surface2 #585b70;
@define-color overlay0 #6c7086;
@define-color overlay1 #7f849c;
@define-color overlay2 #9399b2;
@define-color blue #89b4fa;
@define-color lavender #b4befe;
@define-color sapphire #74c7ec;
@define-color sky #89dceb;
@define-color teal #94e2d5;
@define-color green #a6e3a1;
@define-color yellow #f9e2af;
@define-color peach #fab387;
@define-color maroon #eba0ac;
@define-color red #f38ba8;
@define-color mauve #cba6f7;
@define-color pink #f5c2e7;
@define-color flamingo #f2cdcd;
@define-color rosewater #f5e0dc;

View File

@ -0,0 +1,104 @@
@import "mocha.css";
* {
font-family: JetBrainsMono Nerd Font;
font-size: 15px;
min-height: 0;
}
#waybar {
background: transparent;
color: @text;
margin: 5px 5px;
}
#workspaces {
border-radius: 1rem;
background-color: @surface0;
margin: 5px 5px 5px 1rem;
}
#workspaces button {
color: @lavender;
border-radius: 1rem;
padding: 0.4rem;
}
#workspaces button.active {
color: @sky;
border-radius: 1rem;
}
#workspaces button:hover {
color: @sapphire;
border-radius: 1rem;
}
#language,
#window,
#custom-notification,
#custom-music,
#tray,
#backlight,
#clock,
#wireplumber,
#custom-lock,
#custom-power {
background-color: @surface0;
padding: 0.5rem 1rem;
margin: 5px 0;
}
#clock {
color: @blue;
}
#backlight {
color: @yellow;
}
#backlight {
border-radius: 0;
}
#language {
color: @red;
border-radius: 1rem 0 0 1rem;
margin-left: 1rem;
}
#wireplumber {
color: @maroon;
}
#custom-music {
color: @mauve;
border-radius: 1rem;
}
#window {
color: @mauve;
border-radius: 1rem;
}
#custom-lock {
border-radius: 1rem 0 0 1rem;
color: @lavender;
}
#custom-power {
margin-right: 1rem;
border-radius: 0 1rem 1rem 0;
color: @red;
}
#custom-notification {
margin-right: 1rem;
border-radius: 0 1rem 1rem 0;
color: @sapphire;
}
#tray {
margin-right: 1rem;
border-radius: 1rem;
}

View File

@ -0,0 +1,6 @@
{
home.file.".config/waybar" = {
source = ./config;
recursive = true;
};
}