Skip to content

Commit

Permalink
sway: add input patch
Browse files Browse the repository at this point in the history
  • Loading branch information
ocfox committed Sep 12, 2023
1 parent 39fdc2d commit e4920ed
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 7 deletions.
14 changes: 14 additions & 0 deletions home-desktop/_pkgs/sway-im.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{ pkgs }:
pkgs.sway-unwrapped.overrideAttrs (old: {
patches = old.patches or [ ] ++ [
(pkgs.fetchpatch {
url = "https://aur.archlinux.org/cgit/aur.git/plain/0001-text_input-Implement-input-method-popups.patch?h=sway-im&id=9bba3fb267a088cca6fc59391ab45ebee654ada1";
hash = "sha256-xrBnQhtA6LgyW0e0wKwymlMvx/JfrjBidq1a3GFKzZo=";
})

(pkgs.fetchpatch {
url = "https://aur.archlinux.org/cgit/aur.git/plain/0002-backport-sway-im-to-v1.8.patch?h=sway-im&id=9bba3fb267a088cca6fc59391ab45ebee654ada1";
hash = "sha256-IpyipHgoXl7vVmBpBULiS6WtieMfkeARB+930Fl+51c=";
})
];
})
4 changes: 3 additions & 1 deletion home-desktop/programs/waybar/settings.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ in
"modules-left" = [
"sway/workspaces"
"temperature"
"sway/window"
"custom/music"
];
"modules-center" = [
"sway/window"
];
"modules-right" = [
"tray"
"idle_inhibitor"
Expand Down
26 changes: 20 additions & 6 deletions home-desktop/wayland/windowManager/sway.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
, pkgs
}: {
enable = true;
package = pkgs.sway-unwrapped;
package = root.pkgs.sway-im;

wrapperFeatures.gtk = true;
config = {
Expand All @@ -26,22 +26,36 @@

output =
let
inherit (root.pkgs) wallpapers;
inherit (root.pkgs.wallpapers.cowboyBebop) bebop op;
in
{
DP-1 = {
bg = "${wallpapers.door} fill";
bg = "${op} fill";
mode = "3840x2160";
position = "0 0";
# position = "0 0";
scale = "3";
};

HDMI-A-1 = {
bg = "${bebop} fill";
mode = "1920x1080";
position = "0 0";
scale = "1.5";
};
};

defaultWorkspace = "1";

window = {
titlebar = false;
hideEdgeBorders = "smart";
};

workspaceOutputAssign = [{
output = "HDMI-A-1";
workspace = "9";
}];

keybindings =
let
modifier = config.wayland.windowManager.sway.config.modifier;
Expand All @@ -58,8 +72,8 @@
"${modifier}+Shift+u" = "exec pamixer -i 10";
"${modifier}+Shift+d" = "exec pamixer -d 10";
"${modifier}+Shift+e" = "exec ${lib.getExe powermenu}";
"${modifier}+Return" = "exec ${lib.getExe pkgs.alacritty}";
"${modifier}+o" = "exec ${pkgs.bemenu}/bin/bemenu-run -c -l 15 -W 0.3";
"${modifier}+Return" = "exec ${lib.getExe' pkgs.alacritty "alacritty"}";
"${modifier}+o" = "exec ${lib.getExe' pkgs.kickoff "kickoff"}";
"${modifier}+space" = "floating toggle";
"${modifier}+Shift+space" = null;
"${modifier}+Shift+s" = "exec ${pkgs.sway-contrib.grimshot}/bin/grimshot copy area";
Expand Down

0 comments on commit e4920ed

Please sign in to comment.