Compare commits

..

No commits in common. "177b60befa15ff7f0d73fee6cdb48c55bc4d4bba" and "d96dda6f0a963a9b632db66450a0ef8276cbe271" have entirely different histories.

7 changed files with 25 additions and 164 deletions

View File

@ -229,16 +229,15 @@
pname = "discord-electron"; pname = "discord-electron";
binaryName = "DiscordCanary"; binaryName = "DiscordCanary";
desktopName = "Discord (Wayland)"; desktopName = "Discord (Wayland)";
version = "0.0.151"; version = "0.0.150";
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-ZN+lEGtSajgYsyMoGRmyTZCpUGVmb9LKgVv89NA4m7U="; hash = "sha256-8huDp1u0t9/kZbeB7bPqQUw8+HQ6rIyzKYUVN02gQfo=";
}; };
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 { };
}; };
}); });
} }

View File

@ -4,7 +4,6 @@ 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
@ -42,17 +41,11 @@ 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 = let modifier = "Mod4"; wayland.windowManager.sway = {
in {
enable = true; enable = true;
systemdIntegration = true; systemdIntegration = true;
wrapperFeatures = { wrapperFeatures = {
@ -148,18 +141,19 @@ in with lib; {
}; };
}; };
# Setup keybindings # Setup keybindings
keybindings = lib.mkOptionDefault { keybindings = let modifer = "Mod4";
"${modifier}+q" = "kill"; in lib.mkOptionDefault {
"${modifier}+z" = "exec ${swaylock-command}"; "${modifer}+q" = "kill";
"${modifer}+z" = "exec ${swaylock-command}";
## Sreenshot keybinds ## Sreenshot keybinds
# Copy area to clipboard # Copy area to clipboard
"${modifier}+x" = "${modifer}+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
"${modifier}+Ctrl+x" = "${modifer}+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
"${modifier}+Alt+x" = "${modifer}+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";
@ -172,29 +166,16 @@ in with lib; {
"XF86AudioPlay" = "exec mpc toggle"; "XF86AudioPlay" = "exec mpc toggle";
"XF86AudioNext" = "exec mpc next"; "XF86AudioNext" = "exec mpc next";
# Setup scratchpads # Setup scratchpads
"${modifier}+n" = "${modifer}+n" =
"exec sh -c 'swaymsg [app_id=\"emacs\"] scratchpad show'"; "exec sh -c 'swaymsg [app_id=\"emacs\"] scratchpad show'";
"${modifier}+m" = "${modifer}+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";
}; };
modes = lib.mkOptionDefault { # Startup applications
layout = { startup = [
h = "nop layman none"; # Mako, the notification daemon
j = "nop layman Autotiling"; { command = "mako"; }
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"; };
@ -203,76 +184,6 @@ 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 = {
@ -297,20 +208,6 @@ 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
######################### #########################

View File

@ -26,32 +26,16 @@
}; };
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;

View File

@ -1,4 +1,3 @@
# 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 }:

View File

@ -1,18 +0,0 @@
{ 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 { }

View File

@ -5,12 +5,12 @@
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
pname = "swayimg"; pname = "swayimg";
version = "1.11"; version = "1.9";
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";
hash = "sha256-t4U0F8rzySgZUQdkTfMbqAqQb8PsyhgNsoQau/rCdzY="; sha256 = "sha256-aTojp3VevtsUQnGytnSYChxRogNtq8/5aXw+PGJY8Qg=";
name = "${pname}-${version}.tar.gz"; name = "${pname}-${version}.tar.gz";
}; };