added sway for x230
This commit is contained in:
109
home-wl.nix
Normal file
109
home-wl.nix
Normal file
@@ -0,0 +1,109 @@
|
|||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
swayimg
|
||||||
|
wl-clipboard
|
||||||
|
waybar
|
||||||
|
wofi
|
||||||
|
];
|
||||||
|
home.file = {
|
||||||
|
".config/waybar" = {
|
||||||
|
source = ./waybar;
|
||||||
|
};
|
||||||
|
".config/wofi/config".text = ''
|
||||||
|
show=drun
|
||||||
|
drun-print_command=true
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
wayland.windowManager.sway.enable = true;
|
||||||
|
wayland.windowManager.sway.package = pkgs.swayfx;
|
||||||
|
wayland.windowManager.sway.config = {
|
||||||
|
bars = [{
|
||||||
|
command = "waybar";
|
||||||
|
position = "top";
|
||||||
|
}];
|
||||||
|
colors.focused = {
|
||||||
|
border = "#ef5ffc";
|
||||||
|
background = "#ef5ffc";
|
||||||
|
text = "#333333";
|
||||||
|
indicator = "#2e9ef4";
|
||||||
|
childBorder = "#ef5ffc";
|
||||||
|
};
|
||||||
|
defaultWorkspace = "1";
|
||||||
|
floating = {
|
||||||
|
criteria = [
|
||||||
|
{
|
||||||
|
app_id = "org.keepassxc.KeePassXC";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
gaps = {
|
||||||
|
inner = 8;
|
||||||
|
smartBorders = "on";
|
||||||
|
smartGaps = true;
|
||||||
|
};
|
||||||
|
input = {
|
||||||
|
"type:keyboard" = {
|
||||||
|
xkb_layout = "us";
|
||||||
|
xkb_variant = "altgr-intl";
|
||||||
|
xkb_options = "caps:escape,compose:102,shift:both_capslock,eurosign:e";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
keybindings =
|
||||||
|
let
|
||||||
|
modifier = config.wayland.windowManager.sway.config.modifier;
|
||||||
|
menu = config.wayland.windowManager.sway.config.menu;
|
||||||
|
in lib.mkOptionDefault {
|
||||||
|
"${modifier}+space" = "exec ${menu}";
|
||||||
|
"${modifier}+Control+Space" = "focus mode_toggle";
|
||||||
|
"XF86AudioLowerVolume" = "exec pactl set-sink-volume @DEFAULT_SINK@ -5%";
|
||||||
|
"XF86AudioRaiseVolume" = "exec pactl set-sink-volume @DEFAULT_SINK@ +5%";
|
||||||
|
"XF86AudioMute" = "exec pactl set-sink-mute @DEFAULT_SINK@ toggle";
|
||||||
|
"XF86AudioMicMute" = "exec pactl set-source-mute @DEFAULT_SOURCE@ toggle";
|
||||||
|
"XF86Launch1" = "exec ~/scripts/sunset.sh";
|
||||||
|
"${modifier}+Control+p" = "exec swaylock -f -c ef5ffc";
|
||||||
|
};
|
||||||
|
menu = "wofi -G | xargs swaymsg exec --";
|
||||||
|
modifier = "Mod4";
|
||||||
|
output = {
|
||||||
|
"*" = {
|
||||||
|
bg = "~/.config/sway/xenia.png fill";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
window.titlebar = false;
|
||||||
|
terminal = "alacritty";
|
||||||
|
window.border = 2;
|
||||||
|
};
|
||||||
|
wayland.windowManager.sway.extraConfig = ''
|
||||||
|
blur enable
|
||||||
|
blur_xray disable
|
||||||
|
corner_radius 4
|
||||||
|
shadows enable
|
||||||
|
default_dim_inactive 0.1
|
||||||
|
dim_inactive_colors.unfocused #fc28c3
|
||||||
|
include ~/.config/sway/device-conf
|
||||||
|
'';
|
||||||
|
# Let Home Manager install and manage itself.
|
||||||
|
services.swayidle = {
|
||||||
|
enable = true;
|
||||||
|
events = [
|
||||||
|
{
|
||||||
|
event = "before-sleep";
|
||||||
|
command = "/run/current-system/sw/bin/swaylock -f -c ef5ffc";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
timeouts = [
|
||||||
|
{
|
||||||
|
command = "/run/current-system/sw/bin/swaylock -f -c ef5ffc";
|
||||||
|
timeout = 300;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
command = "swaymsg \"output * dpms off\"";
|
||||||
|
resumeCommand = "swaymsg \"output * dpms on\"";
|
||||||
|
timeout = 600;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
15
x230-wl.nix
Normal file
15
x230-wl.nix
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
|
||||||
|
programs.alacritty.settings.font.size = lib.mkForce 11;
|
||||||
|
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
wlsunset
|
||||||
|
];
|
||||||
|
wayland.windowManager.sway.config = {
|
||||||
|
startup = [
|
||||||
|
{ command = "bash ~/scripts/sunset.sh"; }
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
5
x230.nix
5
x230.nix
@@ -1,6 +1,11 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
imports = [
|
||||||
|
./home-wl.nix
|
||||||
|
./x230-wl.nix
|
||||||
|
];
|
||||||
services.batsignal.enable = true;
|
services.batsignal.enable = true;
|
||||||
services.batsignal.extraArgs = [ "-D poweroff" ];
|
services.batsignal.extraArgs = [ "-D poweroff" ];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user