diff --git a/features/client/sway.nix b/features/client/sway.nix index fb2aa36..423cb03 100644 --- a/features/client/sway.nix +++ b/features/client/sway.nix @@ -4,9 +4,11 @@ grim slurp wl-clipboard + xdg-utils + sway-contrib.grimshot ]; - services.gnome.gnome-keyring.enable = true; + services.gnome.gnome-keyring.enable = true; programs.sway = { enable = true; wrapperFeatures.gtk = true; @@ -16,4 +18,5 @@ security.pam.loginLimits = [ { domain = "@users"; item = "rtprio"; type = "-"; value = 1; } ]; + } diff --git a/home-manager/dotfiles/sway/config b/home-manager/dotfiles/sway/config index 3e72535..32fee11 100755 --- a/home-manager/dotfiles/sway/config +++ b/home-manager/dotfiles/sway/config @@ -180,8 +180,8 @@ input * { # If there are multiple scratchpad windows, this command cycles through them. #bindsym $mod+minus scratchpad show # useful shortcuts -bindsym Print exec grim -g $(slurp) | wl-copy -bindsym Ctrl+Print exec grim $screenshot_folder/$(date +'%s_grim.png') +bindsym Print exec ./screen_and_copy.sh area +bindsym Ctrl+Print exec ./screen_and_copy.sh output bindsym --locked XF86AudioMute exec wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle bindsym --locked XF86AudioLowerVolume exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- -l 1.2 bindsym --locked XF86AudioRaiseVolume exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+ -l 1.2 diff --git a/home-manager/dotfiles/sway/screen_and_copy.sh b/home-manager/dotfiles/sway/screen_and_copy.sh new file mode 100755 index 0000000..95b05ec --- /dev/null +++ b/home-manager/dotfiles/sway/screen_and_copy.sh @@ -0,0 +1,7 @@ +if [[ "$1" = "area" ]]; then + SCREENPATH=$(grimshot save area) +elif [ "$1" = "output" ]; then + SCREENPATH=$(grimshot save output) +fi + +cat $SCREENPATH | wl-copy -t image/png diff --git a/home-manager/dotfiles/waybar/config.jsonc b/home-manager/dotfiles/waybar/config.jsonc index 42a0310..e890156 100644 --- a/home-manager/dotfiles/waybar/config.jsonc +++ b/home-manager/dotfiles/waybar/config.jsonc @@ -1,15 +1,37 @@ { - "layer": "top", - "modules-left": ["sway/workspaces", "sway/mode"], - "modules-center": [], - "modules-right": ["wireplumber","bluetooth", "clock"], - "clock": { - "format-alt": "{:%a, %d. %b %H:%M}" - }, - "wireplumber": { - "format": "{volume}%", - "format-muted": "", - "max-volume": 120, - "scroll-step": 0.2 - } + "layer": "top", + "modules-left": ["sway/workspaces", "sway/mode"], + "modules-center": ["wireplumber", "mpris"], + "modules-right": ["bluetooth", "clock", "privacy"], + "clock": { + "format-alt": "{:%a, %d. %b %H:%M}" + }, + "wireplumber": { + "format": " {volume}%", + "format-muted": "", + "max-volume": 120, + "scroll-step": 0.2 + }, + "privacy": { + "icon-spacing": 4, + "icon-size": 18, + "transition-duration": 250, + "modules": [ + { + "type": "screenshare", + "tooltip": true, + "tooltip-icon-size": 24 + }, + { + "type": "audio-out", + "tooltip": true, + "tooltip-icon-size": 24 + }, + { + "type": "audio-in", + "tooltip": true, + "tooltip-icon-size": 24 + } + ] + }, } diff --git a/home-manager/dotfiles/waybar/style.css b/home-manager/dotfiles/waybar/style.css index e69de29..58ff46d 100644 --- a/home-manager/dotfiles/waybar/style.css +++ b/home-manager/dotfiles/waybar/style.css @@ -0,0 +1,19 @@ +* { + font-family: "CodeNewRoman Nerd Font"; + font-weight: bold; + font-size: 14px; + color: #fff; +} + +window#waybar { + background-color: rgba(254, 254, 254, 0.6); + +} + +#clock, #battery, #cpu, #wireplumber, #bluetooth { + padding: 0 12px; +} + +#workspaces button.focused { + background-color: #7b002c; +} diff --git a/home-manager/home.nix b/home-manager/home.nix index a70495e..a8f4035 100644 --- a/home-manager/home.nix +++ b/home-manager/home.nix @@ -1,4 +1,4 @@ -{ config, pkgs, osConfig, inputs, ... }: +{ config, pkgs, lib, osConfig, inputs, ... }: { # Home Manager needs a bit of information about you and the paths it should @@ -86,6 +86,12 @@ inputs.anyrun.homeManagerModules.default ]; + programs.direnv = { + enable = true; + enableBashIntegration = true; # see note on other shells below + nix-direnv.enable = true; + }; + programs.anyrun = { enable = true; config = { diff --git a/hosts/goober/features/hardware/bluetooth.nix b/hosts/goober/features/hardware/bluetooth.nix index cf7051e..e8587d8 100644 --- a/hosts/goober/features/hardware/bluetooth.nix +++ b/hosts/goober/features/hardware/bluetooth.nix @@ -1,6 +1,8 @@ {config, pkgs, ...}: { - hardware.bluetooth.enable = true; # enables support for Bluetooth - hardware.bluetooth.powerOnBoot = true; # powers up the default Bluetooth controller on boot + hardware.bluetooth = { enable = true; # enables support for Bluetooth + + powerOnBoot = true; # powers up the default Bluetooth controller on boot + }; services.blueman.enable = true; systemd.user.services.mpris-proxy = { @@ -15,4 +17,10 @@ Experimental = true; }; }; + + services.pipewire.wireplumber.extraConfig."11-bluetooth-policy" = { + "wireplumber.settings" = { + "bluetooth.autoswitch-to-headset-profile" = false; + }; + }; } diff --git a/hosts/goober/features/hardware/pipewire.nix b/hosts/goober/features/hardware/pipewire.nix index 9c115fc..668350f 100644 --- a/hosts/goober/features/hardware/pipewire.nix +++ b/hosts/goober/features/hardware/pipewire.nix @@ -1,4 +1,4 @@ -{config, ...}: +{config, pkgs, ...}: { security.rtkit.enable = true; services.pipewire = { @@ -6,8 +6,8 @@ alsa.enable = true; alsa.support32Bit = true; pulse.enable = true; - # If you want to use JACK applications, uncomment this jack.enable = true; + wireplumber.extraConfig."10-bluez" = { "monitor.bluez.properties" = { "bluez5.enable-sbc-xq" = true; @@ -22,4 +22,8 @@ }; }; }; + + environment.systemPackages = [ + pkgs.pwvucontrol + ]; }