waybar............. gtk...............
This commit is contained in:
parent
37b79824a1
commit
73f874f000
|
@ -65,6 +65,7 @@
|
||||||
specialArgs = {inherit inputs;};
|
specialArgs = {inherit inputs;};
|
||||||
modules = [
|
modules = [
|
||||||
./hosts/JWST/configuration.nix
|
./hosts/JWST/configuration.nix
|
||||||
|
./modules/sway.nix
|
||||||
nixos-hardware.nixosModules.dell-xps-15-9520
|
nixos-hardware.nixosModules.dell-xps-15-9520
|
||||||
nixos-hardware.nixosModules.common-gpu-nvidia-disable
|
nixos-hardware.nixosModules.common-gpu-nvidia-disable
|
||||||
{ nixpkgs.overlays = overlays; }
|
{ nixpkgs.overlays = overlays; }
|
||||||
|
|
|
@ -92,12 +92,12 @@
|
||||||
brightnessctl
|
brightnessctl
|
||||||
];
|
];
|
||||||
|
|
||||||
programs.sway.enable = true;
|
# programs.sway.enable = true;
|
||||||
programs.sway.extraPackages = with pkgs; [
|
# programs.sway.extraPackages = with pkgs; [
|
||||||
swaylock
|
# swaylock
|
||||||
swayidle
|
# swayidle
|
||||||
brightnessctl
|
# brightnessctl
|
||||||
];
|
# ];
|
||||||
|
|
||||||
# programs.waybar.enable = true;
|
# programs.waybar.enable = true;
|
||||||
# programs.nm-applet.enable = true;
|
# programs.nm-applet.enable = true;
|
||||||
|
|
63
modules/sway.nix
Normal file
63
modules/sway.nix
Normal file
|
@ -0,0 +1,63 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
# bash script to let dbus know about important env variables and
|
||||||
|
# propagate them to relevent services run at the end of sway config
|
||||||
|
# see
|
||||||
|
# https://github.com/emersion/xdg-desktop-portal-wlr/wiki/"It-doesn't-work"-Troubleshooting-Checklist
|
||||||
|
# note: this is pretty much the same as /etc/sway/config.d/nixos.conf but also restarts
|
||||||
|
# some user services to make sure they have the correct environment variables
|
||||||
|
dbus-sway-environment = pkgs.writeTextFile {
|
||||||
|
name = "dbus-sway-environment";
|
||||||
|
destination = "/bin/dbus-sway-environment";
|
||||||
|
executable = true;
|
||||||
|
|
||||||
|
text = ''
|
||||||
|
dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway
|
||||||
|
systemctl --user stop pipewire xdg-desktop-portal xdg-desktop-portal-wlr xdg-desktop-portal-gtk
|
||||||
|
systemctl --user start pipewire xdg-desktop-portal xdg-desktop-portal-wlr xdg-desktop-portal-gtk
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
# currently, there is some friction between sway and gtk:
|
||||||
|
# https://github.com/swaywm/sway/wiki/GTK-3-settings-on-Wayland
|
||||||
|
# the suggested way to set gtk settings is with gsettings
|
||||||
|
# for gsettings to work, we need to tell it where the schemas are
|
||||||
|
# using the XDG_DATA_DIR environment variable
|
||||||
|
# run at the end of sway config
|
||||||
|
configure-gtk = pkgs.writeTextFile {
|
||||||
|
name = "configure-gtk";
|
||||||
|
destination = "/bin/configure-gtk";
|
||||||
|
executable = true;
|
||||||
|
text = let
|
||||||
|
schema = pkgs.gsettings-desktop-schemas;
|
||||||
|
datadir = "${schema}/share/gsettings-schemas/${schema.name}";
|
||||||
|
in ''
|
||||||
|
export XDG_DATA_DIRS=${datadir}:$XDG_DATA_DIRS
|
||||||
|
gnome_schema=org.gnome.desktop.interface
|
||||||
|
# gsettings set $gnome_schema gtk-theme 'Dracula'
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
in {
|
||||||
|
# environment.systemPackages = [
|
||||||
|
# dbus-sway-environment
|
||||||
|
# configure-gtk
|
||||||
|
# ];
|
||||||
|
|
||||||
|
# enable sway window manager
|
||||||
|
programs.sway = {
|
||||||
|
enable = true;
|
||||||
|
wrapperFeatures.gtk = true;
|
||||||
|
extraPackages = with pkgs; [
|
||||||
|
dbus-sway-environment
|
||||||
|
configure-gtk
|
||||||
|
swaylock
|
||||||
|
swayidle
|
||||||
|
brightnessctl
|
||||||
|
];
|
||||||
|
};
|
||||||
|
# programs.waybar.enable = true;
|
||||||
|
}
|
|
@ -44,10 +44,10 @@
|
||||||
texlab = {
|
texlab = {
|
||||||
command = "${pkgs.texlab}/bin/texlab";
|
command = "${pkgs.texlab}/bin/texlab";
|
||||||
config.texlab = {
|
config.texlab = {
|
||||||
forwardSearch.executable = "${pkgs.zathura}";
|
forwardSearch.executable = lib.getExe pkgs.zathura;
|
||||||
forwardSearch.args = ["--synctex-forward" "%l:1:%f"];
|
forwardSearch.args = ["--synctex-forward" "%l:1:%f"];
|
||||||
build = {
|
build = {
|
||||||
executable = "${pkgs.tectonic}/bin/tectonic";
|
executable = lib.getExe pkgs.tectonic;
|
||||||
onSave = true;
|
onSave = true;
|
||||||
auxDirectory = "build";
|
auxDirectory = "build";
|
||||||
logDirectory = "build";
|
logDirectory = "build";
|
||||||
|
|
|
@ -21,6 +21,10 @@
|
||||||
|
|
||||||
xdg.configFile."sway/background.jpg".source = ../background.jpg;
|
xdg.configFile."sway/background.jpg".source = ../background.jpg;
|
||||||
|
|
||||||
|
# wayland.windowManager.sway = {
|
||||||
|
# enable = true;
|
||||||
|
# };
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
wl-clipboard
|
wl-clipboard
|
||||||
# swaylock
|
# swaylock
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
# Default config for sway
|
# Default config for sway
|
||||||
|
|
||||||
include ~/.config/sway/config.d/*
|
|
||||||
include /etc/sway/config.d/*
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Copy this to ~/.config/sway/config and edit it to your liking.
|
# Copy this to ~/.config/sway/config and edit it to your liking.
|
||||||
#
|
#
|
||||||
# Read `man 5 sway` for a complete reference.
|
# Read `man 5 sway` for a complete reference.
|
||||||
|
|
||||||
|
exec dbus-sway-environment
|
||||||
|
# exec configure-gtk
|
||||||
|
|
||||||
### Variables
|
### Variables
|
||||||
#
|
#
|
||||||
# Logo key. Use Mod1 for Alt.
|
# Logo key. Use Mod1 for Alt.
|
||||||
|
@ -53,7 +53,6 @@ client.unfocused $unfocus $unfocus $unfocus $unfocus
|
||||||
# Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/)
|
# Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/)
|
||||||
output * bg ~/.config/sway/background.jpg fill
|
output * bg ~/.config/sway/background.jpg fill
|
||||||
|
|
||||||
bar swaybar_command waybar
|
|
||||||
#
|
#
|
||||||
# Example configuration:
|
# Example configuration:
|
||||||
#
|
#
|
||||||
|
@ -237,20 +236,23 @@ bindsym $mod+r mode "resize"
|
||||||
|
|
||||||
#
|
#
|
||||||
# Status Bar:
|
# Status Bar:
|
||||||
|
bar {
|
||||||
|
|
||||||
|
swaybar_command swaybar
|
||||||
#
|
#
|
||||||
# Read `man 5 sway-bar` for more information about this section.
|
# Read `man 5 sway-bar` for more information about this section.
|
||||||
# position top
|
position top
|
||||||
|
|
||||||
# # When the status_command prints a new line to stdout, swaybar updates.
|
# # When the status_command prints a new line to stdout, swaybar updates.
|
||||||
# # The default just shows the current date and time.
|
# # The default just shows the current date and time.
|
||||||
# status_command while date +'%Y-%m-%d %I:%M:%S %p'; do sleep 1; done
|
status_command while date +'%Y-%m-%d %I:%M:%S %p'; do sleep 1; done
|
||||||
|
|
||||||
# colors {
|
colors {
|
||||||
# statusline #ffffff
|
statusline #ffffff
|
||||||
# background #323232
|
background #323232
|
||||||
# inactive_workspace #32323200 #32323200 #5c5c5c
|
inactive_workspace #32323200 #32323200 #5c5c5c
|
||||||
# }
|
}
|
||||||
# }
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
# Player
|
# Player
|
||||||
|
@ -278,4 +280,9 @@ bindsym $mod+r mode "resize"
|
||||||
# SwayFX
|
# SwayFX
|
||||||
# blur on
|
# blur on
|
||||||
|
|
||||||
# xwayland enable
|
xwayland enable
|
||||||
|
|
||||||
|
|
||||||
|
# include /etc/sway/config.d/*
|
||||||
|
|
||||||
|
include ~/.config/sway/config.d/*
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
exec nm-applet
|
exec nm-applet
|
||||||
# exec waybar
|
|
||||||
exec gammastep-indicator
|
exec gammastep-indicator
|
||||||
exec dunst
|
exec dunst
|
||||||
|
# exec waybar
|
||||||
#exec swayidle -w \
|
#exec swayidle -w \
|
||||||
# timeout 600 'swaylock -f -c 14171d' \
|
# timeout 600 'swaylock -f -c 14171d' \
|
||||||
# before-sleep 'swaylock -f -c 14171d'
|
# before-sleep 'swaylock -f -c 14171d'
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
programs.waybar = {
|
programs.waybar = {
|
||||||
enable = true;
|
enable = true;
|
||||||
style = ./style.css;
|
style = ./style.css;
|
||||||
|
# systemd.enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
mainBar = {
|
mainBar = {
|
||||||
layer = "top";
|
layer = "top";
|
||||||
|
|
Loading…
Reference in a new issue