Sway/Waybar additions
This commit is contained in:
parent
43b2f39c35
commit
ce1484753d
2 changed files with 48 additions and 76 deletions
|
@ -1,4 +1,4 @@
|
|||
{ pkgs, ... }:
|
||||
{ pkgs, lib, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [ wl-clipboard ];
|
||||
wayland = {
|
||||
|
@ -6,75 +6,53 @@
|
|||
let
|
||||
modifier = "Mod4";
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
wrapperFeatures.gtk = true;
|
||||
config = {
|
||||
modifier = modifier;
|
||||
menu = "${pkgs.bemenu}/bin/bemenu-run -b -m 1 -p 'λ'";
|
||||
output = {
|
||||
HDMI-A-2 = {
|
||||
#bg = "~/dotfiles/dotfiles/xorg/wallpaper.jpg fill";
|
||||
};
|
||||
};
|
||||
#fonts = [ "Font Awesome" "Fira Code" ];
|
||||
terminal = "${pkgs.foot}/bin/footclient";
|
||||
bars = [
|
||||
{
|
||||
command = "${pkgs.waybar}/bin/waybar";
|
||||
}
|
||||
];
|
||||
|
||||
startup = let
|
||||
gsettings = "${pkgs.glib}/bin/gsettings";
|
||||
gsettingsscript = pkgs.writeShellScript "gsettings-auto.sh" ''
|
||||
expression=""
|
||||
for pair in "$@"; do
|
||||
IFS=:; set -- $pair
|
||||
expressions="$expressions -e 's:^$2=(.*)$:${gsettings} set org.gnome.desktop.interface $1 \1:e'"
|
||||
done
|
||||
IFS=
|
||||
echo "" >/tmp/gsettings.log
|
||||
echo exec sed -E $expressions "''${XDG_CONFIG_HOME:-$HOME/.config}"/gtk-3.0/settings.ini &>>/tmp/gsettings.log
|
||||
eval exec sed -E $expressions "''${XDG_CONFIG_HOME:-$HOME/.config}"/gtk-3.0/settings.ini &>>/tmp/gsettings.log
|
||||
'';
|
||||
gsettingscmd = ''${gsettingsscript} \
|
||||
gtk-theme:gtk-theme-name \
|
||||
icon-theme:gtk-icon-theme-name \
|
||||
font-name:gtk-font-name \
|
||||
cursor-theme:gtk-cursor-theme-name'';
|
||||
in
|
||||
[
|
||||
{
|
||||
command = "foot --server";
|
||||
always = true;
|
||||
}
|
||||
|
||||
#{ always = true; command = "${gsettingscmd}"; }
|
||||
];
|
||||
window.commands = [
|
||||
{ criteria = { app_id = "mpv"; }; command = "sticky enable"; }
|
||||
{ criteria = { app_id = "mpv"; }; command = "floating enable"; }
|
||||
{ criteria = { title = "MetaMask Notification.*"; }; command = "floating enable"; }
|
||||
];
|
||||
input = {
|
||||
"*" = {
|
||||
xkb_layout = "us";
|
||||
xkb_variant = "intl";
|
||||
};
|
||||
};
|
||||
keybindings = {
|
||||
"${modifier}+f" = "exec firefox";
|
||||
"${modifier}+e" = "exec emacs";
|
||||
{
|
||||
enable = true;
|
||||
wrapperFeatures.gtk = true;
|
||||
config = {
|
||||
modifier = modifier;
|
||||
menu = "${pkgs.bemenu}/bin/bemenu-run -b -m 1 -p 'λ'";
|
||||
output = {
|
||||
HDMI-A-2 = {
|
||||
bg = "${./wallpaper.jpg} fill";
|
||||
};
|
||||
};
|
||||
extraConfig = ''
|
||||
bindsym ${modifier}+p move workspace to output right
|
||||
#seat seat0 xcursor_theme "Adwaita"
|
||||
'';
|
||||
xwayland = true;
|
||||
systemdIntegration = true;
|
||||
#fonts = [ "Font Awesome" "Fira Code" ];
|
||||
terminal = "${pkgs.foot}/bin/footclient";
|
||||
bars = [
|
||||
{
|
||||
command = "${pkgs.waybar}/bin/waybar";
|
||||
}
|
||||
];
|
||||
|
||||
startup = [
|
||||
{
|
||||
command = "foot --server";
|
||||
always = true;
|
||||
}
|
||||
];
|
||||
floating.criteria = [
|
||||
{ title = "MetaMask Notification.*"; }
|
||||
{ title = "Volume Control"; } # pavucontrol
|
||||
];
|
||||
input = {
|
||||
"*" = {
|
||||
xkb_layout = "us";
|
||||
xkb_variant = "intl";
|
||||
};
|
||||
};
|
||||
keybindings = lib.mkOptionDefault {
|
||||
"${modifier}+x" = "exec ${pkgs.customEmacs}/bin/emacs";
|
||||
"${modifier}+b" = "exec ${pkgs.firefox}/bin/firefox";
|
||||
};
|
||||
};
|
||||
extraConfig = ''
|
||||
bindsym ${modifier}+p move workspace to output right
|
||||
#seat seat0 xcursor_theme "Adwaita"
|
||||
'';
|
||||
xwayland = true;
|
||||
systemdIntegration = true;
|
||||
};
|
||||
};
|
||||
|
||||
programs.waybar = {
|
||||
|
@ -84,13 +62,13 @@
|
|||
{
|
||||
layer = "top";
|
||||
position = "top";
|
||||
#output = [ "HDMI-A-2" ];
|
||||
height = 30;
|
||||
|
||||
modules-left = [
|
||||
"sway/mode"
|
||||
"sway/workspaces"
|
||||
];
|
||||
modules-center = [];
|
||||
modules-center = [ "sway/window" ];
|
||||
modules-right = [
|
||||
"idle_inhibitor"
|
||||
"tray"
|
||||
|
@ -111,13 +89,7 @@
|
|||
|
||||
"sway/mode" = { tooltip = false; };
|
||||
|
||||
idle_inhibitor = {
|
||||
format = "{icon}";
|
||||
format-icons = {
|
||||
activated = "unlocked";
|
||||
deactivated = "locking";
|
||||
};
|
||||
};
|
||||
"sway/window" = { max_length = 50; };
|
||||
|
||||
pulseaudio = {
|
||||
format = "vol {volume}%";
|
||||
|
|
BIN
users/profiles/sway/wallpaper.jpg
Normal file
BIN
users/profiles/sway/wallpaper.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.4 MiB |
Loading…
Add table
Reference in a new issue