Formatted everything.

This commit is contained in:
vorboyvo 2024-04-13 23:45:36 -04:00
parent 0c0e98b61a
commit d2388df647
9 changed files with 369 additions and 281 deletions

View file

@ -5,12 +5,10 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
{ {
imports = imports = [ # Include the results of the hardware scan.
[ # Include the results of the hardware scan.
./hardware-configuration.nix ./hardware-configuration.nix
]; ];
################################################ ################################################
# SECTION 1: BASIC SYSTEM SOFTWARE CONFIGURATION # SECTION 1: BASIC SYSTEM SOFTWARE CONFIGURATION
################################################ ################################################
@ -20,9 +18,7 @@
boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.canTouchEfiVariables = true;
# Enable flakes. # Enable flakes.
nix = { nix = { settings.experimental-features = [ "nix-command" "flakes" ]; };
settings.experimental-features = [ "nix-command" "flakes" ];
};
# Enable Nix User Repository # Enable Nix User Repository
# See https://github.com/nix-community/NUR#installation # See https://github.com/nix-community/NUR#installation
@ -33,7 +29,8 @@
# }; # };
networking.hostName = "oyvoLaptop"; # Define your hostname. networking.hostName = "oyvoLaptop"; # Define your hostname.
networking.networkmanager.enable = true; # Easiest to use and most distros use this by default. networking.networkmanager.enable =
true; # Easiest to use and most distros use this by default.
# Extra hosts for connecting to tailscale'd servers # Extra hosts for connecting to tailscale'd servers
networking.extraHosts = '' networking.extraHosts = ''
@ -69,7 +66,8 @@
# Set login and power management options # Set login and power management options
services.logind.lidSwitch = "suspend"; services.logind.lidSwitch = "suspend";
services.logind.lidSwitchDocked = "ignore"; # when an external monitor is plugged in services.logind.lidSwitchDocked =
"ignore"; # when an external monitor is plugged in
services.logind.powerKey = "ignore"; # handle this WM side services.logind.powerKey = "ignore"; # handle this WM side
services.logind.powerKeyLongPress = "poweroff"; services.logind.powerKeyLongPress = "poweroff";
@ -105,9 +103,7 @@
hardware.bluetooth.enable = true; hardware.bluetooth.enable = true;
# Enable power management # Enable power management
services.upower = { services.upower = { enable = true; };
enable = true;
};
################################################### ###################################################
# SECTION 3: USERSPACE CONFIG AND OPTIONAL SOFTWARE # SECTION 3: USERSPACE CONFIG AND OPTIONAL SOFTWARE
@ -117,7 +113,8 @@
users.users.alice = { users.users.alice = {
isNormalUser = true; isNormalUser = true;
home = "/home/alice"; home = "/home/alice";
extraGroups = [ "wheel" "networkmanager" "video" ] ++ [ "adbusers" ]; # Enable 'sudo' for the user. extraGroups = [ "wheel" "networkmanager" "video" ]
++ [ "adbusers" ]; # Enable 'sudo' for the user.
initialPassword = "manysuchcases"; initialPassword = "manysuchcases";
shell = pkgs.zsh; shell = pkgs.zsh;
}; };
@ -143,7 +140,8 @@
fprintd = prev.fprintd.overrideAttrs (old: { fprintd = prev.fprintd.overrideAttrs (old: {
mesonCheckFlags = (old.mesonCheckFlags or [ ]) ++ [ mesonCheckFlags = (old.mesonCheckFlags or [ ]) ++ [
# PAM related checks are timing out # PAM related checks are timing out
"--no-suite" "fprintd:TestPamFprintd" "--no-suite"
"fprintd:TestPamFprintd"
]; ];
}); });
}) })

View file

@ -21,10 +21,8 @@
# nur.url = "github:nix-community/NUR"; # nur.url = "github:nix-community/NUR";
}; };
outputs = { self, nixpkgs, home-manager }: outputs = { self, nixpkgs, home-manager }:
let let system = "x86_64-linux";
system = "x86_64-linux"; in {
in
{
nixosConfigurations = { nixosConfigurations = {
oyvoLaptop = nixpkgs.lib.nixosSystem { oyvoLaptop = nixpkgs.lib.nixosSystem {
inherit system; inherit system;

133
home.nix
View file

@ -4,8 +4,7 @@ let
scripts = ./scripts; scripts = ./scripts;
extra = ./extra; extra = ./extra;
terminal = pkgs.alacritty; terminal = pkgs.alacritty;
in in {
{
home.username = "alice"; home.username = "alice";
home.homeDirectory = "/home/alice"; home.homeDirectory = "/home/alice";
@ -47,28 +46,76 @@ in
}; };
# Install packages # Install packages
home.packages = home.packages = with pkgs;
with pkgs;
let let
xdg-terminal-exec = callPackage ./pkgs/xdg-terminal-exec/xdg-terminal-exec.nix {}; xdg-terminal-exec =
callPackage ./pkgs/xdg-terminal-exec/xdg-terminal-exec.nix { };
mons = callPackage ./pkgs/mons/mons.nix { }; mons = callPackage ./pkgs/mons/mons.nix { };
archivo = callPackage ./pkgs/archivo/archivo.nix { }; archivo = callPackage ./pkgs/archivo/archivo.nix { };
in in [ gcc tree-sitter ] ++ # Basic dev tools
[ gcc tree-sitter ] ++ # Basic dev tools [ marksman nil ]
[ marksman nil ] ++ # Language servers except those installed through package sections ++ # Language servers except those installed through package sections
[ texliveFull texlab ] ++ # LaTeX [ texliveFull texlab ] ++ # LaTeX
(with ocamlPackages; [ ocaml opam dune_3 dune-release merlin ocaml-lsp odoc ocamlformat utop ]) ++ # OCaml (with ocamlPackages; [
ocaml
opam
dune_3
dune-release
merlin
ocaml-lsp
odoc
ocamlformat
utop
]) ++ # OCaml
[ ghc stack cabal-install haskell-language-server ] ++ # Haskell [ ghc stack cabal-install haskell-language-server ] ++ # Haskell
[ python3 ] ++ # I guess..... [ python3 ] ++ # I guess.....
[ julia ] ++ # Julia [ julia ] ++ # Julia
[ kak-lsp brightnessctl grim slurp wl-clipboard jq xdg-terminal-exec blueman ] ++ # Basic utilities [
[ bitwarden-cli htop snore ] ++ # Personalized selection of command-line (CLI/TUI) apps kak-lsp
brightnessctl
grim
slurp
wl-clipboard
jq
xdg-terminal-exec
blueman
] ++ # Basic utilities
[ bitwarden-cli htop snore ]
++ # Personalized selection of command-line (CLI/TUI) apps
[ terminal ] ++ # Terminal emulator [ terminal ] ++ # Terminal emulator
[ firefox cinnamon.nemo gnome.file-roller cinnamon.nemo-fileroller evince imv vlc pavucontrol ] ++ # Basic graphical apps [
[ libreoffice signal-desktop element-desktop prismlauncher mumble gimp inkscape deluge-gtk shotwell lorien ] ++ # Personalized selection of graphical apps firefox
cinnamon.nemo
gnome.file-roller
cinnamon.nemo-fileroller
evince
imv
vlc
pavucontrol
] ++ # Basic graphical apps
[
libreoffice
signal-desktop
element-desktop
prismlauncher
mumble
gimp
inkscape
deluge-gtk
shotwell
lorien
] ++ # Personalized selection of graphical apps
[ mons ] ++ # Games [ mons ] ++ # Games
[ swaybg bemenu j4-dmenu-desktop ] ++ # Sway- and Wayland-related packages [ swaybg bemenu j4-dmenu-desktop ] ++ # Sway- and Wayland-related packages
[ noto-fonts redhat-official-fonts overpass ibm-plex rubik archivo font-awesome ] ++ # Fonts [
noto-fonts
redhat-official-fonts
overpass
ibm-plex
rubik
archivo
font-awesome
] ++ # Fonts
# [ papirus-icon-theme ] ++ # Icons # [ papirus-icon-theme ] ++ # Icons
# [ vanilla-dmz ] ++ # Cursor # [ vanilla-dmz ] ++ # Cursor
[ ] ++ # Temp [ ] ++ # Temp
@ -101,33 +148,35 @@ in
}; };
}; };
wayland.windowManager.sway = import ./programs/sway.nix { inherit scripts extra config lib pkgs terminal; }; wayland.windowManager.sway = import ./programs/sway.nix {
inherit scripts extra config lib pkgs terminal;
};
programs.waybar = import ./programs/waybar.nix { inherit scripts config lib pkgs terminal; }; programs.waybar =
import ./programs/waybar.nix { inherit scripts config lib pkgs terminal; };
programs.swaylock = { programs.swaylock = {
enable = true; enable = true;
settings = { settings = { font-size = 14; };
font-size = 14;
};
}; };
services.swayidle = { services.swayidle = {
enable = true; enable = true;
events = [ events = [{
{ event = "before-sleep"; command = "${pkgs.lib.getExe pkgs.swaylock} -f"; } event = "before-sleep";
]; command = "${pkgs.lib.getExe pkgs.swaylock} -f";
}];
}; };
home.sessionVariables = { home.sessionVariables = { NIXOS_OZONE_WL = "1"; };
NIXOS_OZONE_WL = "1";
};
# configure fonts correctly # configure fonts correctly
fonts.fontconfig.enable = true; fonts.fontconfig.enable = true;
xdg.configFile."fontconfig/conf.d/20-default.fonts.conf".source = "${extra}/20-default-fonts.conf"; xdg.configFile."fontconfig/conf.d/20-default.fonts.conf".source =
"${extra}/20-default-fonts.conf";
# fix nemo terminal integration # fix nemo terminal integration
dconf.settings."org/cinnamon/desktop/applications/terminal".exec = "${pkgs.lib.getExe terminal}" ; dconf.settings."org/cinnamon/desktop/applications/terminal".exec =
"${pkgs.lib.getExe terminal}";
# dconf.settings."org/cinnamon/desktop/applications/terminal".exec-arg = "-e --cwd %F"; # dconf.settings."org/cinnamon/desktop/applications/terminal".exec-arg = "-e --cwd %F";
# terminal emulator # terminal emulator
@ -136,7 +185,8 @@ in
# programs.neovim = import ./programs/neovim.nix; # programs.neovim = import ./programs/neovim.nix;
programs.kakoune = import ./programs/kakoune.nix; programs.kakoune = import ./programs/kakoune.nix;
xdg.configFile."kak-lsp/kak-lsp.toml".source = ./programs/kakoune/kak-lsp.toml; xdg.configFile."kak-lsp/kak-lsp.toml".source =
./programs/kakoune/kak-lsp.toml;
xdg.desktopEntries.kakoune = { xdg.desktopEntries.kakoune = {
name = "Kakoune"; name = "Kakoune";
genericName = "Text Editor"; genericName = "Text Editor";
@ -145,10 +195,21 @@ in
exec = "kak %F"; exec = "kak %F";
terminal = true; terminal = true;
mimeType = [ mimeType = [
"text/english" "text/plain" "text/x-makefile" "text/x-c++hdr" "text/english"
"text/x-c++src" "text/x-chdr" "text/x-csrc" "text/x-java" "text/plain"
"text/x-moc" "text/x-pascal" "text/x-tcl" "text/x-tex" "text/x-makefile"
"application/x-shellscript" "text/x-c" "text/x-c++" "text/x-c++hdr"
"text/x-c++src"
"text/x-chdr"
"text/x-csrc"
"text/x-java"
"text/x-moc"
"text/x-pascal"
"text/x-tcl"
"text/x-tex"
"application/x-shellscript"
"text/x-c"
"text/x-c++"
]; ];
categories = [ "Utility" "TextEditor" ]; categories = [ "Utility" "TextEditor" ];
}; };
@ -157,9 +218,7 @@ in
# enable = true; # enable = true;
# }; # };
programs.pandoc = { programs.pandoc = { enable = true; };
enable = true;
};
# Configure notifications # Configure notifications
services.dunst = { services.dunst = {
@ -173,9 +232,7 @@ in
}; };
}; };
}; };
services.batsignal = { services.batsignal = { enable = true; };
enable = true;
};
programs.firefox = import ./programs/firefox.nix { inherit pkgs; }; programs.firefox = import ./programs/firefox.nix { inherit pkgs; };

View file

@ -1,5 +1,4 @@
{pkgs}: { pkgs }: {
{
enable = true; enable = true;
profiles = { profiles = {
default = { default = {
@ -15,26 +14,42 @@
urls = [{ urls = [{
template = "https://search.nixos.org/packages"; template = "https://search.nixos.org/packages";
params = [ params = [
{ name = "type"; value = "packages"; } {
{ name = "query"; value = "{searchTerms}"; } name = "type";
value = "packages";
}
{
name = "query";
value = "{searchTerms}";
}
]; ];
}]; }];
icon = "''${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; icon =
"''${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = [ "@np" ]; definedAliases = [ "@np" ];
}; };
"NixOS Options" = { "NixOS Options" = {
urls = [{ urls = [{
template = "https://search.nixos.org/options"; template = "https://search.nixos.org/options";
params = [ params = [
{ name = "type"; value = "options"; } {
{ name = "query"; value = "{searchTerms}"; } name = "type";
value = "options";
}
{
name = "query";
value = "{searchTerms}";
}
]; ];
}]; }];
icon = "''${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; icon =
"''${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = [ "@no" ]; definedAliases = [ "@no" ];
}; };
"NixOS Wiki" = { "NixOS Wiki" = {
urls = [{ template = "https://nixos.wiki/index.php?search={searchTerms}"; }]; urls = [{
template = "https://nixos.wiki/index.php?search={searchTerms}";
}];
iconUpdateURL = "https://nixos.wiki/favicon.png"; iconUpdateURL = "https://nixos.wiki/favicon.png";
updateInterval = 24 * 60 * 60 * 1000; # every day updateInterval = 24 * 60 * 60 * 1000; # every day
definedAliases = [ "@nw" ]; definedAliases = [ "@nw" ];
@ -42,23 +57,30 @@
"HomeManager Unofficial Options" = { "HomeManager Unofficial Options" = {
urls = [{ urls = [{
template = "https://home-manager-options.extranix.com"; template = "https://home-manager-options.extranix.com";
params = [ params = [{
{ name = "query"; value = "{searchTerms}"; } name = "query";
]; value = "{searchTerms}";
}]; }];
icon = "''${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; }];
icon =
"''${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = [ "@hm" ]; definedAliases = [ "@hm" ];
}; };
"Arch Wiki" = { "Arch Wiki" = {
urls = [{ template = "https://wiki.archlinux.org/index.php?search={searchTerms}"; }]; urls = [{
template =
"https://wiki.archlinux.org/index.php?search={searchTerms}";
}];
iconUpdateURL = "https://wiki.archlinux.org/favicon.ico"; iconUpdateURL = "https://wiki.archlinux.org/favicon.ico";
definedAliases = [ "@aw" ]; definedAliases = [ "@aw" ];
}; };
"GeoGuessr Join" = { "GeoGuessr Join" = {
urls = [{ template = "https://www.geoguessr.com/join/{searchTerms}"; }]; urls =
[{ template = "https://www.geoguessr.com/join/{searchTerms}"; }];
definedAliases = [ "@ggj" ]; definedAliases = [ "@ggj" ];
}; };
"Google".metaData.alias = "@g"; #builtin engines only support specifying one additional alias "Google".metaData.alias =
"@g"; # builtin engines only support specifying one additional alias
}; };
}; };
# extensions = with pkgs.nur.repos.rycee.firefox-addons; [ # extensions = with pkgs.nur.repos.rycee.firefox-addons; [

View file

@ -7,14 +7,12 @@
enable = true; enable = true;
highlightCursor = true; highlightCursor = true;
}; };
hooks = [ hooks = [{
{
# When the filetype=latex option is set in a buffer context (automatically), add a new hook to build the latex file on write # When the filetype=latex option is set in a buffer context (automatically), add a new hook to build the latex file on write
name = "BufSetOption"; name = "BufSetOption";
option = "filetype=latex"; option = "filetype=latex";
commands = "hook buffer BufWritePost .* %{ texlab-build }"; commands = "hook buffer BufWritePost .* %{ texlab-build }";
} }];
];
keyMappings = [ keyMappings = [
# Define usermode yank/copy and paste # Define usermode yank/copy and paste
{ {

View file

@ -4,8 +4,6 @@
viAlias = true; viAlias = true;
vimAlias = true; vimAlias = true;
withPython3 = true; withPython3 = true;
extraPython3Packages = pyPkgs: with pyPkgs; [ extraPython3Packages = pyPkgs: with pyPkgs; [ virtualenv ];
virtualenv
];
extraLuaConfig = builtins.readFile ./neovim/init.lua; extraLuaConfig = builtins.readFile ./neovim/init.lua;
} }

View file

@ -1,11 +1,14 @@
{ scripts, extra, config, lib, pkgs, terminal, ... }@inputs: { scripts, extra, config, lib, pkgs, terminal, ... }@inputs:
let let
dynscreenshot = pkgs.writeShellScript "dynscreenshot" (builtins.readFile "${scripts}/dynscreenshot.sh"); dynscreenshot = pkgs.writeShellScript "dynscreenshot"
changebrightness = pkgs.writeShellScript "changebrightness" (builtins.readFile "${scripts}/changebrightness.sh"); (builtins.readFile "${scripts}/dynscreenshot.sh");
changebrightness = pkgs.writeShellScript "changebrightness"
(builtins.readFile "${scripts}/changebrightness.sh");
mod = config.wayland.windowManager.sway.config.modifier; mod = config.wayland.windowManager.sway.config.modifier;
dmenuCommand = builtins.readFile "${scripts}/dmenu.sh"; dmenuCommand = builtins.readFile "${scripts}/dmenu.sh";
shutdownMenu = pkgs.writeShellScript "shutdownmenu" (builtins.readFile "${scripts}/shutdownmenu.sh"); shutdownMenu = pkgs.writeShellScript "shutdownmenu"
(builtins.readFile "${scripts}/shutdownmenu.sh");
backgroundImage = "${extra}/kuwaitboat.jpg"; backgroundImage = "${extra}/kuwaitboat.jpg";
in { in {
enable = true; enable = true;
@ -29,7 +32,8 @@ in {
xkb_variant = ",eng"; xkb_variant = ",eng";
}; };
}; };
bars = let config = config; in [{ bars = let config = config;
in [{
command = "${pkgs.lib.getExe pkgs.waybar}"; command = "${pkgs.lib.getExe pkgs.waybar}";
position = "top"; position = "top";
inherit fonts; inherit fonts;
@ -38,31 +42,42 @@ in {
border = 2; border = 2;
titlebar = true; titlebar = true;
}; };
keybindings = let screenshotPath = "Pictures/Screenshots/screenshot`date +%Y%m%d%H%M%S`.png"; in lib.mkOptionDefault ({ # Screenshot keybinds keybindings = let
"Print" = "exec grim - | wl-copy && wl-paste > ${screenshotPath}"; # Take screenshot of whole screen, save it, and copy it to clipboard screenshotPath =
"Shift+Print" = "exec swaymsg -t get_tree | jq -r '.. | select(.focused?) | .rect | \"\\(.x),\\(.y) \\(.width)x\\(.height)\"' | grim -g - | wl-copy && wl-paste > ${screenshotPath}"; # Take screenshot of current window, save it, and copy it to clipboard "Pictures/Screenshots/screenshot`date +%Y%m%d%H%M%S`.png";
"Ctrl+Print" = "exec bash ${dynscreenshot} ${screenshotPath}"; # Take screenshot of selection, save it, and copy it to clipboard in lib.mkOptionDefault ({ # Screenshot keybinds
"Print" =
"exec grim - | wl-copy && wl-paste > ${screenshotPath}"; # Take screenshot of whole screen, save it, and copy it to clipboard
"Shift+Print" = ''
exec swaymsg -t get_tree | jq -r '.. | select(.focused?) | .rect | "\(.x),\(.y) \(.width)x\(.height)"' | grim -g - | wl-copy && wl-paste > ${screenshotPath}''; # Take screenshot of current window, save it, and copy it to clipboard
"Ctrl+Print" =
"exec bash ${dynscreenshot} ${screenshotPath}"; # Take screenshot of selection, save it, and copy it to clipboard
} // { # Function Media Keys } // { # Function Media Keys
XF86MonBrightnessUp = "exec bash ${changebrightness} 1"; XF86MonBrightnessUp = "exec bash ${changebrightness} 1";
XF86MonBrightnessDown = "exec bash ${changebrightness} -1"; XF86MonBrightnessDown = "exec bash ${changebrightness} -1";
XF86AudioMute = "exec wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"; XF86AudioMute = "exec wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
"${mod}+XF86AudioMute" = "exec wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"; "${mod}+XF86AudioMute" =
"exec wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle";
XF86AudioRaiseVolume = "exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.05+"; XF86AudioRaiseVolume = "exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.05+";
XF86AudioLowerVolume = "exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.05-"; XF86AudioLowerVolume = "exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.05-";
"${mod}+XF86AudioRaiseVolume" = "exec wpctl set-volume @DEFAULT_AUDIO_SOURCE@ 0.05+"; "${mod}+XF86AudioRaiseVolume" =
"${mod}+XF86AudioLowerVolume" = "exec wpctl set-volume @DEFAULT_AUDIO_SOURCE@ 0.05-"; "exec wpctl set-volume @DEFAULT_AUDIO_SOURCE@ 0.05+";
"${mod}+XF86AudioLowerVolume" =
"exec wpctl set-volume @DEFAULT_AUDIO_SOURCE@ 0.05-";
"${mod}+Shift+e" = null; "${mod}+Shift+e" = null;
XF86AudioMedia = "dunstctl set-paused toggle; dunstify -a 'dunst_mute_key' -u low -h string:x-dunst-stack-tag:dunst_mute_key 'Notifications mute toggled'"; XF86AudioMedia =
XF86PowerOff = "exec DMENU_COMMAND='${dmenuCommand}' bash ${shutdownMenu}"; "dunstctl set-paused toggle; dunstify -a 'dunst_mute_key' -u low -h string:x-dunst-stack-tag:dunst_mute_key 'Notifications mute toggled'";
XF86PowerOff =
"exec DMENU_COMMAND='${dmenuCommand}' bash ${shutdownMenu}";
} // { } // {
"${mod}+space" = "input \"*\" xkb_switch_layout next"; "${mod}+space" = ''input "*" xkb_switch_layout next'';
} // { } // { });
}); menu = "j4-dmenu-desktop --no-generic --term=${
menu = "j4-dmenu-desktop --no-generic --term=${pkgs.lib.getExe inputs.terminal} --dmenu='${dmenuCommand}'"; pkgs.lib.getExe inputs.terminal
} --dmenu='${dmenuCommand}'";
focus.followMouse = false; focus.followMouse = false;
}; };
extraConfig = extraConfig = ''
''
output 'eDP-1' scale 1.50 output 'eDP-1' scale 1.50
'' + # Fractional scaling to 1.50 '' + # Fractional scaling to 1.50
'' ''

View file

@ -1,8 +1,4 @@
{ {
enable = true; enable = true;
profiles = { profiles = { main = { isDefault = true; }; };
main = {
isDefault = true;
};
};
} }

View file

@ -1,13 +1,22 @@
{ scripts, config, lib, pkgs, terminal, ... }: { scripts, config, lib, pkgs, terminal, ... }:
let let terminalExec = "${pkgs.lib.getExe terminal} -e";
terminalExec = "${pkgs.lib.getExe terminal} -e"; in {
in
{
enable = true; enable = true;
settings = [{ settings = [{
modules-left = [ "sway/workspaces" ]; modules-left = [ "sway/workspaces" ];
modules-right = [ "pulseaudio" "bluetooth" "network" "cpu" "memory" "disk" "battery" "tray" "sway/language" "clock" ]; modules-right = [
"pulseaudio"
"bluetooth"
"network"
"cpu"
"memory"
"disk"
"battery"
"tray"
"sway/language"
"clock"
];
"sway/workspaces" = { "sway/workspaces" = {
enable-bar-scroll = true; enable-bar-scroll = true;
disable-scroll-wraparound = true; disable-scroll-wraparound = true;
@ -39,18 +48,17 @@ in
format = " {status}"; format = " {status}";
format-disabled = ""; # hide module format-disabled = ""; # hide module
format-connected = " {num_connections}"; format-connected = " {num_connections}";
tooltip-format = "{controller_alias}\t{controller_address}"; tooltip-format = "{controller_alias} {controller_address}";
tooltip-format-connected = "{controller_alias}\t{controller_address}\n\n{device_enumerate}"; tooltip-format-connected = ''
tooltip-format-enumerate-connected = "{device_alias}\t{device_address}"; {controller_alias} {controller_address}
{device_enumerate}'';
tooltip-format-enumerate-connected = "{device_alias} {device_address}";
on-click = "exec blueman-manager"; on-click = "exec blueman-manager";
on-click-right = "exec bluetoothctl disconnect"; on-click-right = "exec bluetoothctl disconnect";
}; };
cpu = { cpu = { format = "{usage}% "; };
format = "{usage}% "; memory = { format = "{used:0.1f}GB/{total:0.1f}GB "; };
};
memory = {
format = "{used:0.1f}GB/{total:0.1f}GB ";
};
disk = { disk = {
format = "{used} "; format = "{used} ";
path = "/"; path = "/";
@ -74,13 +82,16 @@ in
"sway/language" = { "sway/language" = {
format = "eriuu"; format = "eriuu";
tooltip-format = "boofer"; tooltip-format = "boofer";
on-click = "swaymsg input \"*\" xkb_switch_layout next"; on-click = ''swaymsg input "*" xkb_switch_layout next'';
}; };
clock = { clock = {
interval = 1; interval = 1;
format = "{:L%H:%M:%S %a %F}"; format = "{:L%H:%M:%S %a %F}";
locale = "fr_CA.utf8"; # TODO fix this; I don't want it to be hardcoded but rather tied to i18n.defaultLocale locale =
tooltip-format = "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>"; "fr_CA.utf8"; # TODO fix this; I don't want it to be hardcoded but rather tied to i18n.defaultLocale
tooltip-format = ''
<big>{:%Y %B}</big>
<tt><small>{calendar}</small></tt>'';
}; };
}]; }];
style = '' style = ''
@ -89,14 +100,12 @@ in
font-size: 12pt; font-size: 12pt;
min-height: 20pt; min-height: 20pt;
} }
'' + '' + ''
''
window#waybar { window#waybar {
background: rgba(34, 34, 34, 1); background: rgba(34, 34, 34, 1);
color: white; color: white;
} }
'' + '' + ''
''
#workspaces button { #workspaces button {
padding: 0 3px; padding: 0 3px;
background: rgba(34, 34, 34, 1); background: rgba(34, 34, 34, 1);
@ -104,8 +113,7 @@ in
border-radius: 0; border-radius: 0;
color: white; color: white;
} }
'' + '' + ''
''
#workspaces button.focused { #workspaces button.focused {
background: rgba(40, 85, 119, 1); background: rgba(40, 85, 119, 1);
} }
@ -116,8 +124,7 @@ in
padding-left: 5px; padding-left: 5px;
padding-right: 5px; padding-right: 5px;
} }
'' + '' + ''
''
#battery.warning:not(.charging) { #battery.warning:not(.charging) {
background: rgba(140, 0, 0, 1); background: rgba(140, 0, 0, 1);
} }
@ -126,6 +133,5 @@ in
background: #ffffff; background: #ffffff;
color: black; color: black;
} }
'' + '' + "";
"";
} }