about summary refs log tree commit diff
path: root/users/tazjin/dotfiles
diff options
context:
space:
mode:
Diffstat (limited to 'users/tazjin/dotfiles')
-rw-r--r--users/tazjin/dotfiles/.skip-subtree1
-rw-r--r--users/tazjin/dotfiles/default.nix22
-rw-r--r--users/tazjin/dotfiles/dunstrc65
-rw-r--r--users/tazjin/dotfiles/fuzzel.ini17
-rw-r--r--users/tazjin/dotfiles/niri.config.kdl137
-rw-r--r--users/tazjin/dotfiles/waybar/config.nix64
-rw-r--r--users/tazjin/dotfiles/waybar/style.css254
7 files changed, 507 insertions, 53 deletions
diff --git a/users/tazjin/dotfiles/.skip-subtree b/users/tazjin/dotfiles/.skip-subtree
new file mode 100644
index 000000000000..954981f436ee
--- /dev/null
+++ b/users/tazjin/dotfiles/.skip-subtree
@@ -0,0 +1 @@
+Stuff below here is managed manually, without readTree.
diff --git a/users/tazjin/dotfiles/default.nix b/users/tazjin/dotfiles/default.nix
index 9b783a9c857c..6291a10303e7 100644
--- a/users/tazjin/dotfiles/default.nix
+++ b/users/tazjin/dotfiles/default.nix
@@ -1,3 +1,23 @@
-_: {
+{ depot, pkgs, ... }@args:
+
+rec {
   dunstrc = ./dunstrc;
+  niri = ./niri.config.kdl;
+  fuzzel = ./fuzzel.ini;
+  waybar = {
+    config = import ./waybar/config.nix args;
+    style = pkgs.runCommandNoCC "waybar-style.css"
+      {
+        CHICAGO95 = depot.third_party.chicago95;
+      } ''
+      cat ${./waybar/style.css} | ${pkgs.envsubst}/bin/envsubst > $out
+    '';
+  };
+
+  # Helper derivation for iterating on waybar config.
+  waybarTest = pkgs.runCommandNoCC "waybar-conf" { } ''
+    mkdir -p $out
+    cat ${pkgs.writeText "waybar-conf.json" (builtins.toJSON(builtins.attrValues waybar.config))} > $out/config
+    cp ${waybar.style} $out/style.css
+  '';
 }
diff --git a/users/tazjin/dotfiles/dunstrc b/users/tazjin/dotfiles/dunstrc
index 2aa1141b6ec2..d984ff94ecaa 100644
--- a/users/tazjin/dotfiles/dunstrc
+++ b/users/tazjin/dotfiles/dunstrc
@@ -1,54 +1,15 @@
 [global]
-font = Iosevka Term 11
-origin = top-left
-markup = yes
-plain_text = no
-format = "<b>%s</b>\n%b"
-sort = no
-indicate_hidden = yes
-alignment = center
-bounce_freq = 0
-show_age_threshold = -1
-word_wrap = yes
-ignore_newline = no
-stack_duplicates = yes
-hide_duplicate_count = yes
-geometry = "300x50-15+49"
-shrink = no
-transparency = 5
-idle_threshold = 0
-monitor = 0
+origin = bottom-right
+offset = 5x5 # takes into account menu bar!
+corner_radius = 5
+frame_width = 1
+frame_color = "#000000"
+foreground = "#000000"
+background = "#ffffe1"
+font = Arial 12
 follow = keyboard
-sticky_history = yes
-history_length = 15
-show_indicators = no
-line_height = 3
-separator_height = 2
-padding = 6
-horizontal_padding = 6
-separator_color = frame
-startup_notification = false
-dmenu = /usr/bin/dmenu -p dunst:
-browser = /usr/bin/firefox -new-tab
-icon_position = off
-max_icon_size = 80
-frame_width = 3
-frame_color = "#8EC07C"
-
-[urgency_low]
-frame_color = "#3B7C87"
-foreground = "#3B7C87"
-background = "#191311"
-timeout = 4
-
-[urgency_normal]
-frame_color = "#5B8234"
-foreground = "#5B8234"
-background = "#191311"
-timeout = 6
-
-[urgency_critical]
-frame_color = "#B7472A"
-foreground = "#B7472A"
-background = "#191311"
-timeout = 8
+vertical_alignment = top
+format = "<b>%s</b>\n<i>from %a</i>\n\n%b"
+icon_theme = "Chicago95-tux"
+enable_recursive_icon_lookup = true
+icon_position = left
diff --git a/users/tazjin/dotfiles/fuzzel.ini b/users/tazjin/dotfiles/fuzzel.ini
new file mode 100644
index 000000000000..92d46c0b6d88
--- /dev/null
+++ b/users/tazjin/dotfiles/fuzzel.ini
@@ -0,0 +1,17 @@
+[main]
+font=Arial
+
+[colors]
+background=c0c0c0ff
+text=000000ff
+input=000000ff
+prompt=000000ff
+match=808080ff
+selection=000080ff
+selection-match=ffffffff
+selection-text=ffffffff
+border=080808ff
+
+[border]
+width=2
+radius=5
diff --git a/users/tazjin/dotfiles/niri.config.kdl b/users/tazjin/dotfiles/niri.config.kdl
new file mode 100644
index 000000000000..8873404f7ec4
--- /dev/null
+++ b/users/tazjin/dotfiles/niri.config.kdl
@@ -0,0 +1,137 @@
+// https://github.com/YaLTeR/niri/wiki/Configuration:-Overview
+
+input {
+    keyboard {
+        xkb {
+            layout "us,ru"
+            variant "hyper"
+            options "grp:win_space_toggle,compose:ralt,caps:hyper"
+        }
+    }
+
+    touchpad {
+        tap
+    }
+
+    trackball {
+        left-handed
+    }
+}
+
+layout {
+    gaps 12
+    center-focused-column "never"
+
+    preset-column-widths {
+        proportion 0.33333
+        proportion 0.5
+        proportion 0.66667
+    }
+
+    default-column-width {}
+
+    focus-ring {
+        off
+    }
+
+    border {
+        off
+    }
+}
+
+spawn-at-startup "xwayland-satellite"
+spawn-at-startup "xrandr --output eDP-1 --primary"
+spawn-at-startup "wpaperd" "-d"
+spawn-at-startup "systemctl --user start xss-lock"
+
+environment {
+  QT_QPA_PLATFORM "wayland"
+  DISPLAY ":0"
+  EDITOR "emacsclient"
+}
+
+hotkey-overlay {
+  skip-at-startup
+}
+
+screenshot-path "~/screenshots/screenshot-%Y-%m-%d_%H-%M-%S.png"
+
+animations {
+    slowdown 0.3
+}
+
+binds {
+    Mod+Shift+Slash { show-hotkey-overlay; }
+
+    Mod+T { spawn "emacsclient" "--no-wait" "--create-frame" "--eval" "(vterm)"; }
+    Mod+Shift+T { spawn "alacritty"; } // fallback terminal
+    Mod+D { spawn "xfce4-appfinder" "--disable-server"; }
+    Super+Alt+L { spawn "swaylock" "-fFkl" "-c" "#008080"; }
+    Super+B { spawn "emacsclient" "-e" "(niri-go-anywhere-external)"; }
+
+    // Volume control
+    XF86AudioRaiseVolume allow-when-locked=true { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1+"; }
+    XF86AudioLowerVolume allow-when-locked=true { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1-"; }
+    XF86AudioMute        allow-when-locked=true { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SINK@" "toggle"; }
+    XF86AudioMicMute     allow-when-locked=true { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SOURCE@" "toggle"; }
+
+    // Brightness control
+    XF86MonBrightnessUp allow-when-locked=true { spawn "light" "-A" "5"; }
+    Shift+XF86MonBrightnessUp allow-when-locked=true { spawn "light" "-A" "1"; }
+    XF86MonBrightnessDown allow-when-locked=true { spawn "light" "-U" "5"; }
+    Shift+XF86MonBrightnessDown allow-when-locked=true { spawn "light" "-U" "1"; }
+
+    Mod+Q { close-window; }
+
+    Mod+Left      { focus-column-or-monitor-left; }
+    Mod+Right     { focus-column-or-monitor-right; }
+    Mod+Down      { focus-column-or-monitor-right; }
+    Mod+Up        { focus-column-or-monitor-left; }
+    Mod+J         { focus-column-or-monitor-left; }
+    Mod+K         { focus-column-or-monitor-right; }
+    Mod+L         { focus-window-up; }
+    Mod+Semicolon { focus-window-down; }
+
+    Mod+Ctrl+Left  { move-column-left-or-to-monitor-left; }
+    Mod+Ctrl+Right { move-column-right-or-to-monitor-right; }
+    Mod+Ctrl+J     { move-column-left-or-to-monitor-left; }
+    Mod+Ctrl+K     { move-column-right-or-to-monitor-right; }
+
+    Mod+Home { focus-column-first; }
+    Mod+End  { focus-column-last; }
+
+    Mod+Ctrl+Home { move-column-to-first; }
+    Mod+Ctrl+End  { move-column-to-last; }
+
+    // Scroll (or move windows) between columns when holding the modifier down.
+    Mod+WheelScrollDown      cooldown-ms=150 { focus-column-or-monitor-right; }
+    Mod+WheelScrollUp        cooldown-ms=150 { focus-column-or-monitor-left; }
+    Mod+Ctrl+WheelScrollDown cooldown-ms=150 { move-column-right-or-to-monitor-right; }
+    Mod+Ctrl+WheelScrollUp   cooldown-ms=150 { move-column-left-or-to-monitor-left; }
+
+    Mod+Comma  { consume-window-into-column; }
+    Mod+Period { expel-window-from-column; }
+
+    // There are also commands that consume or expel a single window to the side.
+    // Mod+BracketLeft  { consume-or-expel-window-left; }
+    // Mod+BracketRight { consume-or-expel-window-right; }
+
+    Mod+R { switch-preset-column-width; }
+    Mod+Shift+R { reset-window-height; }
+    Mod+F { maximize-column; }
+    Mod+Shift+F { fullscreen-window; }
+    Mod+C { center-column; }
+
+    Mod+Minus { set-column-width "-10%"; }
+    Mod+Equal { set-column-width "+10%"; }
+
+    // Finer height adjustments when in column with other windows.
+    Mod+Shift+Minus { set-window-height "-2%"; }
+    Mod+Shift+Equal { set-window-height "+2%"; }
+
+    Print { screenshot; }
+    Ctrl+Print { screenshot-screen; }
+    Alt+Print { screenshot-window; }
+
+    Mod+Shift+E { quit; }
+}
diff --git a/users/tazjin/dotfiles/waybar/config.nix b/users/tazjin/dotfiles/waybar/config.nix
new file mode 100644
index 000000000000..ba5281f02e07
--- /dev/null
+++ b/users/tazjin/dotfiles/waybar/config.nix
@@ -0,0 +1,64 @@
+{ depot, pkgs, ... }:
+
+let
+  launcher = "${pkgs.xfce4-appfinder}/bin/xfce4-appfinder --disable-server";
+in
+{
+  mainBar = {
+    layer = "top";
+    position = "bottom";
+    modules-left = [ "custom/start" "wlr/taskbar" ];
+
+    "custom/start" = {
+      format = " Start";
+      on-click = "xfce4-appfinder --disable-server";
+    };
+
+    modules-right = [ "tray" "backlight" "battery" "pulseaudio" "clock" ];
+
+    pulseaudio = {
+      on-click = "pavucontrol";
+      format = " "; #styling only
+      states = {
+        low = 1;
+        medium = 40;
+        high = 75;
+      };
+    };
+
+    battery = {
+      format = " "; # styling only
+      interval = 10;
+      states = {
+        full = 100;
+        good = 85;
+        medium = 60;
+        low = 40;
+        warning = 20;
+        critical = 10;
+      };
+    };
+
+    backlight = {
+      format = "{percent}%"; # styling only
+      on-scroll-up = "light -A 1";
+      on-scroll-down = "light -U 1";
+    };
+
+    clock.format-alt = "{:%a, %d. %b  %H:%M}";
+
+    tray = {
+      icon-size = 20;
+      spacing = 10;
+    };
+
+    "wlr/taskbar" = {
+      format = "{icon} {title}";
+      on-click = "activate";
+      rewrite = {
+        # Truncate any format over 16 characters.
+        "^(.{16}).+$" = "$1…";
+      };
+    };
+  };
+}
diff --git a/users/tazjin/dotfiles/waybar/style.css b/users/tazjin/dotfiles/waybar/style.css
new file mode 100644
index 000000000000..52f5759cc796
--- /dev/null
+++ b/users/tazjin/dotfiles/waybar/style.css
@@ -0,0 +1,254 @@
+* {
+    /* `otf-font-awesome` is required to be installed for icons */
+    font-family: FontAwesome, MS Sans Serif;
+    font-size: 14px;
+}
+
+window#waybar {
+    background-color: #c0c0c0;
+    border-top: 0.1875em solid #dfdfdf;
+    color: #000000;
+    transition-property: background-color;
+    transition-duration: .5s;
+}
+
+window#waybar.hidden {
+    opacity: 0.2;
+}
+
+window#waybar.termite {
+    background-color: #3F3F3F;
+}
+
+window#waybar.chromium {
+    background-color: #000000;
+    border: none;
+}
+
+button {
+    /* Use box-shadow instead of border so the text isn't offset */
+    box-shadow: inset 0 -0.1875em transparent;
+    /* Avoid rounded borders under each button name */
+    border: none;
+    border-radius: 0;
+}
+
+/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */
+button:hover {
+    background: inherit;
+    box-shadow: inset 0 -0.1875em #ffffff;
+}
+
+#mode {
+    background-color: #64727D;
+    box-shadow: inset 0 -0.1875em #ffffff;
+}
+
+#clock,
+#battery,
+#cpu,
+#memory,
+#disk,
+#temperature,
+#backlight,
+#network,
+#pulseaudio,
+#wireplumber,
+#custom-media,
+#tray,
+#mode,
+#idle_inhibitor,
+#scratchpad,
+#power-profiles-daemon,
+#mpd {
+    padding: 0 0.3125em;
+    padding-top: 0em;
+    padding-bottom: 0em;
+    /* color: #ffffff; */
+}
+
+#window,
+#workspaces {
+    margin: 0 0.25em;
+}
+
+/* faithful-ish recreation of the old Windows start button ... */
+#custom-start {
+    /* general positioning to keep the spacing approximately correct */
+    color: @button_text_color;
+    font-weight: bold;
+    margin: 0.2em;
+    margin-top: 0.35em;
+    padding: 0.2em;
+    padding-left: 1.25em;
+
+    /* raised button look, as per the Chicago95 GTK button style */
+    border: 0.1em solid;
+    border-radius: 0em;
+    color: @button_text_color;
+    outline-color: @outline_color;
+    border-top-color: @border_bright;
+    border-right-color: @border_dark;
+    border-left-color: @border_bright;
+    border-bottom-color: @border_dark;
+    background-color: @button_bg_color;
+    box-shadow: inset -0.1em -0.1em @border_shade, inset 0.1em 0.1em @border_light;
+
+    /* the actual image! */
+    background-image: url("${CHICAGO95}/share/icons/Chicago95/categories/scalable/xfdesktop-menu.svg");
+    background-position: 0.15em center;
+    background-repeat: no-repeat;
+    background-size: 1.4em;
+}
+
+.modules-right {
+    margin: 0.2em;
+    margin-top: 0.35em;
+}
+
+#clock {
+    border-top: 0.1em solid gray;
+    border-left: 0.1em solid gray;
+    border-right: 0.1em solid white;
+    border-bottom: 0.1em solid white;
+}
+
+/* base setup for classes that have a Chicago95 icon as the display */
+#battery, #pulseaudio, #backlight {
+    background-position: center;
+    background-repeat: no-repeat;
+    background-size: 24px;
+    min-width: 24px;
+    color: transparent; /* because the tooltips are still desirable */
+}
+
+#backlight {
+    background-image: url("${CHICAGO95}/share/icons/Chicago95/status/32/xfpm-brightness-lcd.png");
+    font-size: 0px;
+}
+
+/* battery levels matching Chicago95 icons */
+
+#battery.charging.critical {
+    background-image: url("${CHICAGO95}/share/icons/Chicago95/status/48/battery-000-charging.png");
+}
+
+#battery.charging.warning {
+    background-image: url("${CHICAGO95}/share/icons/Chicago95/status/48/battery-020-charging.png");
+}
+
+#battery.charging.low {
+    background-image: url("${CHICAGO95}/share/icons/Chicago95/status/48/battery-040-charging.png");
+}
+
+#battery.charging.medium {
+    background-image: url("${CHICAGO95}/share/icons/Chicago95/status/48/battery-060-charging.png");
+}
+
+#battery.charging.good {
+    background-image: url("${CHICAGO95}/share/icons/Chicago95/status/48/battery-080-charging.png");
+}
+
+#battery.charging.full {
+    background-image: url("${CHICAGO95}/share/icons/Chicago95/status/48/battery-100-charging.png");
+}
+
+#battery.critical {
+    background-image: url("${CHICAGO95}/share/icons/Chicago95/status/48/battery-000.png");
+}
+
+#battery.warning {
+    background-image: url("${CHICAGO95}/share/icons/Chicago95/status/48/battery-020.png");
+}
+
+#battery.low {
+    background-image: url("${CHICAGO95}/share/icons/Chicago95/status/48/battery-040.png");
+}
+
+#battery.medium {
+    background-image: url("${CHICAGO95}/share/icons/Chicago95/status/48/battery-060.png");
+}
+
+#battery.good {
+    background-image: url("${CHICAGO95}/share/icons/Chicago95/status/48/battery-080.png");
+}
+
+#battery.full {
+    background-image: url("${CHICAGO95}/share/icons/Chicago95/status/48/battery-100.png");
+}
+
+/* volume levels matching Chicago95 icons */
+
+#pulseaudio.muted {
+    background-image: url("${CHICAGO95}/share/icons/Chicago95/status/32/audio-volume-muted.png");
+}
+
+#pulseaudio.low {
+    background-image: url("${CHICAGO95}/share/icons/Chicago95/status/32/audio-volume-low.png");
+}
+
+#pulseaudio.medium {
+    background-image: url("${CHICAGO95}/share/icons/Chicago95/status/32/audio-volume-medium.png");
+}
+
+#pulseaudio { /* default, if no lower volume state is set */
+    background-image: url("${CHICAGO95}/share/icons/Chicago95/status/32/audio-volume-high.png");
+}
+
+@keyframes blink {
+    to {
+        background-color: #ffffff;
+        color: #000000;
+    }
+}
+
+label:focus {
+    background-color: #000000;
+}
+
+#tray > .passive {
+    -gtk-icon-effect: dim;
+}
+
+#tray > .needs-attention {
+    -gtk-icon-effect: highlight;
+    background-color: #e35f5f;
+}
+
+#idle_inhibitor {
+    background-color: #2d3436;
+}
+
+#idle_inhibitor.activated {
+    background-color: #ecf0f1;
+    color: #2d3436;
+}
+
+#taskbar {
+    color: @button_text_color;
+    margin: 0.2em;
+    margin-top: 0.35em;
+}
+
+#taskbar button {
+    padding: 0.2em;
+    margin-right: 0.3em;
+    border: 0.1em solid;
+    border-radius: 0em;
+    color: @button_text_color;
+    outline-color: @outline_color;
+    border-top-color: @border_bright;
+    border-right-color: @border_dark;
+    border-left-color: @border_bright;
+    border-bottom-color: @border_dark;
+    background-color: @button_bg_color;
+    box-shadow: inset -0.1em -0.1em @border_shade, inset 0.1em 0.1em @border_light;
+}
+
+#taskbar button.active {
+    border-top-color: @border_dark;
+    border-right-color: @border_bright;
+    border-left-color: @border_dark;
+    border-bottom-color: @border_bright;
+    box-shadow: inset 1px 1px @border_shade;
+}