Compare commits
8 Commits
d96dda6f0a
...
177b60befa
Author | SHA1 | Date |
---|---|---|
Nathan McCarty | 177b60befa | |
Nathan McCarty | 324f519623 | |
Nathan McCarty | 502518c570 | |
Nathan McCarty | 0d693b1789 | |
Nathan McCarty | 5d9dda884c | |
Nathan McCarty | 146eae6f68 | |
Nathan McCarty | ee50baf6aa | |
Nathan McCarty | 1c0382befa |
|
@ -229,15 +229,16 @@
|
||||||
pname = "discord-electron";
|
pname = "discord-electron";
|
||||||
binaryName = "DiscordCanary";
|
binaryName = "DiscordCanary";
|
||||||
desktopName = "Discord (Wayland)";
|
desktopName = "Discord (Wayland)";
|
||||||
version = "0.0.150";
|
version = "0.0.151";
|
||||||
src = pkgs.fetchurl {
|
src = pkgs.fetchurl {
|
||||||
url =
|
url =
|
||||||
"https://dl-canary.discordapp.net/apps/linux/${version}/discord-canary-${version}.tar.gz";
|
"https://dl-canary.discordapp.net/apps/linux/${version}/discord-canary-${version}.tar.gz";
|
||||||
hash = "sha256-8huDp1u0t9/kZbeB7bPqQUw8+HQ6rIyzKYUVN02gQfo=";
|
hash = "sha256-ZN+lEGtSajgYsyMoGRmyTZCpUGVmb9LKgVv89NA4m7U=";
|
||||||
};
|
};
|
||||||
electron = pkgs.electron_22;
|
electron = pkgs.electron_22;
|
||||||
};
|
};
|
||||||
swayimg = pkgs.callPackage ./packages/swayimg/default.nix { };
|
swayimg = pkgs.callPackage ./packages/swayimg/default.nix { };
|
||||||
|
layman = pkgs.callPackage ./packages/layman/default.nix { };
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,7 @@ in with lib; {
|
||||||
config = mkIf nathan.programs.swaywm.enable (let
|
config = mkIf nathan.programs.swaywm.enable (let
|
||||||
swaylock-command = ''
|
swaylock-command = ''
|
||||||
${pkgs.swaylock-effects}/bin/swaylock --screenshots --grace 30 --indicator --clock --timestr "%-I:%M:%S %p" --datestr "%A %Y-%M-%d" --effect-blur 20x3'';
|
${pkgs.swaylock-effects}/bin/swaylock --screenshots --grace 30 --indicator --clock --timestr "%-I:%M:%S %p" --datestr "%A %Y-%M-%d" --effect-blur 20x3'';
|
||||||
|
layman-package = inputs.self.packages.${pkgs.system}.layman;
|
||||||
in {
|
in {
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
# Locking and display management
|
# Locking and display management
|
||||||
|
@ -41,11 +42,17 @@ in with lib; {
|
||||||
evince
|
evince
|
||||||
# Productivity
|
# Productivity
|
||||||
libreoffice-fresh
|
libreoffice-fresh
|
||||||
|
## Sway addons
|
||||||
|
# sworkstyle - Automatic workspace renaming
|
||||||
|
swayest-workstyle
|
||||||
|
font-awesome
|
||||||
|
layman-package
|
||||||
];
|
];
|
||||||
#########################
|
#########################
|
||||||
## Sway
|
## Sway
|
||||||
#########################
|
#########################
|
||||||
wayland.windowManager.sway = {
|
wayland.windowManager.sway = let modifier = "Mod4";
|
||||||
|
in {
|
||||||
enable = true;
|
enable = true;
|
||||||
systemdIntegration = true;
|
systemdIntegration = true;
|
||||||
wrapperFeatures = {
|
wrapperFeatures = {
|
||||||
|
@ -141,19 +148,18 @@ in with lib; {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
# Setup keybindings
|
# Setup keybindings
|
||||||
keybindings = let modifer = "Mod4";
|
keybindings = lib.mkOptionDefault {
|
||||||
in lib.mkOptionDefault {
|
"${modifier}+q" = "kill";
|
||||||
"${modifer}+q" = "kill";
|
"${modifier}+z" = "exec ${swaylock-command}";
|
||||||
"${modifer}+z" = "exec ${swaylock-command}";
|
|
||||||
## Sreenshot keybinds
|
## Sreenshot keybinds
|
||||||
# Copy area to clipboard
|
# Copy area to clipboard
|
||||||
"${modifer}+x" =
|
"${modifier}+x" =
|
||||||
"exec ${pkgs.sway-contrib.grimshot}/bin/grimshot copy area";
|
"exec ${pkgs.sway-contrib.grimshot}/bin/grimshot copy area";
|
||||||
# Copy window to clipboard
|
# Copy window to clipboard
|
||||||
"${modifer}+Ctrl+x" =
|
"${modifier}+Ctrl+x" =
|
||||||
"exec ${pkgs.sway-contrib.grimshot}/bin/grimshot copy window";
|
"exec ${pkgs.sway-contrib.grimshot}/bin/grimshot copy window";
|
||||||
# Clpy entire output to clipboard
|
# Clpy entire output to clipboard
|
||||||
"${modifer}+Alt+x" =
|
"${modifier}+Alt+x" =
|
||||||
"exec ${pkgs.sway-contrib.grimshot}/bin/grimshot copy output";
|
"exec ${pkgs.sway-contrib.grimshot}/bin/grimshot copy output";
|
||||||
# Make the mute key work
|
# Make the mute key work
|
||||||
"XF86AudioMute" = "exec pactl set-sink-mute @DEFAULT_SINK@ toggle";
|
"XF86AudioMute" = "exec pactl set-sink-mute @DEFAULT_SINK@ toggle";
|
||||||
|
@ -166,16 +172,29 @@ in with lib; {
|
||||||
"XF86AudioPlay" = "exec mpc toggle";
|
"XF86AudioPlay" = "exec mpc toggle";
|
||||||
"XF86AudioNext" = "exec mpc next";
|
"XF86AudioNext" = "exec mpc next";
|
||||||
# Setup scratchpads
|
# Setup scratchpads
|
||||||
"${modifer}+n" =
|
"${modifier}+n" =
|
||||||
"exec sh -c 'swaymsg [app_id=\"emacs\"] scratchpad show'";
|
"exec sh -c 'swaymsg [app_id=\"emacs\"] scratchpad show'";
|
||||||
"${modifer}+m" =
|
"${modifier}+m" =
|
||||||
"exec sh -c 'swaymsg [app_id=\"Alacritty\"] scratchpad show'";
|
"exec sh -c 'swaymsg [app_id=\"Alacritty\"] scratchpad show'";
|
||||||
|
# Rebind movement keys to use layman
|
||||||
|
"${modifier}+Shift+h" = "nop layman move left";
|
||||||
|
"${modifier}+Shift+j" = "nop layman move down";
|
||||||
|
"${modifier}+Shift+k" = "nop layman move up";
|
||||||
|
"${modifier}+Shift+l" = "nop layman move right";
|
||||||
|
# Switch to layman mode
|
||||||
|
"${modifier}+g" = "mode layout";
|
||||||
};
|
};
|
||||||
# Startup applications
|
modes = lib.mkOptionDefault {
|
||||||
startup = [
|
layout = {
|
||||||
# Mako, the notification daemon
|
h = "nop layman none";
|
||||||
{ command = "mako"; }
|
j = "nop layman Autotiling";
|
||||||
];
|
k = "nop layman Grid";
|
||||||
|
l = "nop layman MasterStack";
|
||||||
|
Escape = "mode default";
|
||||||
|
Return = "mode default";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
# Setup a custom mode for layman operations
|
||||||
# Turn on numlock by default
|
# Turn on numlock by default
|
||||||
input = {
|
input = {
|
||||||
"*" = { xkb_numlock = "enable"; };
|
"*" = { xkb_numlock = "enable"; };
|
||||||
|
@ -184,6 +203,76 @@ in with lib; {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
#########################
|
#########################
|
||||||
|
## Sway Addons
|
||||||
|
#########################
|
||||||
|
## swayest_workstyle
|
||||||
|
# first setup the service
|
||||||
|
systemd.user.services.sworkstyle = {
|
||||||
|
Unit = {
|
||||||
|
Description = "sworkstyle - sway workspace renamer";
|
||||||
|
After = [ "graphical-session.target" ];
|
||||||
|
};
|
||||||
|
Service = {
|
||||||
|
Type = "simple";
|
||||||
|
ExecStart = ''
|
||||||
|
${pkgs.swayest-workstyle}/bin/sworkstyle
|
||||||
|
'';
|
||||||
|
Restart = "always";
|
||||||
|
};
|
||||||
|
Install = { WantedBy = [ "graphical-session.target" ]; };
|
||||||
|
};
|
||||||
|
# then setup the configuration
|
||||||
|
xdg.configFile."sworkstyle" = {
|
||||||
|
target = "sworkstyle/config.toml";
|
||||||
|
text = ''
|
||||||
|
[matching]
|
||||||
|
'firefox-beta' = ''
|
||||||
|
'emacs' = ''
|
||||||
|
'signal' = ''
|
||||||
|
'chrome-messages.google.com__web-Default' = ''
|
||||||
|
'chrome-app.cinny.in__-Default' = ''
|
||||||
|
'chrome-messenger.com__-Default' = ''
|
||||||
|
'chrome-localhost__iris_-Default' = ''
|
||||||
|
'org.jellyfin.' = ''
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
## layman
|
||||||
|
# First setup the service
|
||||||
|
systemd.user.services.layman = {
|
||||||
|
Unit = {
|
||||||
|
Description = "layman - sway layout manager";
|
||||||
|
After = [ "graphical-session.target" ];
|
||||||
|
};
|
||||||
|
Service = {
|
||||||
|
Type = "simple";
|
||||||
|
ExecStart = ''
|
||||||
|
${layman-package}/bin/layman
|
||||||
|
'';
|
||||||
|
Restart = "always";
|
||||||
|
};
|
||||||
|
Install = { WantedBy = [ "graphical-session.target" ]; };
|
||||||
|
};
|
||||||
|
# then setup the configuration
|
||||||
|
xdg.configFile."layman" = {
|
||||||
|
target = "layman/config.toml";
|
||||||
|
text = ''
|
||||||
|
# The `layman` section configures options that apply to the layman daemon, and any fallback
|
||||||
|
# values for options not set in a [workspace] or [output] section.
|
||||||
|
[layman]
|
||||||
|
defaultLayout = "none" # The default WLM to assign to a workspace
|
||||||
|
excludedWorkspaces = [] # Numbers of workspaces to be excuded
|
||||||
|
excludedOutputs = [] # Names of outputs to be excuded
|
||||||
|
debug = true # Enable logging debug messages globaly
|
||||||
|
depthLimit = 0 # Autotiling: Default depth limit (disabled) for all workspaces
|
||||||
|
stackLayout = "splitv" # MasterStack: Default stack layout for all workspaces
|
||||||
|
stackSidet = "left" # MasterStack: Default stack position for all workspaces
|
||||||
|
masterWidth = 65 # MasterStack: Default master width for all workspaces
|
||||||
|
'';
|
||||||
|
onChange = ''
|
||||||
|
${layman-package}/bin/layman || true
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
#########################
|
||||||
## Mako (notifications)
|
## Mako (notifications)
|
||||||
#########################
|
#########################
|
||||||
programs.mako = {
|
programs.mako = {
|
||||||
|
@ -208,6 +297,20 @@ in with lib; {
|
||||||
defaultTimeout = 0;
|
defaultTimeout = 0;
|
||||||
ignoreTimeout = true;
|
ignoreTimeout = true;
|
||||||
};
|
};
|
||||||
|
systemd.user.services.mako = {
|
||||||
|
Unit = {
|
||||||
|
Description = "mako notification daemon";
|
||||||
|
After = [ "graphical-session.target" ];
|
||||||
|
};
|
||||||
|
Service = {
|
||||||
|
Type = "simple";
|
||||||
|
ExecStart = ''
|
||||||
|
${pkgs.mako}/bin/mako
|
||||||
|
'';
|
||||||
|
Restart = "always";
|
||||||
|
};
|
||||||
|
Install = { WantedBy = [ "graphical-session.target" ]; };
|
||||||
|
};
|
||||||
#########################
|
#########################
|
||||||
## Swayidle
|
## Swayidle
|
||||||
#########################
|
#########################
|
||||||
|
|
|
@ -26,16 +26,32 @@
|
||||||
};
|
};
|
||||||
input = { "type:pointer" = { pointer_accel = "-0.3"; }; };
|
input = { "type:pointer" = { pointer_accel = "-0.3"; }; };
|
||||||
startup = [
|
startup = [
|
||||||
# GLPaper
|
|
||||||
# { command = "glpaper DP-1 ${../../custom-files/sway/selen.frag} --fork"; }
|
|
||||||
{
|
|
||||||
command = "glpaper DP-1 ${../../custom-files/sway/selen.frag} --fork";
|
|
||||||
}
|
|
||||||
# Up the mouse dpi
|
# Up the mouse dpi
|
||||||
{ command = "solaar config 1 dpi 4000"; }
|
{ command = "solaar config 1 dpi 4000"; }
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Sway background
|
||||||
|
|
||||||
|
# Spin up glpaper as a user service so we can have it restart on failure (liable due to kvm switch
|
||||||
|
# disconnecting input)
|
||||||
|
systemd.user.services.glpaper-dp1 = {
|
||||||
|
Unit = {
|
||||||
|
Description = "glpaper (DP-1)";
|
||||||
|
After = [ "graphical-session.target" ];
|
||||||
|
};
|
||||||
|
Service = {
|
||||||
|
Type = "simple";
|
||||||
|
ExecStart = ''
|
||||||
|
/etc/profiles/per-user/nathan/bin/glpaper DP-1 ${
|
||||||
|
../../custom-files/sway/selen.frag
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
Restart = "always";
|
||||||
|
};
|
||||||
|
Install = { WantedBy = [ "graphical-session.target" ]; };
|
||||||
|
};
|
||||||
|
|
||||||
# Gammastep
|
# Gammastep
|
||||||
services.gammastep = {
|
services.gammastep = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
# https://github.com/Admicos/minecraft-wayland
|
||||||
{ stdenv, lib, fetchzip, cmake, libGL, libXrandr, libXinerama, libXcursor
|
{ stdenv, lib, fetchzip, cmake, libGL, libXrandr, libXinerama, libXcursor
|
||||||
, libX11, libXi, libXext, extra-cmake-modules, wayland, wayland-protocols
|
, libX11, libXi, libXext, extra-cmake-modules, wayland, wayland-protocols
|
||||||
, libxkbcommon }:
|
, libxkbcommon }:
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
{ pkgs, lib, pythonPkgs ? pkgs.python311Packages }:
|
||||||
|
let
|
||||||
|
inherit pythonPkgs;
|
||||||
|
f = { buildPythonPackage, i3ipc, setproctitle, tomli, setuptools }:
|
||||||
|
buildPythonPackage rec {
|
||||||
|
pname = "layman";
|
||||||
|
version = "0.0.1";
|
||||||
|
format = "pyproject";
|
||||||
|
src = pkgs.fetchFromGitHub {
|
||||||
|
owner = "frap129";
|
||||||
|
repo = "layman";
|
||||||
|
rev = "c827811d71461d9190c3f5d0d00d339d74ff3407";
|
||||||
|
hash = "sha256-Z8gliSEZgFtOtCZf51J79SqMTHOEd2zwtv0tFiXWn8k=";
|
||||||
|
};
|
||||||
|
nativeBuildInputs = [ setuptools ];
|
||||||
|
propagatedBuildInputs = [ i3ipc setproctitle tomli ];
|
||||||
|
};
|
||||||
|
in pythonPkgs.callPackage f { }
|
|
@ -5,12 +5,12 @@
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "swayimg";
|
pname = "swayimg";
|
||||||
version = "1.9";
|
version = "1.11";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url =
|
url =
|
||||||
"https://github.com/artemsen/swayimg/archive/refs/tags/v${version}.tar.gz";
|
"https://github.com/artemsen/swayimg/archive/refs/tags/v${version}.tar.gz";
|
||||||
sha256 = "sha256-aTojp3VevtsUQnGytnSYChxRogNtq8/5aXw+PGJY8Qg=";
|
hash = "sha256-t4U0F8rzySgZUQdkTfMbqAqQb8PsyhgNsoQau/rCdzY=";
|
||||||
name = "${pname}-${version}.tar.gz";
|
name = "${pname}-${version}.tar.gz";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue