Removed sway.

I've run into a few to many UI issue. I've been using sway for a while,
but & it has gotten a lot better, but its still kind of rough around the
edges in some spots. I may switch back at some time in the future.
This commit is contained in:
James Patrick 2022-07-12 22:24:13 -04:00
parent 3e37d6a60d
commit 3285dbdd7b
10 changed files with 6 additions and 278 deletions

View File

@ -14,6 +14,5 @@
./zeal.nix ./zeal.nix
./i3 ./i3
./sway
]; ];
} }

View File

@ -1,13 +1,12 @@
{ options, config, lib, pkgs, ... }: { options, config, lib, pkgs, ... }:
let let
cfg = config.this.application.dunst; cfg = config.this.application.dunst;
sway = config.this.application.sway;
i3 = config.this.application.i3; i3 = config.this.application.i3;
graphical = config.this.graphical; graphical = config.this.graphical;
in with lib; { in with lib; {
options = { options = {
this.application.dunst.enable = mkOption { this.application.dunst.enable = mkOption {
default = i3.enable || sway.enable; default = i3.enable;
type = with types; bool; type = with types; bool;
}; };
}; };
@ -81,7 +80,7 @@ in with lib; {
systemd.user.services.dunst = { systemd.user.services.dunst = {
enable = true; enable = true;
description = "Notifications "; description = "Notifications ";
wantedBy = [ "sway-session.target" ]; wantedBy = [ "i3-session.target" ];
partOf = [ "graphical-session.target" ]; partOf = [ "graphical-session.target" ];
serviceConfig = { serviceConfig = {
ExecStart = "${pkgs.dunst}/bin/dunst"; ExecStart = "${pkgs.dunst}/bin/dunst";

View File

@ -2,7 +2,6 @@
let let
cfg = config.this.application.firefox; cfg = config.this.application.firefox;
graphical = config.this.graphical; graphical = config.this.graphical;
sway_cfg = config.this.application.sway;
in with lib; { in with lib; {
options = { options = {
this.application.firefox.enable = mkOption { this.application.firefox.enable = mkOption {
@ -18,12 +17,8 @@ in with lib; {
home-manager.users.james = { home-manager.users.james = {
programs.firefox = { programs.firefox = {
enable = true; enable = true;
package = pkgs.firefox.override { package =
cfg = { pkgs.firefox.override { cfg = { enableTridactylNative = true; }; };
enableTridactylNative = true;
forceWayland = sway_cfg.enable;
};
};
extensions = with pkgs.nur.repos.rycee.firefox-addons; [ extensions = with pkgs.nur.repos.rycee.firefox-addons; [
https-everywhere https-everywhere

View File

@ -1,12 +1,11 @@
{ options, config, lib, pkgs, ... }: { options, config, lib, pkgs, ... }:
let let
cfg = config.this.application.gammastep; cfg = config.this.application.gammastep;
sway = config.this.application.sway;
i3 = config.this.application.i3; i3 = config.this.application.i3;
in with lib; { in with lib; {
options = { options = {
this.application.gammastep.enable = mkOption { this.application.gammastep.enable = mkOption {
default = i3.enable || sway.enable; default = i3.enable;
type = with types; bool; type = with types; bool;
}; };
}; };
@ -25,7 +24,7 @@ in with lib; {
systemd.user.services.gammastep = { systemd.user.services.gammastep = {
enable = true; enable = true;
description = "Nightly color shifting"; description = "Nightly color shifting";
wantedBy = [ "sway-session.target" "i3-session.target" ]; wantedBy = [ "i3-session.target" ];
partOf = [ "graphical-session.target" ]; partOf = [ "graphical-session.target" ];
serviceConfig = { serviceConfig = {
ExecStart = '' ExecStart = ''

View File

@ -1 +0,0 @@
{ config, pkgs, ... }: { imports = [ ./sway.nix ./mako.nix ./waybar.nix ]; }

View File

@ -1,65 +0,0 @@
{ options, config, lib, pkgs, ... }:
let
cfg = config.this.application.mako;
sway = config.this.application.sway;
in with lib; {
options = {
this.application.mako.enable = mkOption {
default = false;
type = with types; bool;
description = "testing one two three";
};
};
config = mkIf cfg.enable {
home-manager.users.james = {
systemd.user.startServices = true;
programs.mako = {
enable = true;
width = 450;
padding = "20,20";
backgroundColor = "#161720ee";
borderColor = "#12151a";
textColor = "#d6e5fb";
defaultTimeout = 8000;
progressColor = "over #d6e5fb";
layer = "overlay";
groupBy = "summary";
extraConfig = ''
[hidden]
background-color=#bfbfbfff
format=+ %h
[urgency=high]
background-color=#1f212eee
border-color=#f0185a00
text-color=#f0185a
ignore-timeout=true
default-timeout=0
[!expiring]
background-color=#555555ff
text-color=#eeeeeeff
[grouped]
format=<b>%s</b> %g\n%b
'';
};
home.packages = with pkgs; [ libnotify ];
};
systemd.user.services.mako = {
enable = true;
description = "Mako foo";
wantedBy = [ "sway-session.target" ];
partOf = [ "graphical-session.target" ];
serviceConfig = {
ExecStart = ''
${pkgs.mako}/bin/mako
'';
RestartSec = 5;
Restart = "always";
};
};
};
}

View File

@ -1,168 +0,0 @@
{ config, lib, pkgs, ... }:
let
cfg = config.this.application.sway;
power = config.this.system.power;
graphical = config.this.graphical;
modifier = "Mod4";
wallpaper = pkgs.fetchurl {
url =
"https://raw.githubusercontent.com/catppuccin/wallpapers/main/landscapes/evening-sky.png";
sha256 = "sha256-fYMzoY3un4qGOSR4DMqVUAFmGGil+wUze31rLLrjcAc=";
};
in with lib; {
options = {
this.application.sway.enable = mkOption {
default = false;
type = with types; bool;
};
};
config = mkIf cfg.enable {
home-manager.users.james = {
home.sessionVariables = { XDG_CURRENT_DESKTOP = "sway"; };
systemd.user.sessionVariables = { XDG_CURRENT_DESKTOP = "sway"; };
wayland.windowManager.sway = {
enable = true;
package = null;
wrapperFeatures.gtk = true;
config = {
# bars = [ ];
colors = {
focusedInactive = {
background = "#1E1E2E";
border = "#1E1E2E";
childBorder = "#1E1E2E";
indicator = "#1E1E2E";
text = "#C9CBFF";
};
unfocused = {
background = "#1E1E2E";
border = "#1E1E2E";
childBorder = "#1E1E2E";
indicator = "#1E1E2E";
text = "#C9CBFF";
};
focused = {
background = "#131020";
border = "#131020";
childBorder = "#131020";
indicator = "#131020";
text = "#ABE9B3";
};
urgent = {
background = "#F28FAD";
border = "#F28FAD";
childBorder = "#F28FAD";
indicator = "#F28FAD";
text = "#ABE9B3";
};
};
fonts = {
names = [ "Alegreya" "FontAwesome" ];
size = 9.0;
};
input = {
"1133:45079:MX_Master_Mouse" = {
natural_scroll = "enable";
accel_profile = "adaptive";
pointer_accel = "-0.3";
};
"1:1:AT_Translated_Set_2_keyboard" = {
xkb_options = "ctrl:nocaps";
};
"2:7:SynPS/2_Synaptics_TouchPad" = {
dwt = "enabled";
click_method = "clickfinger";
natural_scroll = "enabled";
middle_emulation = "enabled";
};
};
gaps = {
inner = 5;
outer = 2;
};
# And import and scripts as scene here would be good.
keybindings = mkOptionDefault {
"${modifier}+q" = "kill";
"${modifier}+d" = "focus mode_toggle";
"${modifier}+a" = "focus parent";
"${modifier}+shift+s" = "sticky toggle";
"${modifier}+shift+f" = "floating toggle";
"${modifier}+space" =
"exec $(${pkgs.dmenu}/bin/dmenu_path | ${pkgs.dmenu}/bin/dmenu)";
Pause = "exec ${pkgs.playerctl}/bin/playerctl play-pause";
XF86AudioLowerVolume = "exec ${pkgs.volume-sh}/bin/volume.sh down";
XF86AudioMute = "exec ${pkgs.volume-sh}/bin/volume.sh mute";
XF86AudioRaiseVolume = "exec ${pkgs.volume-sh}/bin/volume.sh up";
XF86MonBrightnessDown =
"exec ${pkgs.brightness-sh}/bin/brightness.sh down";
XF86MonBrightnessUp =
"exec ${pkgs.brightness-sh}/bin/brightness.sh up";
};
# https://github.com/gytis-ivaskevicius/nixfiles/blob/master/home-manager/i3-sway.nix
modifier = "Mod4";
output = { "eDP-1" = { bg = "${wallpaper} fill"; }; };
terminal = "${pkgs.kitty}/bin/kitty";
# https://rycee.gitlab.io/home-manager/options.html#opt-wayland.windowManager.sway.config.window.commands
# window = { };
startup = [{ command = "${pkgs.autotiling}/bin/autotiling"; }];
};
};
home.packages = with pkgs; [
autotiling
brightness-sh
dmenu
grim
imagemagick
playerctl
slurp
sway-entry
swayidle
swaylock
volume-sh
wl-clipboard
wofi
];
};
programs.light.enable = true;
programs.sway = {
enable = true;
wrapperFeatures.gtk = true;
};
systemd.user = {
targets.sway-session = {
description = "Sway compositor session";
documentation = [ "man:systemd.special(7)" ];
bindsTo = [ "graphical-session.target" ];
wants = [ "graphical-session-pre.target" ];
after = [ "graphical-session-pre.target" ];
};
services.sway = {
enable = true;
description = "Sway - Wayland window manager";
documentation = [ "man:sway(5)" ];
bindsTo = [ "default.target" ];
wants = [ "graphical-session-pre.target" ];
after = [ "graphical-session-pre.target" ];
environment.PATH = lib.mkForce null;
serviceConfig = {
Type = "simple";
ExecStart =
"${pkgs.dbus}/bin/dbus-run-session ${pkgs.sway}/bin/sway --debug";
ExecStopPost =
"/usr/bin/env systemctl --user unset-environment SWAYSOCK DISPLAY I3SOCK WAYLAND_DISPLAY";
NotifyAccess = "all";
Restart = "on-failure";
RestartSec = 1;
TimeoutStopSec = 10;
};
};
};
users.users.james.extraGroups = [ "video" "audio" ];
};
}

View File

@ -1,17 +0,0 @@
{ options, config, lib, pkgs, ... }:
let
cfg = config.this.application.waybar;
sway_cfg = config.this.application.sway;
in with lib; {
options = {
this.application.waybar.enable = mkOption {
default = sway_cfg.enable;
type = with types; bool;
description = "testing one two three";
};
};
config = mkIf cfg.enable {
home-manager.users.james = { home.packages = with pkgs; [ waybar ]; };
};
}

View File

@ -1,6 +1,5 @@
self: super: { self: super: {
brightness-sh = super.callPackage ./brightness.nix { inherit super; }; brightness-sh = super.callPackage ./brightness.nix { inherit super; };
battery-notify = super.callPackage ./battery-notify.nix { inherit super; }; battery-notify = super.callPackage ./battery-notify.nix { inherit super; };
sway-entry = super.callPackage ./sway-entry.nix { inherit super; };
volume-sh = super.callPackage ./volume.nix { inherit super; }; volume-sh = super.callPackage ./volume.nix { inherit super; };
} }

View File

@ -1,12 +0,0 @@
{ pkgs, ... }:
let
in pkgs.writeShellScriptBin "sway-entry" ''
#! ${pkgs.bash}/bin/bash
# first import environment variables from the login manager
# function is currently deprecated. It should be rolled back in the future
systemctl --user import-environment
# then start the service
exec systemctl --user start sway.service
''