sway, fix screensharing (again)
This commit is contained in:
parent
6aa649eb01
commit
ec8358fe55
5 changed files with 98 additions and 29 deletions
|
|
@ -1,4 +1,4 @@
|
|||
{ config, pkgs, user, name, editor, ... }:
|
||||
{ config, pkgs, user, name, lib, ... }:
|
||||
# https://nix-community.github.io/home-manager/options.html
|
||||
let
|
||||
my-deps = {
|
||||
|
|
@ -14,6 +14,7 @@ let
|
|||
wc = "${pkgs.coreutils}/bin/wc";
|
||||
xargs = "${pkgs.findutils}/bin/xargs";
|
||||
menu = "${pkgs.wofi}/bin/wofi --dmenu";
|
||||
fileman = "${pkgs.pcmanfm}/bin/pcmanfm";
|
||||
};
|
||||
my-scripts = {
|
||||
play-pause = (pkgs.writeShellScriptBin "play-pause" ''
|
||||
|
|
@ -151,6 +152,7 @@ in
|
|||
input {
|
||||
kb_layout = gb
|
||||
kb_options = caps:escape
|
||||
kb_numpad = enable
|
||||
|
||||
touchpad {
|
||||
natural_scroll = yes
|
||||
|
|
@ -272,7 +274,7 @@ in
|
|||
};
|
||||
battery = {
|
||||
format = "{icon} {capacity}%";
|
||||
format-icons = [ "🤏" "🪫" "🔋" ];
|
||||
format-icons = [ "🤏" "🪫" "🔋" "🔋" ];
|
||||
states = {
|
||||
warning = 30;
|
||||
critical = 15;
|
||||
|
|
@ -282,7 +284,7 @@ in
|
|||
};
|
||||
programs.waybar.systemd = {
|
||||
enable = true;
|
||||
target = "hyprland-session.target";
|
||||
target = "graphical-session.target";
|
||||
};
|
||||
|
||||
services.udiskie = {
|
||||
|
|
@ -813,5 +815,46 @@ color body red default "([a-z][a-z0-9+-]*://(((([a-z0-9_.!~*'();:&=+$,-]|%[0-9a-
|
|||
indicator = true;
|
||||
};
|
||||
|
||||
wayland.windowManager.sway = {
|
||||
config = {
|
||||
modifier = "Mod4";
|
||||
input = {
|
||||
"type:keyboard" = {
|
||||
xkb_layout = "gb";
|
||||
xkb_options = "caps:escape";
|
||||
xkb_numlock = "enable";
|
||||
};
|
||||
"type:touchpad" = {
|
||||
natural_scroll = "enabled";
|
||||
tap = "enabled";
|
||||
};
|
||||
};
|
||||
gaps = {
|
||||
inner = 10;
|
||||
};
|
||||
keybindings = let
|
||||
modifier = config.wayland.windowManager.sway.config.modifier;
|
||||
in lib.mkOptionDefault {
|
||||
"${modifier}+Shift+x" = "kill";
|
||||
"${modifier}+d" = "exec ${pkgs.wofi}/bin/wofi --show drun";
|
||||
"${modifier}+o" = "exec ${my-deps.fileman}";
|
||||
XF86AudioRaiseVolume = "exec ${ my-deps.amixer } sset Master 5%+ && ${ my-deps.amixer } sset Master unmute";
|
||||
XF86AudioLowerVolume = "exec ${ my-deps.amixer } sset Master 5%-";
|
||||
XF86AudioPlay = "exec ${ my-scripts.play-pause }/bin/play-pause";
|
||||
XF86AudioNext = "exec ${ my-deps.playerctl } next";
|
||||
XF86AudioPrev = "exec ${ my-deps.playerctl } previous";
|
||||
XF86MonBrightnessUp = "exec ${ my-scripts.brightness-up }/bin/brightness-up";
|
||||
XF86MonBrightnessDown = "exec ${ my-scripts.brightness-down }/bin/brightness-down";
|
||||
"${modifier}+P" = "exec ${ my-scripts.bwmenu }/bin/bwmenu";
|
||||
"${modifier}+SHIFT+P" = "exec ${ my-scripts.bwotpmenu }/bin/bwotpmenu";
|
||||
"${modifier}+SHIFT+S" = "exec ${ my-scripts.screenshot }/bin/screenshot";
|
||||
"${modifier}+M" = "exec ${ my-deps.terminal } -e ncmpcpp";
|
||||
"${modifier}+C" = "exec ${ my-scripts.open-code }/bin/open-code";
|
||||
"${modifier}+Z" = "exec ${pkgs.swaylock-effects}/bin/swaylock -f";
|
||||
};
|
||||
bars = [];
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@
|
|||
services.dbus.enable = true;
|
||||
programs.light.enable = true;
|
||||
programs.dconf.enable = true;
|
||||
programs.hyprland.enable = true;
|
||||
programs.sway.enable = true;
|
||||
|
||||
programs.tmux.enable = true;
|
||||
programs.tmux.extraConfig = ''
|
||||
|
|
|
|||
|
|
@ -1,8 +1,5 @@
|
|||
{ config, pkgs, user, name, lib, ... }:
|
||||
# https://nix-community.github.io/home-manager/options.html
|
||||
let
|
||||
brave-nightly = pkgs.callPackage ../../custom/brave-nightly/. { };
|
||||
in
|
||||
{
|
||||
# don't change
|
||||
home.stateVersion = "22.05";
|
||||
|
|
@ -20,12 +17,12 @@ in
|
|||
ansible
|
||||
thunderbird
|
||||
(pkgs.writeShellScriptBin "my-editor" ''
|
||||
code $@
|
||||
${pkgs.vscode}/bin/code --ozone-platform-hint=auto --enable-features=WaylandWindowDecorations $@
|
||||
'')
|
||||
(pkgs.makeDesktopItem {
|
||||
name = "teams";
|
||||
desktopName = "Microsoft Teams";
|
||||
exec = "${brave-nightly}/opt/brave.com/brave-nightly/brave-browser-nightly --app-id=cifhbcnohmdccbgoicgdjpfamggdegmo --ozone-platform-hint=auto --enable-features=WaylandWindowDecorations,WebRTCPipeWireCapturer";
|
||||
exec = "${brave}/opt/brave.com/brave/brave-browser --app-id=cifhbcnohmdccbgoicgdjpfamggdegmo --ozone-platform-hint=auto --enable-features=WaylandWindowDecorations,WebRTCPipeWireCapturer";
|
||||
icon = "brave-cifhbcnohmdccbgoicgdjpfamggdegmo-Default";
|
||||
})
|
||||
(pkgs.makeDesktopItem {
|
||||
|
|
@ -51,7 +48,7 @@ in
|
|||
## work laptop configuration
|
||||
exec-once = ${pkgs.swaybg}/bin/swaybg -o eDP-1 -i ~/Pictures/backgrounds/nix-wallpaper-simple-red.png &
|
||||
|
||||
monitor = ,preferred,auto, 1.2
|
||||
monitor = eDP-1, preferred, 0x0, 1.2
|
||||
workspace = eDP-1, 5
|
||||
|
||||
input {
|
||||
|
|
@ -83,4 +80,21 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
# xdph + chromium = ):
|
||||
wayland.windowManager.hyprland.enable = lib.mkForce false;
|
||||
wayland.windowManager.sway.enable = true;
|
||||
wayland.windowManager.sway.config = {
|
||||
input = {
|
||||
"type:keyboard" = {
|
||||
xkb_variant = "dvorak";
|
||||
};
|
||||
};
|
||||
output = {
|
||||
eDP-1 = {
|
||||
scale = "1.2";
|
||||
bg = "~/Pictures/backgrounds/nix-wallpaper-watersplash.png fill";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@
|
|||
"vscode"
|
||||
];
|
||||
|
||||
services.tailscale.enable = true;
|
||||
|
||||
networking = {
|
||||
networkmanager = {
|
||||
|
|
@ -69,15 +70,25 @@
|
|||
];
|
||||
|
||||
# dangerous
|
||||
users.users.tristan.extraGroups = [ "docker" ];
|
||||
# users.users.tristan.extraGroups = [ "docker" ];
|
||||
|
||||
virtualisation.docker = {
|
||||
enable = true;
|
||||
storageDriver = "btrfs";
|
||||
# rootless = {
|
||||
# enable = true;
|
||||
# setSocketVariable = true;
|
||||
# };
|
||||
rootless = {
|
||||
enable = true;
|
||||
setSocketVariable = true;
|
||||
};
|
||||
};
|
||||
|
||||
services.greetd = {
|
||||
settings = rec {
|
||||
sway_session = {
|
||||
command = "sway";
|
||||
user = "tristan";
|
||||
};
|
||||
default_session = lib.mkForce sway_session;
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue