about summary refs log tree commit diff
path: root/users/fcuny/desktop/wm
diff options
context:
space:
mode:
Diffstat (limited to 'users/fcuny/desktop/wm')
-rw-r--r--users/fcuny/desktop/wm/bar.nix136
-rw-r--r--users/fcuny/desktop/wm/default.nix86
-rw-r--r--users/fcuny/desktop/wm/gammastep.nix14
-rw-r--r--users/fcuny/desktop/wm/launcher.nix58
-rw-r--r--users/fcuny/desktop/wm/notification.nix26
-rw-r--r--users/fcuny/desktop/wm/screenlock.nix27
-rw-r--r--users/fcuny/desktop/wm/screenshot.nix8
7 files changed, 0 insertions, 355 deletions
diff --git a/users/fcuny/desktop/wm/bar.nix b/users/fcuny/desktop/wm/bar.nix
deleted file mode 100644
index 91eff31..0000000
--- a/users/fcuny/desktop/wm/bar.nix
+++ /dev/null
@@ -1,136 +0,0 @@
-{ pkgs, ... }:
-
-{
-  programs.waybar = {
-    enable = true;
-    systemd = { enable = true; };
-
-    settings = [{
-      layer = "bottom";
-      position = "top";
-      margin-top = 0;
-      margin-left = 0;
-      margin-right = 0;
-      margin-bottom = 0;
-      modules-left = [ "sway/workspaces" "sway/mode" ];
-      modules-right = [ "pulseaudio" "network" "battery" "clock" "tray" ];
-      modules = {
-        "sway/workspaces" = { format = "{name}"; };
-        "sway/mode" = { format = "{}"; };
-        tray = { spacing = 10; };
-        clock = { format = "{: %a %b %d %R}"; };
-        battery = {
-          states = {
-            warning = 30;
-            critical = 15;
-          };
-          format = "ac:{capacity}%";
-          tooltip = true;
-          tooltip-format = "{timeTo} ({capacity}%)";
-        };
-        pulseaudio = {
-          format = "vol:{volume}%";
-          format-bluetooth = "bt:{volume}% {icon} ({format_source})";
-          format-bluetooth-muted = "bt:{volume}%";
-          format-muted = "vol:{volume}%";
-          on-click = "pavucontrol";
-        };
-        "network" = {
-          format-wifi = "{essid}:{signalStrength}%";
-          format-ethernet = "{ipaddr}/{cidr}";
-          format-linked = "{ifname} (No IP)";
-          format-disconnected = "network unavailable";
-          format-alt = "{ifname}: {ipaddr}/{cidr}";
-          tooltip = false;
-        };
-      };
-    }];
-
-    style = ''
-      * {
-        border-radius: 0;
-        border: none;
-        margin: 0;
-        min-height: 0;
-        padding: 0;
-      }
-      #waybar {
-        font-family: Source Code Pro;
-        font-size: 15px;
-      }
-      window#waybar {
-        background-color: rgba(43, 48, 59, 0.5);
-        color: #ffffff;
-        transition-property: background-color;
-        transition-duration: .5s;
-      }
-      #workspaces button {
-        padding: 0 3px;
-        background-color: transparent;
-        color: #888888;
-        box-shadow: inset 0 -3px transparent;
-        font-weight: bold;
-      }
-      #workspaces button.focused {
-        background-color: #285577;
-        border: 1px solid #4c7899;
-        color: #ffffff;
-      }
-      #workspaces button.urgent {
-        background-color: #900000;
-        color: #ffffff;
-        border: 1px solid #2f343a;
-      }
-      #tray {
-        /* No styles */
-      }
-      #clock,
-      #battery,
-      #network,
-      #pulseaudio,
-      #tray,
-      #mode {
-        padding-left: 10px;
-        padding-right: 10px;
-      }
-      #mode {
-        background: #64727D;
-        border-top: 2px solid white;
-        /* To compensate for the top border and still have vertical centering */
-        padding-bottom: 2px;
-      }
-      #clock {
-        /* No styles */
-      }
-      #battery {
-        animation-timing-function: linear;
-        animation-iteration-count: infinite;
-        animation-direction: alternate;
-      }
-      #battery.discharging {
-        color: #90a1ad;
-      }
-      #battery.charging {
-        color: #fffff8;
-      }
-      #battery.warning {
-        border-bottom: 2px solid #ff9e21;
-      }
-      #battery.critical {
-        border-bottom: 2px solid #ff3121;
-      }
-      #network {
-        /* No styles */
-      }
-      #network.disconnected {
-        color: orange;
-      }
-      #pulseaudio {
-        /* No styles */
-      }
-      #pulseaudio.muted {
-        color: #90a1ad;
-      }
-    '';
-  };
-}
diff --git a/users/fcuny/desktop/wm/default.nix b/users/fcuny/desktop/wm/default.nix
deleted file mode 100644
index 24c7f8e..0000000
--- a/users/fcuny/desktop/wm/default.nix
+++ /dev/null
@@ -1,86 +0,0 @@
-{ config, lib, pkgs, ... }: {
-  imports = [
-    ./bar.nix
-    ./gammastep.nix
-    ./launcher.nix
-    ./notification.nix
-    ./screenlock.nix
-    ./screenshot.nix
-  ];
-
-  home.packages = [ pkgs.wev pkgs.wf-recorder pkgs.wofi pkgs.wlogout ];
-
-  home.sessionVariables = {
-    MOZ_ENABLE_WAYLAND = true;
-    XDG_CURRENT_DESKTOP = "sway";
-    XDG_SESSION_TYPE = "wayland";
-  };
-
-  wayland.windowManager.sway = {
-    enable = true;
-    systemdIntegration = true;
-    extraSessionCommands = ''
-      export XDG_SESSION_TYPE=wayland
-      export XDG_CURRENT_DESKTOP=sway
-      export MOZ_ENABLE_WAYLAND=1
-    '';
-    config = rec {
-      modifier = "Mod4";
-      terminal = "${config.programs.alacritty.package}/bin/alacritty";
-      menu = ''${pkgs.wofi}/bin/wofi -S drun -p "app:" -L 10'';
-      bars = [ ];
-      fonts = {
-        names = [ "Source Code Pro" ];
-        size = 10.0;
-      };
-      keybindings = lib.mkOptionDefault {
-        "XF86AudioRaiseVolume" =
-          "exec ${pkgs.pulseaudio}/bin/pactl set-sink-volume @DEFAULT_SINK@ +5%";
-        "XF86AudioLowerVolume" =
-          "exec ${pkgs.pulseaudio}/bin/pactl set-sink-volume @DEFAULT_SINK@ -5%";
-        "XF86AudioMute" =
-          "exec ${pkgs.pulseaudio}/bin/pactl set-sink-mute @DEFAULT_SINK@ toggle";
-        "XF86AudioMicMute" =
-          "exec ${pkgs.pulseaudio}/bin/pactl set-source-mute @DEFAULT_SOURCE@ toggle";
-        "XF86MonBrightnessDown" =
-          "exec ${pkgs.brightnessctl}/bin/brightnessctl set 5%-";
-        "XF86MonBrightnessUp" =
-          "exec ${pkgs.brightnessctl}/bin/brightnessctl set +5%";
-        "${modifier}+Escape" = "exec ${pkgs.wlogout}/bin/wlogout";
-        "${modifier}+s" =
-          "exec ${pkgs.grim}/bin/grim $(xdg-user-dir DOCUMENTS)/screenshots/$(date +'%Y-%m-%d-%H%M%S_screenshot.png')";
-        "${modifier}+Shift+s" =
-          "exec ${pkgs.slurp}/bin/slurp | ${pkgs.grim}/bin/grim -g - $(xdg-user-dir DOCUMENTS)/screenshots/$(date +'%Y-%m-%d-%H%M%S_screenshot.png')";
-      };
-      window.commands = [{
-        command = "floating enable";
-        criteria.app_id = "pavucontrol";
-      }];
-      input = {
-        "*" = {
-          "xkb_layout" = "us,fr";
-          # map capslock to ctrl, and switch layout using shift+caps
-          "xkb_options" = "ctrl:nocaps,grp:shift_caps_toggle";
-        };
-      };
-      assigns = {
-        "1" = [{ app_id = "emacs"; }];
-        "2" = [{ app_id = "Alacritty"; }];
-        "3" = [{ app_id = "firefox"; }];
-        "4" = [{ class = "Element"; }];
-      };
-      output = {
-        "*" = {
-          scale = "1.5";
-          bg = "#2E3440 solid_color";
-        };
-        # This is for aptos
-        "eDP-1" = { scale = "1.3"; };
-      };
-      startup = [{
-        command = ''
-          exec "systemctl --user import-environment; systemctl --user start sway-session.target"'';
-      }];
-    };
-  };
-}
diff --git a/users/fcuny/desktop/wm/gammastep.nix b/users/fcuny/desktop/wm/gammastep.nix
deleted file mode 100644
index 510cb10..0000000
--- a/users/fcuny/desktop/wm/gammastep.nix
+++ /dev/null
@@ -1,14 +0,0 @@
-{ config, lib, pkgs, ... }:
-
-{
-  services.gammastep = {
-    enable = true;
-    #TODO: this needs to come from locale.nix
-    latitude = 37.8715;
-    longitude = -122.2730;
-    temperature = {
-      day = 5000;
-      night = 3700;
-    };
-  };
-}
diff --git a/users/fcuny/desktop/wm/launcher.nix b/users/fcuny/desktop/wm/launcher.nix
deleted file mode 100644
index 9b0b7a3..0000000
--- a/users/fcuny/desktop/wm/launcher.nix
+++ /dev/null
@@ -1,58 +0,0 @@
-{ pkgs, config, ... }:
-
-{
-  home.packages = with pkgs; [ wofi ];
-
-  xdg.configFile."wofi/config".text = ''
-    allow_images=true
-    image_size=20px
-    drun-display_generic=true
-    dynamic_lines=true
-  '';
-
-  xdg.configFile."wofi/style.css".text = ''
-    *{
-      font-family: monospace;
-    }
-
-    window {
-      color: #5E81AC;
-      background-color: rgba(27, 27, 28, 0.92);
-      border: 2px solid #75d5ff;
-    }
-
-    #input {
-      margin: 10px 0px;
-      border-radius: 0px;
-      border: none;
-      background: transparent;
-      color: white;
-    }
-
-    #inner-box {
-      background-color: transparent;
-    }
-
-    #outer-box {
-      margin: 0px;
-      padding:5px;
-      background-color: transparent;
-    }
-
-    #text {
-      padding: 5px;
-      color: white;
-    }
-
-    #entry:selected {
-      color: #75d5ff;
-      background-color: transparent;
-      border: 0px;
-    }
-
-    #text:selected {
-      color: #75d5ff;
-      background-color: transparent;
-    }
-  '';
-}
diff --git a/users/fcuny/desktop/wm/notification.nix b/users/fcuny/desktop/wm/notification.nix
deleted file mode 100644
index ad801c1..0000000
--- a/users/fcuny/desktop/wm/notification.nix
+++ /dev/null
@@ -1,26 +0,0 @@
-{ config, lib, pkgs, ... }:
-
-{
-  home.packages = [
-    pkgs.libnotify # to send notifications
-  ];
-
-  systemd.user.services.mako = {
-    Service = { ExecStart = "${pkgs.mako}/bin/mako"; };
-    Install = { WantedBy = [ "sway-session.target" ]; };
-  };
-
-  # All the options are documented via `man 5 mako`
-  programs.mako = {
-    enable = true;
-    layer = "overlay";
-    # The timeout value is in millisecond
-    defaultTimeout = 30000;
-    # The maximum number of notifications
-    maxVisible = 3;
-    maxIconSize = 24;
-    # Enable pango markup (see https://docs.gtk.org/Pango/pango_markup.html)
-    markup = true;
-    actions = true;
-  };
-}
diff --git a/users/fcuny/desktop/wm/screenlock.nix b/users/fcuny/desktop/wm/screenlock.nix
deleted file mode 100644
index 24fde8c..0000000
--- a/users/fcuny/desktop/wm/screenlock.nix
+++ /dev/null
@@ -1,27 +0,0 @@
-{ pkgs, config, ... }:
-
-{
-
-  xdg.configFile."swaylock/config" = {
-    source = ../../configs/swaylock/config;
-  };
-
-  # https://github.com/nix-community/home-manager/pull/2610
-  # won't be needed for ever
-  systemd.user.services.swayidle = {
-    Unit.PartOf = [ "sway-session.target" ];
-    Install.WantedBy = [ "sway-session.target" ];
-
-    Service = {
-      Environment = "PATH=${pkgs.bash}/bin:${config.wayland.windowManager.sway.package}/bin";
-      ExecStart = ''
-        ${pkgs.swayidle}/bin/swayidle -w \
-            timeout 300 "${pkgs.swaylock}/bin/swaylock" \
-            timeout 300 'swaymsg "output * dpms off"' \
-                resume 'swaymsg "output * dpms on"' \
-            before-sleep "${pkgs.swaylock}/bin/swaylock"
-      '';
-      Restart = "on-failure";
-    };
-  };
-}
diff --git a/users/fcuny/desktop/wm/screenshot.nix b/users/fcuny/desktop/wm/screenshot.nix
deleted file mode 100644
index e396cb7..0000000
--- a/users/fcuny/desktop/wm/screenshot.nix
+++ /dev/null
@@ -1,8 +0,0 @@
-{ config, lib, pkgs, ... }:
-
-{
-  home.packages = [
-    pkgs.slurp
-    pkgs.grim
-  ];
-}