Remove wayland, replace it with xmonad
diff --git a/modules/launcher.nix b/modules/launcher.nix
index 3712495..9799ce7 100644
--- a/modules/launcher.nix
+++ b/modules/launcher.nix
@@ -5,11 +5,11 @@
}: {
home = {
home = {
- packages = [ pkgs.rofi-wayland ];
+ packages = [ pkgs.rofi ];
file.".config/rofi/config.rasi".source = ./launcher/config.rasi;
};
wayland.windowManager.sway.config.keybindings = lib.mkOptionDefault {
- "${home.wayland.windowManager.sway.config.modifier}+d" = "exec sh -c '${pkgs.procps}/bin/pkill rofi; ${pkgs.rofi-wayland}/bin/rofi -show combi'";
+ "${home.wayland.windowManager.sway.config.modifier}+d" = "exec sh -c '${pkgs.procps}/bin/pkill rofi; ${pkgs.rofi}/bin/rofi -show combi'";
"${home.wayland.windowManager.sway.config.modifier}+minus" = "exec sh -c '${pkgs.procps}/bin/pkill rofi; ${./launcher/show-scratchpad.sh}'";
};
};
diff --git a/modules/sway.nix b/modules/sway.nix
deleted file mode 100644
index 8268452..0000000
--- a/modules/sway.nix
+++ /dev/null
@@ -1,193 +0,0 @@
-{ pkgs
-, lib
-, home
-, ...
-}: {
- home = {
- wayland.windowManager.sway = {
- enable = true;
- wrapperFeatures.gtk = true;
- package = pkgs.sway-unwrapped;
-
- config = rec {
- assigns = { };
- bars = [ ];
- colors = { };
- defaultWorkspace = null;
- down = "j";
- floating = { };
- focus = { };
- fonts = { };
- gaps = {
- inner = 10;
- top = -10;
- outer = 0;
- smartGaps = false;
- };
- input = {
- "type:touchpad" = {
- dwt = "enabled";
- tap = "enabled";
- natural_scroll = "enabled";
- middle_emulation = "enabled";
- events = "disabled_on_external_mouse";
- };
- "type:keyboard" = {
- xkb_layout = "gb";
- xkb_options = "caps:none";
- };
- "type:tablet_tool" = {
- map_to_output = "eDP-1";
- };
- };
- keybindings = lib.mkOptionDefault {
- "${modifier}+g" = "sticky toggle";
- "${modifier}+k" = "exec wl-copy -c";
- "${modifier}+f" = "maximize toggle";
- "XF86AudioRaiseVolume" = "exec pamixer -ui 5 && ( pamixer --get-mute && expr \"$(pamixer --get-volume)\" + 100 > $WOBSOCK ) || pamixer --get-volume > $WOBSOCK";
- "XF86AudioLowerVolume" = "exec pamixer -ud 5 && ( pamixer --get-mute && expr \"$(pamixer --get-volume)\" + 100 > $WOBSOCK ) || pamixer --get-volume > $WOBSOCK";
- "XF86AudioMute" = "exec pamixer --toggle-mute && ( pamixer --get-mute && expr \"$(pamixer --get-volume)\" + 100 > $WOBSOCK ) || pamixer --get-volume > $WOBSOCK";
- "XF86AudioMicMute" = "exec pamixer --toggle-mute --default-source && ( pamixer --get-mute --default-source && expr \"$(pamixer --default-source --get-volume)\" + 100 > $WOBSOCK ) || pamixer --default-source --get-volume > $WOBSOCK";
- "XF86MonBrightnessUp" = "exec light -A 3 && light -G | cut -d'.' -f1 > $WOBSOCK";
- "XF86MonBrightnessDown" = "exec light -U 3 && light -G | cut -d'.' -f1 > $WOBSOCK";
- "${modifier}+XF86AudioRaiseVolume" = "exec pamixer --default-source -ui 5 && ( pamixer --get-mute --default-source && expr \"$(pamixer --default-source --get-volume)\" + 100 > $WOBSOCK ) || pamixer --default-source --get-volume > $WOBSOCK";
- "${modifier}+XF86AudioLowerVolume" = "exec pamixer --default-source -ud 5 && ( pamixer --get-mute --default-source && expr \"$(pamixer --default-source --get-volume)\" + 100 > $WOBSOCK ) || pamixer --get-volume --default-source > $WOBSOCK";
- "${modifier}+XF86AudioMute" = "exec pamixer --toggle-mute --default-source && ( pamixer --get-mute --default-source && expr \"$(pamixer --default-source --get-volume)\" + 100 > $WOBSOCK ) || pamixer --default-source --get-volume > $WOBSOCK";
- "${modifier}+XF86MonBrightnessUp" = "exec light -A 6 && light -G | cut -d'.' -f1 > $WOBSOCK";
- "${modifier}+XF86MonBrightnessDown" = "exec light -U 6 && light -G | cut -d'.' -f1 > $WOBSOCK";
- "${modifier}+n" = ''exec wpa_cli select_network $(wpa_cli list_networks | tail -n +3 | rofi -dmenu -window-title "Select Network" | awk '{print $1;}')'';
- "${modifier}+u" = "output \"*\" dpms on";
- "${modifier}+t" = "output HDMI-A-2 toggle";
- };
- keycodebindings = {
- "66" = "exec ${pkgs.wtype}/bin/wtype -P F12";
- };
- left = "h";
- modes = {
- resize = {
- Down = "resize grow height 10 px";
- Escape = "mode default";
- Left = "resize shrink width 10 px";
- Return = "mode default";
- Right = "resize grow width 10 px";
- Up = "resize shrink height 10 px";
- h = "resize shrink width 10 px";
- j = "resize grow height 10 px";
- k = "resize shrink height 10 px";
- l = "resize grow width 10 px";
- };
- };
- modifier = "Mod4";
- output = rec {
- HDMI-A-1 = {
- resolution = "3840x2160";
- bg = "#FFD0F9 solid_color";
- position = "0,0";
- };
- HDMI-A-2 = HDMI-A-1;
- # For some reason my monitor sometimes gets one identifier and
- # sometimes the other, despite being plugged into the same port
- eDP-1 = {
- resolution = "1920x1080";
- position = "0,2160";
- };
- "*" = { };
- };
- right = "l";
- seat = {
- "*" = {
- hide_cursor = "when-typing enable";
- };
- };
- startup = [
- { command = "dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK"; }
- {
- command = "light -N 1";
- always = false;
- }
- {
- command = "\"pkill wob; rm -f $WOBSOCK && mkfifo $WOBSOCK && tail -f $WOBSOCK | wob --output='*'\"";
- always = true;
- }
- ];
- terminal = "${pkgs.kitty}/bin/kitty";
- up = "k";
- window = { };
- workspaceAutoBackAndForth = true;
- workspaceLayout = "default";
- workspaceOutputAssign = [ ];
- };
-
- extraSessionCommands = ''
- unset __HM_SESS_VARS_SOURCED
- . "$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh"
-
- # export WLR_NO_HARDWARE_CURSORS=1
- # TODO: Check if above is still needed w/ nvidia card enabled
- # export SDL_VIDEODRIVER=wayland
- # needs qt5.qtwayland in systemPackages
- # export QT_QPA_PLATFORM=wayland
- # export QT_WAYLAND_DISABLE_WINDOWDECORATION="1"
- # Fix for some Java AWT applications (e.g. Android Studio),
- # use this if they aren't displayed properly:
- export _JAVA_AWT_WM_NONREPARENTING=1
- '';
-
- swaynag = {
- enable = false;
- settings = {
- "<config>" = {
- background = "#ffffff99";
- border-bottom = "#00000000";
- button-background = "#ffffffcc";
- button-padding = 10;
- button-border-size = 0;
- };
-
- warning = {
- background = "#ffffff99";
- border-bottom = "#00000000";
- button-background = "#ffff00";
- };
-
- error = {
- background = "#ffffff99";
- border-bottom = "#00000000";
- button-background = "#ff0000";
- };
-
- green = {
- background = "#ffffff99";
- border-bottom = "#00000000";
- button-background = "#00b300";
- };
-
- blue = {
- background = "#ffffff99";
- border-bottom = "#00000000";
- button-background = "#0000ff";
- };
- };
- };
-
- systemdIntegration = true;
-
- extraConfig = ''
- set $WOBSOCK $XDG_RUNTIME_DIR/wob.sock
- '';
- };
-
- home.packages = with pkgs; [
- wl-clipboard
- pamixer
- wob
- wtype
- ];
-
- programs.zsh.profileExtra = ''
- if [ -z $DISPLAY ] && [ "$(tty)" = "/dev/tty1" ]; then
- exec systemd-cat -t sway sway --unsupported-gpu
- fi
- '';
- };
-}
diff --git a/modules/waybar.nix b/modules/waybar.nix
deleted file mode 100644
index dab9164..0000000
--- a/modules/waybar.nix
+++ /dev/null
@@ -1,118 +0,0 @@
-{ pkgs, ... }: {
- home = {
- programs.waybar = {
- enable = true;
- settings = [
- {
- modules-left = [ "sway/workspaces" ];
-
- modules-center = [ "sway/window" ];
-
- modules-right = [
- "backlight"
- "pulseaudio"
- "network"
- "battery"
- "clock"
- "custom/coffee"
- "custom/notification"
- "tray"
- ];
-
- pulseaudio = {
- format = "{icon} {volume}%";
- format-tooltip = "{desc}";
- format-muted = "đ Muted";
- format-icons = [
- "đ"
- "đ"
- "đ"
- ];
- states.muted = 0;
- };
- backlight = {
- format = "{icon} {percent}%";
- on-scroll-up = "${pkgs.light}/bin/light -A 3";
- on-scroll-down = "${pkgs.light}/bin/light -N 1 && ${pkgs.light}/bin/light -U 3";
- format-icons = [
- "đ
"
- "đ"
- "âī¸"
- "â¨"
- ];
- };
- network = {
- format = "đ {ifname}";
- format-wifi = "đĄ {essid} ({ifname})";
- format-disabled = "";
- format-disconnected = "đ No network";
- tooltip-format = "{ipaddr}/{cidr}";
- tooltip-format-wifi = "{ipaddr}/{cidr} ({signalStrength}%)";
- tooltip-format-disconnected = "Disconnected";
- };
- battery = {
- states = {
- full = 100;
- warning = 30;
- critical = 10;
- };
- format = "{icon} {capacity}%";
- format-charging = "đ {capacity}%";
- format-plugged = "đ {capacity}%";
- format-full-full = "đ Full";
- format-icons = {
- full = "đ";
- warning = "đĒĢ";
- critical = "đĒĢ";
- };
- };
- "sway/window" = {
- max-length = 50;
- };
- clock = {
- format = "â° {:%T}";
- interval = 1;
- };
- "custom/notification" = {
- tooltip = false;
- format = "{icon}";
- format-icons = {
- notification = "đ<sup><span color='#dd2e41'>â</span></sup>";
- none = "đ";
- dnd-notification = "đ<sup><span color='#dd2e41'>â</span></sup>";
- dnd-none = "đ";
- };
- "return-type" = "json";
- "exec-if" = "which ${pkgs.swaynotificationcenter}/bin/swaync-client";
- "exec" = "${pkgs.swaynotificationcenter}/bin/swaync-client -swb";
- on-click = "${pkgs.swaynotificationcenter}/bin/swaync-client -t -sw";
- on-click-right = "${pkgs.swaynotificationcenter}/bin/swaync-client -d -sw";
- escape = true;
- };
- "custom/coffee" = {
- tooltip = false;
- format = "{icon}";
- format-icons = {
- none = "đ´";
- inhibiting = "â";
- };
- "return-type" = "json";
- "exec" = "while sleep 0.1; do ${pkgs.systemd}/bin/systemd-inhibit --list | grep idle | wc -l | jq '{alt: (if . == 0 then \"none\" else \"inhibiting\" end)} | tostring' -r; done";
- on-click = ./systemd-inhibit/stop-inhibiting-idle.sh;
- on-click-right = ./systemd-inhibit/inhibit-idle.sh;
- escape = true;
- };
- }
- ];
- style = builtins.readFile ./waybar/main.css;
- };
-
- wayland.windowManager.sway.config.startup = [
- {
- command = "\"pkill swaync; pkill waybar; ${pkgs.swaynotificationcenter}/bin/swaync & waybar\"";
- always = true;
- }
- ];
- home.packages = with pkgs; [ libappindicator swaynotificationcenter ];
- };
-}
diff --git a/modules/waybar/main.css b/modules/waybar/main.css
deleted file mode 100644
index 3f43404..0000000
--- a/modules/waybar/main.css
+++ /dev/null
@@ -1,119 +0,0 @@
-window#waybar {
- background: rgba(0, 0, 0, 0);
-}
-
-window#waybar * * * * {
- background: alpha(@theme_base_color, 0.6);
- color: @theme_text_color;
- padding-left: 10px;
- padding-right: 10px;
- border-radius: 5px;
- margin: 10px 5px;
- transition: all 0.2s ease-in-out;
- transition: background 0s;
-}
-
-window#waybar * * *:first-child * {
- margin-left: 10px;
-}
-
-window#waybar * * *:last-child * {
- margin-right: 10px;
-}
-
-window#waybar * * * * * {
- margin: 0;
- background: rgba(0, 0, 0, 0);
-}
-
-#window {
- min-width: 50em;
-}
-
-window#waybar * * * #tray * {
- padding: 0;
-}
-
-window#waybar * * * #tray menu *:first-child {
- margin-top: 5px;
-}
-
-window#waybar * * * #tray menu *:last-child {
- margin-bottom: 5px;
-}
-
-window#waybar * * * #tray menu * {
- margin-left: 5px;
- margin-right: 5px;
-}
-
-window#waybar * * * #tray menu * * {
- margin: 5px;
-}
-
-window#waybar * * * #tray {
- padding: 5px;
-}
-
-window#waybar * * * #tray menu {
- background: alpha(@theme_base_color, 0.8);
- color: @theme_text_color;
- border: 0;
-}
-
-#tray menu *:hover {
- background: alpha(@theme_base_color, 1);
-}
-
-window#waybar #workspaces {
- padding: 0;
-}
-
-window#waybar #workspaces button {
- border: 0;
- margin: 0;
- padding: 5px;
-}
-
-window#waybar #workspaces button.focused {
- background: alpha(@theme_base_color, 0.8);
-}
-
-window#waybar #workspaces button.focused:hover {
- background: alpha(@theme_base_color, 0.9);
-}
-
-window#waybar #workspaces button:hover {
- background: alpha(@theme_base_color, 0.7);
-}
-
-window#waybar #workspaces button.persistent {
- background: alpha(#ffdf00, 0.5);
-}
-
-window#waybar #workspaces button.urgent {
- background: alpha(red, 0.5);
-}
-
-window#waybar #workspaces button:active {
- background: alpha(@theme_base_color, 1);
-}
-
-#backlight,
-#pulseaudio,
-#network,
-#battery {
- min-width: 3em;
-}
-
-window#waybar * .modules-right #custom-notification {
- margin-right: 10px;
-}
-
-window#waybar * .modules-right #tray {
- margin-left: 0px;
-}
-
-#custom-notification {
- letter-spacing: -8px;
-}
diff --git a/modules/waycorner.nix b/modules/waycorner.nix
deleted file mode 100644
index d06cea4..0000000
--- a/modules/waycorner.nix
+++ /dev/null
@@ -1,24 +0,0 @@
-{ pkgs, ... }:
-let
- config = {
- left = {
- /* enter_command = [ ./systemd-inhibit/inhibit-idle.sh ]; */
- exit_command = [ ./systemd-inhibit/stop-inhibiting-idle.sh ];
- locations = [ "bottom_right" "bottom_left" ];
- size = 10;
- timeout_ms = 250;
- };
- left.output.description = "";
- };
-in
-{
- home = {
- home = {
- packages = [ pkgs.waycorner ];
- file.".config/waycorner/config.toml".source = (pkgs.formats.toml { }).generate "config.toml" config;
- };
- wayland.windowManager.sway.config.startup = [
- { command = "${pkgs.waycorner}/bin/waycorner"; }
- ];
- };
-}
diff --git a/modules/xmonad.nix b/modules/xmonad.nix
new file mode 100644
index 0000000..66ee90b
--- /dev/null
+++ b/modules/xmonad.nix
@@ -0,0 +1,10 @@
+{pkgs, ...}: {
+ home.xsession.windowManager.xmonad = {
+ enable = true;
+ enableContribAndExtras = true;
+ config = ./xmonad/xmonad.hs;
+ extraPackages = haskellPackages: with haskellPackages; [
+ taffybar
+ ];
+ };
+}
diff --git a/modules/xmonad/xmonad.hs b/modules/xmonad/xmonad.hs
new file mode 100644
index 0000000..518ba33
--- /dev/null
+++ b/modules/xmonad/xmonad.hs
@@ -0,0 +1,10 @@
+-- spell-checker:words xmonad
+import XMonad
+
+import XMonad.Util.EZConfig
+
+main :: IO ()
+main = xmonad $ def
+ { modMask = mod4Mask -- Use Super as our mod key
+ , terminal = "kitty" -- Kitty, my beloved <3
+ }