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 ];
|
home.packages = with pkgs; [ wl-clipboard ];
|
||||||
wayland = {
|
wayland = {
|
||||||
|
@ -6,75 +6,53 @@
|
||||||
let
|
let
|
||||||
modifier = "Mod4";
|
modifier = "Mod4";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
enable = true;
|
enable = true;
|
||||||
wrapperFeatures.gtk = true;
|
wrapperFeatures.gtk = true;
|
||||||
config = {
|
config = {
|
||||||
modifier = modifier;
|
modifier = modifier;
|
||||||
menu = "${pkgs.bemenu}/bin/bemenu-run -b -m 1 -p 'λ'";
|
menu = "${pkgs.bemenu}/bin/bemenu-run -b -m 1 -p 'λ'";
|
||||||
output = {
|
output = {
|
||||||
HDMI-A-2 = {
|
HDMI-A-2 = {
|
||||||
#bg = "~/dotfiles/dotfiles/xorg/wallpaper.jpg fill";
|
bg = "${./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";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
extraConfig = ''
|
#fonts = [ "Font Awesome" "Fira Code" ];
|
||||||
bindsym ${modifier}+p move workspace to output right
|
terminal = "${pkgs.foot}/bin/footclient";
|
||||||
#seat seat0 xcursor_theme "Adwaita"
|
bars = [
|
||||||
'';
|
{
|
||||||
xwayland = true;
|
command = "${pkgs.waybar}/bin/waybar";
|
||||||
systemdIntegration = true;
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
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 = {
|
programs.waybar = {
|
||||||
|
@ -84,13 +62,13 @@
|
||||||
{
|
{
|
||||||
layer = "top";
|
layer = "top";
|
||||||
position = "top";
|
position = "top";
|
||||||
#output = [ "HDMI-A-2" ];
|
height = 30;
|
||||||
|
|
||||||
modules-left = [
|
modules-left = [
|
||||||
"sway/mode"
|
"sway/mode"
|
||||||
"sway/workspaces"
|
"sway/workspaces"
|
||||||
];
|
];
|
||||||
modules-center = [];
|
modules-center = [ "sway/window" ];
|
||||||
modules-right = [
|
modules-right = [
|
||||||
"idle_inhibitor"
|
"idle_inhibitor"
|
||||||
"tray"
|
"tray"
|
||||||
|
@ -111,13 +89,7 @@
|
||||||
|
|
||||||
"sway/mode" = { tooltip = false; };
|
"sway/mode" = { tooltip = false; };
|
||||||
|
|
||||||
idle_inhibitor = {
|
"sway/window" = { max_length = 50; };
|
||||||
format = "{icon}";
|
|
||||||
format-icons = {
|
|
||||||
activated = "unlocked";
|
|
||||||
deactivated = "locking";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
pulseaudio = {
|
pulseaudio = {
|
||||||
format = "vol {volume}%";
|
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