Sway/Waybar additions

This commit is contained in:
Andrea Ciceri 2021-10-21 12:18:10 +02:00
parent 43b2f39c35
commit ce1484753d
No known key found for this signature in database
GPG key ID: A1FC89532D1C5654
2 changed files with 48 additions and 76 deletions

View file

@ -1,4 +1,4 @@
{ pkgs, ... }:
{ pkgs, lib, ... }:
{
home.packages = with pkgs; [ wl-clipboard ];
wayland = {
@ -14,7 +14,7 @@
menu = "${pkgs.bemenu}/bin/bemenu-run -b -m 1 -p 'λ'";
output = {
HDMI-A-2 = {
#bg = "~/dotfiles/dotfiles/xorg/wallpaper.jpg fill";
bg = "${./wallpaper.jpg} fill";
};
};
#fonts = [ "Font Awesome" "Fira Code" ];
@ -25,37 +25,15 @@
}
];
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
[
startup = [
{
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"; }
floating.criteria = [
{ title = "MetaMask Notification.*"; }
{ title = "Volume Control"; } # pavucontrol
];
input = {
"*" = {
@ -63,9 +41,9 @@
xkb_variant = "intl";
};
};
keybindings = {
"${modifier}+f" = "exec firefox";
"${modifier}+e" = "exec emacs";
keybindings = lib.mkOptionDefault {
"${modifier}+x" = "exec ${pkgs.customEmacs}/bin/emacs";
"${modifier}+b" = "exec ${pkgs.firefox}/bin/firefox";
};
};
extraConfig = ''
@ -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}%";

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 MiB