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
../../git
../../gui
../../i3
../../libvirt.nix
../../mercurial
../../sway
];
fileSystems."/" = { options = [ "compress=zstd" ]; };

View file

@ -1,14 +1,11 @@
{
config,
pkgs,
...
}: let
mod = "Mod4";
{ config, pkgs, ... }:
let mod = "Mod4";
in {
services.dbus.packages = with pkgs; [gnome2.GConf gnome3.dconf];
services.dbus.packages = with pkgs; [ ];
programs.dconf.enable = true;
programs.qt5ct.enable = true;
systemd.defaultUnit = "graphical.target";
security.polkit.enable = true;
qt5.platformTheme = "qt5ct";
environment.loginShellInit = ''
if [ -z $DISPLAY ] && [ "$(tty)" = "/dev/tty1" ]; then
@ -16,10 +13,20 @@ in {
fi
'';
home-manager.users.cyryl = {...}: {
home-manager.users.cyryl = { ... }: {
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 = {
XDG_CURRENT_DESKTOP = "Unity";
@ -59,24 +66,23 @@ in {
config = {
modifier = "${mod}";
menu = "${pkgs.wofi}/bin/wofi --show drun,run";
terminal = "${pkgs.kitty}/bin/kitty";
terminal = "${pkgs.alacritty}/bin/alacritty";
workspaceLayout = "tabbed";
window = {
hideEdgeBorders = "both";
titlebar = false;
border = 0;
};
bars = [
{
position = "top";
command = "${pkgs.waybar}/bin/waybar";
}
];
bars = [{
position = "top";
command = "${pkgs.waybar}/bin/waybar";
}];
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 = ''
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_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,
...
}: let
mod = "Mod4";
{ config, pkgs, ... }:
let mod = "Mod4";
in {
wayland.windowManager.sway.config.keybindings = {
"${mod}+Shift+e" = "exit";
"${mod}+Shift+r" = "reload";
"${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%";
"XF86AudioLowerVolume" = "exec --no-startup-id pactl set-sink-volume @DEFAULT_SINK@ -5%";
"XF86AudioMute" = "exec --no-startup-id pactl set-sink-mute @DEFAULT_SINK@ toggle";
"XF86AudioMicMute" = "exec --no-startup-id pactl set-source-mute @DEFAULT_SOURCE@ toggle";
"XF86AudioRaiseVolume" =
"exec --no-startup-id ${pkgs.pulseaudio}/bin/pactl set-sink-volume @DEFAULT_SINK@ +5%";
"XF86AudioLowerVolume" =
"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";
"XF86MonBrightnessDown" = "exec light -s sysfs/backlight/intel_backlight -U 5";
"XF86MonBrightnessUp" =
"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";