use sway on 480

This commit is contained in:
Cyryl Płotnicki 2023-01-11 12:00:28 +00:00
parent 32db0e9ada
commit c88042de6a
3 changed files with 42 additions and 34 deletions

View file

@ -11,9 +11,9 @@
../../distributed-builds.nix ../../distributed-builds.nix
../../git ../../git
../../gui ../../gui
../../i3
../../libvirt.nix ../../libvirt.nix
../../mercurial ../../mercurial
../../sway
]; ];
fileSystems."/" = { options = [ "compress=zstd" ]; }; fileSystems."/" = { options = [ "compress=zstd" ]; };

View file

@ -1,14 +1,11 @@
{ { config, pkgs, ... }:
config, let mod = "Mod4";
pkgs,
...
}: let
mod = "Mod4";
in { in {
services.dbus.packages = with pkgs; [gnome2.GConf gnome3.dconf]; services.dbus.packages = with pkgs; [ ];
programs.dconf.enable = true; programs.dconf.enable = true;
programs.qt5ct.enable = true;
systemd.defaultUnit = "graphical.target"; systemd.defaultUnit = "graphical.target";
security.polkit.enable = true;
qt5.platformTheme = "qt5ct";
environment.loginShellInit = '' environment.loginShellInit = ''
if [ -z $DISPLAY ] && [ "$(tty)" = "/dev/tty1" ]; then if [ -z $DISPLAY ] && [ "$(tty)" = "/dev/tty1" ]; then
@ -16,10 +13,20 @@ in {
fi fi
''; '';
home-manager.users.cyryl = {...}: { home-manager.users.cyryl = { ... }: {
programs.mako.enable = true; programs.mako.enable = true;
imports = [./keybindings.nix]; imports = [ ./keybindings.nix ../home-manager/programs/alacritty.nix ];
home.pointerCursor = {
name = "Adwaita";
package = pkgs.gnome.adwaita-icon-theme;
size = 24;
x11 = {
enable = true;
defaultCursor = "Adwaita";
};
};
home.sessionVariables = { home.sessionVariables = {
XDG_CURRENT_DESKTOP = "Unity"; XDG_CURRENT_DESKTOP = "Unity";
@ -59,24 +66,23 @@ in {
config = { config = {
modifier = "${mod}"; modifier = "${mod}";
menu = "${pkgs.wofi}/bin/wofi --show drun,run"; menu = "${pkgs.wofi}/bin/wofi --show drun,run";
terminal = "${pkgs.kitty}/bin/kitty"; terminal = "${pkgs.alacritty}/bin/alacritty";
workspaceLayout = "tabbed"; workspaceLayout = "tabbed";
window = { window = {
hideEdgeBorders = "both"; hideEdgeBorders = "both";
titlebar = false; titlebar = false;
border = 0; border = 0;
}; };
bars = [ bars = [{
{ position = "top";
position = "top"; command = "${pkgs.waybar}/bin/waybar";
command = "${pkgs.waybar}/bin/waybar"; }];
}
];
startup = [ startup = [
{ {
command = "${pkgs.wl-clipboard}/bin/wl-paste -t text --watch ${pkgs.clipman}/bin/clipman store"; command =
"${pkgs.wl-clipboard}/bin/wl-paste -t text --watch ${pkgs.clipman}/bin/clipman store";
} }
{command = "${pkgs.clipman}/bin/clipman restore";} { command = "${pkgs.clipman}/bin/clipman restore"; }
{ {
command = '' command = ''
swayidle -w timeout 300 'swaylock -f -c 000000' timeout 600 'swaymsg "output * dpms off" && systemctl suspend' resume 'swaymsg "output * dpms on"' before-sleep 'swaylock -f -c 657b83' swayidle -w timeout 300 'swaylock -f -c 000000' timeout 600 'swaymsg "output * dpms off" && systemctl suspend' resume 'swaymsg "output * dpms on"' before-sleep 'swaylock -f -c 657b83'
@ -88,7 +94,7 @@ in {
xkb_layout = "pl"; xkb_layout = "pl";
xkb_options = "caps:ctrl_modifier"; xkb_options = "caps:ctrl_modifier";
}; };
input."2:7:SynPS/2_Synaptics_TouchPad" = {tap = "enabled";}; input."2:7:SynPS/2_Synaptics_TouchPad" = { tap = "enabled"; };
}; };
}; };
}; };

View file

@ -1,23 +1,25 @@
{ { config, pkgs, ... }:
config, let mod = "Mod4";
pkgs,
...
}: let
mod = "Mod4";
in { in {
wayland.windowManager.sway.config.keybindings = { wayland.windowManager.sway.config.keybindings = {
"${mod}+Shift+e" = "exit"; "${mod}+Shift+e" = "exit";
"${mod}+Shift+r" = "reload"; "${mod}+Shift+r" = "reload";
"${mod}+Shift+l" = "exec swaylock -c 657b83"; "${mod}+Shift+l" = "exec swaylock -c 657b83";
"${mod}+Return" = "exec ${pkgs.kitty}/bin/kitty"; "${mod}+Return" = "exec ${pkgs.alacritty}/bin/alacritty";
"XF86AudioRaiseVolume" = "exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ +5%"; "XF86AudioRaiseVolume" =
"XF86AudioLowerVolume" = "exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -5%"; "exec --no-startup-id ${pkgs.pulseaudio}/bin/pactl set-sink-volume @DEFAULT_SINK@ +5%";
"XF86AudioMute" = "exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle"; "XF86AudioLowerVolume" =
"XF86AudioMicMute" = "exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle"; "exec --no-startup-id ${pkgs.pulseaudio}/bin/pactl set-sink-volume @DEFAULT_SINK@ -5%";
"XF86AudioMute" =
"exec --no-startup-id ${pkgs.pulseaudio}/bin/pactl set-sink-mute @DEFAULT_SINK@ toggle";
"XF86AudioMicMute" =
"exec --no-startup-id ${pkgs.pulseaudio}/bin/pactl set-source-mute @DEFAULT_SOURCE@ toggle";
"XF86MonBrightnessUp" = "exec light -s sysfs/backlight/intel_backlight -A 5"; "XF86MonBrightnessUp" =
"XF86MonBrightnessDown" = "exec light -s sysfs/backlight/intel_backlight -U 5"; "exec light -s sysfs/backlight/intel_backlight -A 5";
"XF86MonBrightnessDown" =
"exec light -s sysfs/backlight/intel_backlight -U 5";
"Print" = "exec ${pkgs.gnome3.gnome-screenshot}/bin/gnome-screenshot -i"; "Print" = "exec ${pkgs.gnome3.gnome-screenshot}/bin/gnome-screenshot -i";