summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaghuram Subramani <raghus2247@gmail.com>2024-02-02 15:55:42 +0530
committerRaghuram Subramani <raghus2247@gmail.com>2024-02-02 15:55:42 +0530
commit5055c72d26569d352b0273cd79544ece594763b2 (patch)
treecc2b5744e67e9a8e9c4294d3a3e0a1769a61d83f
parent4803f1aac7f36c45c392b50869cd91d097e413c9 (diff)
remove dwlb
-rw-r--r--config/dunst/default.nix6
-rw-r--r--config/dunst/dunstrc63
-rw-r--r--config/dwl.nix4
-rw-r--r--config/way-displays/cfg.yaml53
-rw-r--r--config/way-displays/default.nix6
-rw-r--r--config/waybar/config41
-rw-r--r--config/waybar/default.nix7
-rw-r--r--config/waybar/style.css110
-rw-r--r--machines/x/home.nix5
-rw-r--r--modules/compromyse.nix2
-rw-r--r--modules/desktop.nix6
-rw-r--r--modules/login.nix2
-rw-r--r--packages/dwl.nix (renamed from packages/dwl-custom.nix)2
13 files changed, 300 insertions, 7 deletions
diff --git a/config/dunst/default.nix b/config/dunst/default.nix
new file mode 100644
index 0000000..f196ba2
--- /dev/null
+++ b/config/dunst/default.nix
@@ -0,0 +1,6 @@
+{ pkgs, config, ... }:
+
+{
+ home.packages = [ pkgs.dunst ];
+ home.file.".config/dunst/dunstrc".source = ./dunstrc;
+}
diff --git a/config/dunst/dunstrc b/config/dunst/dunstrc
new file mode 100644
index 0000000..902ba1c
--- /dev/null
+++ b/config/dunst/dunstrc
@@ -0,0 +1,63 @@
+[global]
+ monitor = 1
+ follow = none
+ indicate_hidden = yes
+ shrink = no
+ transparency = 0
+ separator_height = 2
+ padding = 8
+ horizontal_padding = 8
+ frame_width = 3
+ frame_color = "#aaaaaa"
+ separator_color = frame
+ sort = yes
+ idle_threshold = 120
+ font = Monospace 8
+ line_height = 0
+ markup = full
+ format = "<b>%s</b>\n%b"
+ alignment = left
+ vertical_alignment = center
+ show_age_threshold = 60
+ word_wrap = yes
+ ellipsize = middle
+ ignore_newline = no
+ stack_duplicates = true
+ hide_duplicate_count = false
+ show_indicators = yes
+ icon_position = left
+ min_icon_size = 0
+ max_icon_size = 32
+ icon_path = /usr/share/icons/gnome/16x16/status/:/usr/share/icons/gnome/16x16/devices/
+ sticky_history = yes
+ history_length = 20
+ dmenu = /usr/bin/dmenu -p dunst:
+ browser = /usr/bin/sensible-browser
+ always_run_script = true
+ title = Dunst
+ class = Dunst
+ corner_radius = 0
+ ignore_dbusclose = false
+ force_xinerama = false
+ mouse_left_click = close_current
+ mouse_middle_click = do_action, close_current
+ mouse_right_click = close_all
+[experimental]
+ per_monitor_dpi = false
+
+[urgency_low]
+ background = "#131417"
+ foreground = "#ffffff"
+ timeout = 10
+
+[urgency_normal]
+ background = "#131417"
+ foreground = "#ffffff"
+ timeout = 10
+
+[urgency_critical]
+ background = "#131417"
+ foreground = "#ffffff"
+ timeout = 0
+
+# vim: ft=cfg
diff --git a/config/dwl.nix b/config/dwl.nix
index 86d8f25..e5a77d5 100644
--- a/config/dwl.nix
+++ b/config/dwl.nix
@@ -1,11 +1,11 @@
{ pkgs, home, fetchFromGitHub, ... }:
let
- dwl-custom = (pkgs.callPackage ../packages/dwl-custom.nix {});
+ dwl = (pkgs.callPackage ../packages/dwl.nix {});
in {
xdg.portal.enable = true;
xdg.portal.configPackages = [ pkgs.xdg-desktop-portal-gtk pkgs.xdg-desktop-portal-hyprland ];
xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk pkgs.xdg-desktop-portal-hyprland ];
- home.packages = [ dwl-custom ];
+ home.packages = [ dwl ];
}
diff --git a/config/way-displays/cfg.yaml b/config/way-displays/cfg.yaml
new file mode 100644
index 0000000..6dd76d6
--- /dev/null
+++ b/config/way-displays/cfg.yaml
@@ -0,0 +1,53 @@
+# Arrange displays in a ROW (default, left to right) or a COLUMN (top to bottom)
+ARRANGE: ROW
+
+# Align ROWs at the TOP (default), MIDDLE or BOTTOM
+# Align COLUMNs at the LEFT (default), MIDDLE or RIGHT
+ALIGN: BOTTOM
+
+# The default ORDER is simply the order in which the displays are discovered.
+# Define your own.
+ORDER:
+ - 'HDMI-A-1'
+ - 'eDP-1'
+
+# Enable scaling, overrides AUTO_SCALE and SCALE
+SCALING: FALSE
+
+# Override the preferred mode.
+# WARNING: this may result in an unusable display. See https://github.com/alex-courtis/way-displays#known-issues-with-workarounds
+# for a possible workaround.
+MODE:
+ # Resolution and refresh
+ - NAME_DESC: HDMI-A-1
+ MAX: TRUE
+
+ # Highest available
+ - NAME_DESC: eDP-1
+ MAX: TRUE
+
+# Rotate or translate the display.
+# 90, 180, 270, FLIPPED, FLIPPED-90, FLIPPED-180, FLIPPED-270
+TRANSFORM:
+ # - NAME_DESC: 'monitor description'
+ # TRANSFORM: 270
+
+# VRR / adaptive sync is enabled by default. Disable it per display.
+VRR_OFF:
+ # - DP-2
+ # - '!.*my monitor.*'
+
+
+# Laptop displays usually start with eDP e.g. eDP-1. This may be overridden if
+# your laptop is different.
+LAPTOP_DISPLAY_PREFIX: 'eDP-1'
+
+
+# One of: ERROR, WARNING, INFO (default), DEBUG
+LOG_THRESHOLD: INFO
+
+
+# Disable the specified displays.
+DISABLED:
+ #- "eDP-1"
+
diff --git a/config/way-displays/default.nix b/config/way-displays/default.nix
new file mode 100644
index 0000000..b57f601
--- /dev/null
+++ b/config/way-displays/default.nix
@@ -0,0 +1,6 @@
+{ pkgs, config, ... }:
+
+{
+ home.packages = [ pkgs.way-displays ];
+ home.file.".config/way-displays/cfg.yaml".source = ./cfg.yaml;
+}
diff --git a/config/waybar/config b/config/waybar/config
new file mode 100644
index 0000000..7e472a7
--- /dev/null
+++ b/config/waybar/config
@@ -0,0 +1,41 @@
+{
+ "layer": "top",
+ "height": 40,
+ "modules-left": ["custom/launcher", "dwl/tags"],
+ "modules-right": ["tray", "cpu", "backlight", "battery", "clock"],
+
+ // Modules configuration
+ "custom/launcher": {
+ "format": "<span font='24'></span>"
+ },
+ "dwl/tags": {
+ "num-tags": 9
+ },
+ "tray": {
+ "spacing": 10
+ },
+ "clock": {
+ "timezone": "Asia/Kolkata",
+ "format": " {:%a, %Y-%m-%d  %H:%M}",
+ },
+ "cpu": {
+ "format": " {usage}%",
+ "tooltip": false
+ },
+ "backlight": {
+ "format": "{icon} {percent}%",
+ "format-icons": ["", "", "", "", "", "", "", "", ""]
+ },
+ "battery": {
+ "bat": "BAT1",
+ "states": {
+ "warning": 30,
+ "critical": 15
+ },
+ "format": "{icon} {capacity}%",
+ "format-charging": " {capacity}%+",
+ "format-plugged": " {capacity}%",
+ "format-icons": ["", "", "", "", ""]
+ }
+}
+
diff --git a/config/waybar/default.nix b/config/waybar/default.nix
new file mode 100644
index 0000000..915502b
--- /dev/null
+++ b/config/waybar/default.nix
@@ -0,0 +1,7 @@
+{ pkgs, config, ... }:
+
+{
+ home.packages = [ pkgs.waybar ];
+ home.file.".config/waybar/config".source = ./config;
+ home.file.".config/waybar/style.css".source = ./style.css;
+}
diff --git a/config/waybar/style.css b/config/waybar/style.css
new file mode 100644
index 0000000..1786ff9
--- /dev/null
+++ b/config/waybar/style.css
@@ -0,0 +1,110 @@
+* {
+ font-family: UbuntuMono Nerd Font Mono;
+ font-weight: 500;
+ font-size: 16px;
+}
+
+window#waybar {
+ background-color: rgba(27, 27, 27, 1);
+ color: #f2f0fa;
+ transition-property: background-color;
+ transition-duration: .5s;
+}
+
+button {
+ box-shadow: inset 0 -3px transparent;
+ border: none;
+ border-radius: 0px;
+}
+
+#tags button {
+ padding: 0px 15px;
+ background-color: rgba(27, 27, 27, 1);
+ color: #f2f0fa;
+}
+
+#tags button.focused {
+ background-color: rgba(242, 240, 250, 1);
+ color: #272727;
+}
+
+button:hover {
+ background: inherit;
+}
+
+#custom-launcher {
+ margin: 0 10px;
+ padding: 0 10px;
+}
+
+#workspaces {
+ border-radius: 10px;
+ background-color: #f2f0fa;
+ color: #272727;
+ padding: 0 10px;
+ margin: 0px 4px;
+}
+
+#workspaces button {
+ padding: 0 10px;
+ color: #272727;
+ background-color: #f2f0fa;
+}
+
+#clock {
+ padding: 0 10px;
+ margin: 0 10px;
+ color: #f2f0fa;
+ border-radius: 0px;
+}
+
+#battery,
+#cpu,
+#backlight {
+ padding: 0 10px;
+ margin: 0 0px;
+ background-color: #f2f0fa;
+ color: #272727;
+}
+
+#battery {
+ border-radius: 0px 10px 10px 0px;
+}
+
+#cpu {
+ border-radius: 10px 0px 0px 10px;
+}
+
+#tray {
+ padding: 0 10px;
+ margin: 0 0px;
+ border-radius: 10px;
+ margin: 0 10px;
+}
+
+#window {
+ margin: 0 4px;
+}
+
+/* If workspaces is the leftmost module, omit left margin */
+.modules-left > widget:first-child > #workspaces {
+ margin-left: 0;
+}
+
+#battery.critical:not(.charging) {
+ background-color: #f53c3c;
+ color: #ffffff;
+}
+
+label:focus {
+ background-color: #000000;
+}
+
+#tray > .passive {
+ -gtk-icon-effect: dim;
+}
+
+#tray > .needs-attention {
+ -gtk-icon-effect: highlight;
+ background-color: #eb4d4b;
+}
diff --git a/machines/x/home.nix b/machines/x/home.nix
index 1534b64..24212a0 100644
--- a/machines/x/home.nix
+++ b/machines/x/home.nix
@@ -27,6 +27,8 @@
pavucontrol
blueman
brillo
+
+ wbg
];
imports = (map (path: ../../config/${path}) [
@@ -35,9 +37,12 @@
"git"
"nvim"
"alacritty"
+ "dunst"
"dwl.nix"
+ "way-displays"
"bash.nix"
"fuzzel"
+ "waybar"
]);
home.stateVersion = "23.11";
diff --git a/modules/compromyse.nix b/modules/compromyse.nix
index 0d204d2..ab2716e 100644
--- a/modules/compromyse.nix
+++ b/modules/compromyse.nix
@@ -5,6 +5,6 @@
initialPassword = "changeme";
isNormalUser = true;
# openssh.authorizedKeys.keys = [];
- extraGroups = [ "wheel" "storage" "libvirtd" ];
+ extraGroups = [ "wheel" "storage" "input" "libvirtd" ];
};
}
diff --git a/modules/desktop.nix b/modules/desktop.nix
index a40691b..03cf3ef 100644
--- a/modules/desktop.nix
+++ b/modules/desktop.nix
@@ -8,7 +8,9 @@
polkit_gnome
- pkgs.libnotify
- pkgs.libappindicator
+ libnotify
+ libappindicator
+
+ inotify-tools
];
}
diff --git a/modules/login.nix b/modules/login.nix
index 61e3060..4d149c3 100644
--- a/modules/login.nix
+++ b/modules/login.nix
@@ -10,7 +10,7 @@
enable = true;
settings = {
default_session = {
- command = "tuigreet --time --remember --cmd dwl";
+ command = "tuigreet --time --remember --cmd \"dwl > ~/.cache/dwltags\"";
user = "greeter";
};
};
diff --git a/packages/dwl-custom.nix b/packages/dwl.nix
index a7a4652..b422292 100644
--- a/packages/dwl-custom.nix
+++ b/packages/dwl.nix
@@ -28,7 +28,7 @@ stdenv.mkDerivation (finalAttrs: {
owner = "compromyse";
repo = "dwl";
rev = "master";
- hash = "sha256-QNRE/qCSSsMLbmO5VHsPlIO4f9IgnsV00ALDdzDIBrE=";
+ hash = "sha256-Cm6EPr2h8iSBXAc+9Yqendsp0c0b9BHDgYwaQT/t4/A=";
};
nativeBuildInputs = [