diff --git a/home/modules/gui/default.nix b/home/modules/gui/default.nix index 8e19063..2839075 100644 --- a/home/modules/gui/default.nix +++ b/home/modules/gui/default.nix @@ -52,7 +52,6 @@ in { ./theme.nix ./sway.nix ./waybar.nix - ./wofi.nix ]; config = mkIf cfg.enable { diff --git a/home/modules/gui/sway.nix b/home/modules/gui/sway.nix index 61486f4..eeb51c6 100644 --- a/home/modules/gui/sway.nix +++ b/home/modules/gui/sway.nix @@ -8,10 +8,16 @@ with lib; let cfg = config.local.gui; in { config = mkIf cfg.enable { - home.packages = [ - pkgs.wlr-randr + home.packages = with pkgs; [ + wlr-randr + bemenu ]; + home.sessionVariables = { + "BEMENU_BACKEND" = "wayland"; + "BEMENU_RENDERER" = "bemenu-wlroots"; + }; + services = { swayidle = { enable = true; @@ -43,7 +49,11 @@ in { cfg.monitors; modifier = "Mod4"; - focus.followMouse = true; + + focus = { + followMouse = true; + wrapping = "workspace"; + }; input = { "*" = { @@ -59,8 +69,10 @@ in { }; gaps = { - inner = 10; + inner = 8; outer = -10; + smartBorders = "on"; + smartGaps = true; }; bars = singleton { @@ -71,33 +83,70 @@ in { window = { hideEdgeBorders = "both"; titlebar = false; + border = 2; }; + floating = { + border = 0; + titlebar = false; + }; + + menu = "bemenu-run"; + workspaceLayout = "tabbed"; colors = { + background = "#141414"; focused = { - background = "#222222"; - border = "#4c7899"; - childBorder = "#222222"; - indicator = "#292d2e"; - text = "#888888"; + border = "#1c1c1c"; + background = "#000000"; + text = "#eaeaea"; + indicator = "#000000"; + childBorder = "#000000"; + }; + focusedInactive = { + border = "#000000"; + background = "#000000"; + text = "#eaeaea"; + indicator = "#000000"; + childBorder = "#000000"; + }; + unfocused = { + border = "#000000"; + background = "#000000"; + text = "#eaeaea"; + indicator = "#000000"; + childBorder = "#000000"; + }; + urgent = { + border = "#ff6666"; + background = "#ff6666"; + text = "#eaeaea"; + indicator = "#ff6666"; + childBorder = "#ff6666"; + }; + placeholder = { + border = "#000000"; + background = "#000000"; + text = "#eaeaea"; + indicator = "#000000"; + childBorder = "#000000"; }; }; keybindings = let mod = config.wayland.windowManager.sway.config.modifier; - wofi = config.programs.wofi.package; - grimshot = getExe pkgs.sway-contrib.grimshot; + bemenuCommand = ''bemenu-run --center --width-factor 0.2 --fixed-height --list 10 --scrollbar none --auto-select --accept-single --fn "JetBrains Mono 12" --prompt "" --tb "#000000" --tf "#EAEAEA" --fb "#000000" --ff "#EAEAEA" --cb "#EAEAEA" --cf "#000000" --nb "#000000" --nf "#EAEAEA" --sb "#000000" --sf "#EAEAEA" --hb "#000000" --hf "#EAEAEA" --fbb "#000000" --fbf "#000000" --ab "#000000" --af "#EAEAEA"''; in mkOptionDefault { "${mod}+a" = "focus parent"; "${mod}+c" = "focus child"; - "${mod}+d" = "exec --no-startup-id ${getExe wofi} -S run"; + "${mod}+d" = "exec ${bemenuCommand}"; "${mod}+l" = "exec ${getExe pkgs.gtklock} -d"; "${mod}+Return" = "exec ${lib.getExe pkgs.kitty} ${lib.getExe pkgs.tmux}"; "${mod}+Shift+s" = "exec ${grimshot} copy area"; + "${mod}+Shift+a" = "exec ${grimshot} copy active"; "${mod}+Tab" = "focus right"; "${mod}+Shift+Tab" = "focus left"; "${mod}+Shift+w" = "move workspace to output right"; @@ -135,7 +184,6 @@ in { swaynag.enable = true; systemd.enable = true; - xwayland = true; }; }; diff --git a/home/modules/gui/waybar.nix b/home/modules/gui/waybar.nix index 2369ebe..03a5b05 100644 --- a/home/modules/gui/waybar.nix +++ b/home/modules/gui/waybar.nix @@ -26,8 +26,11 @@ in { ]; modules-right = [ + "privacy" "cpu" "memory" + "disk" + "temperature" "keyboard-state" "tray" ]; @@ -42,8 +45,6 @@ in { "clock" = { interval = 60; format = "{:%A %B %d %Y %H:%M}"; - tooltip = true; - tooltip-format = "{}"; }; "cpu" = { format = "cpu {usage}%"; @@ -54,6 +55,14 @@ in { tooltip = true; tooltip-format = "{used}/{total}"; }; + "disk" = { + format = "disk {specific_used:0.0f}/{specific_total:0.0f}"; + unit = "GiB"; + tooltip = false; + }; + "privacy" = { + icon-size = 12; + }; }; }; style = '' @@ -86,8 +95,8 @@ in { .modules-left > widget:not(:first-child), .modules-center > widget:not(:first-child), .modules-right > widget:not(:first-child) { - margin-left: 8px; - padding-left: 8px; + margin-left: 12px; + padding-left: 12px; border-left: 1px solid rgba(255, 255, 255, 0.08); } diff --git a/home/modules/gui/wofi.nix b/home/modules/gui/wofi.nix deleted file mode 100644 index 2eb56c7..0000000 --- a/home/modules/gui/wofi.nix +++ /dev/null @@ -1,74 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: -with lib; let - cfg = config.local.gui; -in { - config = mkIf cfg.enable { - programs = { - wofi = { - enable = true; - settings = { - prompt = ""; - width = "25%"; - height = "30%"; - }; - style = '' - window { - background-color: rgb(0, 0, 0); - color: #eaeaea; - font-family: monospace; - font-size: 12px; - border: none; - border-radius: 0; - padding: 0; - width: 50%; /* half screen width */ - } - - /* Search input */ - #input { - background-color: rgba(0, 0, 0, 0.5); - color: #ffffff; - padding: 4px 6px; - border: none; - border-radius: 0; - margin: 0; - } - - /* Results list container */ - #inner-box { - background-color: transparent; - margin: 0; - padding: 0; - } - - /* Entries */ - #entry { - padding: 2px 6px; - margin: 0; - border-radius: 0; - background-color: transparent; - color: #cccccc; - } - - /* Text inside entries */ - #text { - padding: 0; - margin: 0; - } - - /* Scrollbar */ - scrollbar { - background: transparent; - } - scrollbar slider { - background: rgba(255, 255, 255, 0.15); - } - ''; - }; - }; - }; -} diff --git a/home/modules/terminal/default.nix b/home/modules/terminal/default.nix index bc15305..adc9b93 100644 --- a/home/modules/terminal/default.nix +++ b/home/modules/terminal/default.nix @@ -22,14 +22,27 @@ in { escapeTime = 10; terminal = "xterm-256color"; keyMode = "emacs"; + mouse = true; extraConfig = '' - set -g mouse on set -ga update-environment " LIFT_PID" set -g set-titles on set -g renumber-windows on set -sa terminal-overrides ',xterm-termite:RGB' - set -g status-right "#{?window_bigger,[#{window_offset_x}#,#{window_offset_y}] ,} %H:%M %d-%b-%y" + + set -g status-style bg=default,fg=colour250 + set -g pane-border-style fg=colour236 + set -g pane-active-border-style fg=colour240 + set -g window-status-format " #I:#W " + set -g window-status-style bg=default,fg=colour244 + set -g window-status-current-format " #I:#W " + set -g window-status-current-style bg=colour236,fg=white,bold + set -g status-position bottom + set -g status-left-length 20 + set -g status-right-length 60 + set -g status-left "" + set -g window-status-separator "" + set -g status-justify left ''; }; }; diff --git a/sys/modules/default.nix b/sys/modules/default.nix index 602c965..00f03d1 100644 --- a/sys/modules/default.nix +++ b/sys/modules/default.nix @@ -15,6 +15,7 @@ ./bluetooth.nix ./net.nix ./steam.nix + ./gtklock.nix ]; fonts.packages = with pkgs; [ diff --git a/sys/modules/gtklock.nix b/sys/modules/gtklock.nix new file mode 100644 index 0000000..1450704 --- /dev/null +++ b/sys/modules/gtklock.nix @@ -0,0 +1,84 @@ +{ + config, + lib, + pkgs, + ... +}: +with lib; let + cfg = config.local.sys.gtklock; +in { + options.local.sys.gtklock = { + enable = mkEnableOption "gtklock settings"; + }; + config = mkIf cfg.enable { + programs.gtklock = { + enable = true; + config = { + main = { + idle-hide = true; + idle-timeout = 1; + time-format = "%H:%M:%S"; + start-hidden = true; + }; + }; + style = '' + /* Main lockscreen window */ + window { + background-color: rgba(20, 20, 20, 0.9); /* dark, slightly translucent */ + color: #eaeaea; + font-family: "JetBrains Mono", monospace; + font-size: 14px; + } + + /* Container for clock + prompt */ + #main-box { + background: transparent; + border: none; + border-radius: 0; + padding: 0; + margin: 0; + } + + /* Clock text */ + #clock { + font-size: 32px; + font-weight: bold; + color: #ffffff; + margin-bottom: 12px; + } + + /* Date text */ + #date { + font-size: 14px; + color: #aaaaaa; + margin-bottom: 24px; + } + + /* Password entry */ + entry { + background-color: rgba(0, 0, 0, 0.5); + color: #ffffff; + border: none; + border-radius: 0; + padding: 6px 8px; + font-family: "JetBrains Mono", monospace; + font-size: 12px; + } + + /* Hide any extra icons in the entry */ + entry image { + opacity: 0; + width: 0; + height: 0; + } + + /* Wrong password feedback */ + #auth-failure { + color: #ff6666; + font-size: 12px; + margin-top: 6px; + } + ''; + }; + }; +} diff --git a/sys/platforms/posixlycorrect/default.nix b/sys/platforms/posixlycorrect/default.nix index 853d2ab..09ad159 100644 --- a/sys/platforms/posixlycorrect/default.nix +++ b/sys/platforms/posixlycorrect/default.nix @@ -20,6 +20,7 @@ virtualisation.enable = true; androidSupport.enable = true; steam.enable = true; + gtklock.enable = true; users = { fabian = {