summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config/dwm.nix12
-rw-r--r--config/rofi/config.rasi77
-rw-r--r--config/rofi/default.nix6
-rw-r--r--config/themes.nix1
-rw-r--r--config/way-displays/cfg.yaml28
-rw-r--r--config/way-displays/default.nix6
-rwxr-xr-xdist/dwl/bar.sh (renamed from dist/bar.sh)0
-rwxr-xr-xdist/dwl/run.sh (renamed from dist/run.sh)0
-rwxr-xr-xdist/dwm/bar.sh29
-rwxr-xr-xdist/dwm/power.sh12
-rw-r--r--machines/x/configuration.nix19
-rw-r--r--machines/x/home.nix6
-rw-r--r--modules/compromyse.nix2
-rw-r--r--modules/login.nix6
14 files changed, 160 insertions, 44 deletions
diff --git a/config/dwm.nix b/config/dwm.nix
new file mode 100644
index 0000000..89a1408
--- /dev/null
+++ b/config/dwm.nix
@@ -0,0 +1,12 @@
+{ pkgs, home, fetchFromGitHub, ... }:
+
+{
+ home.packages = with pkgs; [
+ feh
+ picom
+ wmname
+ xss-lock
+ xsecurelock
+ networkmanagerapplet
+ ];
+}
diff --git a/config/rofi/config.rasi b/config/rofi/config.rasi
new file mode 100644
index 0000000..0233f7b
--- /dev/null
+++ b/config/rofi/config.rasi
@@ -0,0 +1,77 @@
+configuration {
+ display-drun: "?";
+ drun-display-format: "{name}";
+ font: "UbuntuMono Nerd Font Medium 10";
+ modi: "run,drun";
+}
+
+@theme "/dev/null"
+
+* {
+ bg: #131417;
+ bg-alt: #1e1f26;
+
+ fg: #d3d7f2;
+ fg-alt: #787c99;
+
+ background-color: @bg;
+
+ border: 0;
+ margin: 0;
+ padding: 0;
+ spacing: 0;
+}
+
+window {
+ width: 30%;
+}
+
+element {
+ padding: 8 0;
+ text-color: @fg-alt;
+}
+
+element selected {
+ text-color: @fg;
+}
+
+element-text {
+ text-color: inherit;
+ vertical-align: 0.5;
+}
+
+element-icon {
+ size: 14;
+ padding: 0 10 0 0;
+}
+
+entry {
+ background-color: @bg-alt;
+ padding: 12;
+ text-color: @fg;
+}
+
+inputbar {
+ children: [prompt, entry];
+}
+
+listview {
+ padding: 8 12;
+ background-color: @bg;
+ columns: 1;
+ lines: 8;
+}
+
+mainbox {
+ background-color: @bg;
+ children: [inputbar, listview];
+}
+
+prompt {
+ background-color: @bg-alt;
+ enabled: true;
+ padding: 12 0 0 12;
+ text-color: @fg;
+}
+
+/* vim: ft=sass */
diff --git a/config/rofi/default.nix b/config/rofi/default.nix
new file mode 100644
index 0000000..e515249
--- /dev/null
+++ b/config/rofi/default.nix
@@ -0,0 +1,6 @@
+{ pkgs, config, ... }:
+
+{
+ home.packages = [ pkgs.rofi ];
+ home.file.".config/rofi/config.rasi".source = ./config.rasi;
+}
diff --git a/config/themes.nix b/config/themes.nix
index 4bea0e9..b368a9e 100644
--- a/config/themes.nix
+++ b/config/themes.nix
@@ -3,6 +3,7 @@
{
home.pointerCursor = {
gtk.enable = true;
+ x11.enable = true;
package = pkgs.bibata-cursors;
name = "Bibata-Modern-Classic";
size = 16;
diff --git a/config/way-displays/cfg.yaml b/config/way-displays/cfg.yaml
deleted file mode 100644
index 74e247b..0000000
--- a/config/way-displays/cfg.yaml
+++ /dev/null
@@ -1,28 +0,0 @@
-# Arrange displays in a ROW (default, left to right) or a COLUMN (top to bottom)
-ARRANGE: COLUMN
-
-# Align ROWs at the TOP (default), MIDDLE or BOTTOM
-# Align COLUMNs at the LEFT (default), MIDDLE or RIGHT
-ALIGN: MIDDLE
-
-# The default ORDER is simply the order in which the displays are discovered.
-# Define your own.
-ORDER:
- - 'HDMI-A-1'
- - 'eDP-1'
-
-SCALING: FALSE
-
-MODE:
- - NAME_DESC: HDMI-A-1
- MAX: TRUE
-
- - NAME_DESC: eDP-1
- MAX: TRUE
-
-# 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
diff --git a/config/way-displays/default.nix b/config/way-displays/default.nix
deleted file mode 100644
index b57f601..0000000
--- a/config/way-displays/default.nix
+++ /dev/null
@@ -1,6 +0,0 @@
-{ pkgs, config, ... }:
-
-{
- home.packages = [ pkgs.way-displays ];
- home.file.".config/way-displays/cfg.yaml".source = ./cfg.yaml;
-}
diff --git a/dist/bar.sh b/dist/dwl/bar.sh
index 2b23972..2b23972 100755
--- a/dist/bar.sh
+++ b/dist/dwl/bar.sh
diff --git a/dist/run.sh b/dist/dwl/run.sh
index dc13e69..dc13e69 100755
--- a/dist/run.sh
+++ b/dist/dwl/run.sh
diff --git a/dist/dwm/bar.sh b/dist/dwm/bar.sh
new file mode 100755
index 0000000..dbc76e5
--- /dev/null
+++ b/dist/dwm/bar.sh
@@ -0,0 +1,29 @@
+#!/usr/bin/env bash
+
+battery() {
+ capacity="$(cat /sys/class/power_supply/BAT1/capacity)"
+ case "$(cat /sys/class/power_supply/BAT1/status)" in
+ Charging) printf " $capacity +";;
+ Discharging) printf " $capacity -";;
+ Full) printf " $capacity";;
+ esac
+}
+
+wlan() {
+ case "$(cat /sys/class/net/wl*/operstate 2>/dev/null)" in
+ up) echo "󰤨 $(iwgetid -r)";;
+ down) printf "󰤭 Disconnected";;
+ esac
+}
+
+clock() {
+ printf "󱑆 $(date '+%H:%M')"
+}
+
+user() {
+ printf "$(whoami)"
+}
+
+while(true) do
+ xsetroot -name "| $(battery) | $(wlan) | $(clock) | $(user) " && sleep 2
+done
diff --git a/dist/dwm/power.sh b/dist/dwm/power.sh
new file mode 100755
index 0000000..318c7cf
--- /dev/null
+++ b/dist/dwm/power.sh
@@ -0,0 +1,12 @@
+#!/usr/bin/env bash
+chosen=$(printf " Power Off\n Restart\n Suspend\n Hibernate\n󰗼 Log Out\n Lock" | rofi -dmenu -i -p "Choice:")
+
+case "$chosen" in
+ " Power Off") poweroff ;;
+ " Restart") reboot ;;
+ " Suspend") systemctl suspend-then-hibernate ;;
+ " Hibernate") systemctl hibernate ;;
+ "󰗼 Log Out") killall dwm ;;
+ " Lock") betterlockscreen -l ;;
+ *) exit 1 ;;
+esac
diff --git a/machines/x/configuration.nix b/machines/x/configuration.nix
index f3e60e4..46aa51d 100644
--- a/machines/x/configuration.nix
+++ b/machines/x/configuration.nix
@@ -42,6 +42,25 @@
home-manager.users.compromyse = import ./home.nix;
+ environment.systemPackages = with pkgs; [
+ xorg.xorgserver
+ xorg.xf86inputevdev
+ xorg.xf86inputsynaptics
+ xorg.xf86inputlibinput
+ ];
+
+ services.xserver.enable = true;
+ services.xserver.displayManager.startx.enable = true;
+ services.xserver.windowManager.dwm.enable = true;
+ services.xserver.windowManager.dwm.package = pkgs.dwm.overrideAttrs {
+ src = pkgs.fetchFromGitHub {
+ owner = "compromyse";
+ repo = "dwm";
+ rev = "master";
+ hash = "sha256-bYj9u0EBfpTcpJHzeaCp3mm6tSy9dz40y+X15R0WbUs=";
+ };
+ };
+
networking.extraHosts =
''
127.0.0.1 download.labsmartlis.local
diff --git a/machines/x/home.nix b/machines/x/home.nix
index c0ac523..c46067e 100644
--- a/machines/x/home.nix
+++ b/machines/x/home.nix
@@ -35,7 +35,6 @@ in {
pamixer
wbg
- wl-clipboard
sway-launcher-desktop
@@ -51,9 +50,8 @@ in {
"git"
"nvim"
"alacritty"
- "dwl.nix"
- "way-displays"
- "swaylock"
+ "dwm.nix"
+ "rofi"
"dunst"
]);
diff --git a/modules/compromyse.nix b/modules/compromyse.nix
index f822b46..89443f4 100644
--- a/modules/compromyse.nix
+++ b/modules/compromyse.nix
@@ -5,6 +5,6 @@
initialPassword = "changeme";
isNormalUser = true;
# openssh.authorizedKeys.keys = [];
- extraGroups = [ "wheel" "video" "storage" "input" "plugdev" "libvirtd" "docker" ];
+ extraGroups = [ "wheel" "video" "storage" "input" "plugdev" "tty" "libvirtd" "docker" ];
};
}
diff --git a/modules/login.nix b/modules/login.nix
index 79ac35f..37e78a4 100644
--- a/modules/login.nix
+++ b/modules/login.nix
@@ -10,7 +10,7 @@
enable = true;
settings = {
default_session = {
- command = "tuigreet --time --remember --cmd \"dwl -s dwlb\"";
+ command = "tuigreet --time --remember --cmd \"dwm\"";
user = "greeter";
};
};
@@ -32,10 +32,6 @@
security.polkit.enable = true;
- security.pam.services.swaylock.text = ''
- auth include login
- '';
-
services.xserver.libinput.enable = true;
programs.gnupg.agent = {