From ba7e4d52d533199a41161740427738cc53ea4215 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Sun, 25 Oct 2020 00:33:20 -0500 Subject: [PATCH] Fix pulseaudio indicator in waybar --- apps/de/sway/config | 12 +++++------- apps/de/waybar/config | 15 ++++++++------- apps/de/waybar/style.css | 3 +-- apps/kitty/kitty.conf | 10 +--------- bin/app-launcher | 7 ++----- bin/floating-term | 27 +++++++-------------------- bin/term | 3 --- env/laptop/sway/config.d/main | 10 ++++------ env/nix/machines/third.nix | 5 ++++- env/nix/modules/de/sway.nix | 8 +++++--- env/nix/modules/docker.nix | 4 +--- env/nix/modules/lightdm.nix | 4 ++++ env/nix/modules/pulseaudio.nix | 1 + env/nix/modules/tmux.nix | 3 +++ env/nix/modules/users/daniel.nix | 1 + env/nix/profiles/base.nix | 4 +--- 16 files changed, 48 insertions(+), 69 deletions(-) delete mode 100755 bin/term diff --git a/apps/de/sway/config b/apps/de/sway/config index 35953d1..4a1cb67 100644 --- a/apps/de/sway/config +++ b/apps/de/sway/config @@ -1,3 +1,5 @@ +include $HOME/.env/sway/config.d/main + # TODO: # # + Super+r should rotate the selected group of windows. @@ -9,9 +11,9 @@ set $left h set $down j set $up k set $right l -set $term term -set $fterm floating-term -set $menu app-launcher +set $term kitty +set $fterm /home/daniel/.home/.config/dotfiles/bin/floating-term +set $menu /home/daniel/.home/.config/dotfiles/bin/app-launcher set $fileexplorer thunar output * bg $HOME/.wallpaper fill @@ -27,7 +29,6 @@ bindsym Control+Space exec makoctl dismiss bindsym $mod+Return exec $term bindsym $mod+shift+Return exec $fterm bindsym $mod+t exec $term -bindsym $mod+Alt+Return exec urxvt bindsym $mod+Shift+Alt+Return exec kitty bindsym $mod+c kill bindsym $mod+Shift+c kill # TODO: kill -9? @@ -162,6 +163,3 @@ exec mako exec gammastep -t 6500:3500 -l 39.0:-94.5 exec_always makoctl reload exec_always notify-send -a "Sway" -i ~/.wallpaper "Sway configuration loaded." - -include $ENV_PATH/sway/config.d/* - diff --git a/apps/de/waybar/config b/apps/de/waybar/config index 4e9565c..a8554ef 100644 --- a/apps/de/waybar/config +++ b/apps/de/waybar/config @@ -54,7 +54,7 @@ "interval": 3 }, "memory": { - "format": "{} " + "format": "{} " }, "temperature": { // "thermal-zone": 2, @@ -92,14 +92,14 @@ }, "pulseaudio": { // "scroll-step": 1, // %, can be a float - "format": "{volume} {icon} {format_source}", + "format": "{volume} {icon} {format_source}", //"format": "{volume}% {icon} {format_source}", //"format-bluetooth": "{volume}% {icon} {format_source}", //"format-bluetooth-muted": " {icon} {format_source}", - //"format-muted": " {format_source}", - "format-muted": " {format_source}", - "format-source": "", - "format-source-muted": "", + //"format-muted": " {format_source}", + "format-muted": " {format_source}", + "format-source": "", + "format-source-muted": "", "format-icons": { "headphones": "", "handsfree": "", @@ -107,8 +107,9 @@ "phone": "", "portable": "", "car": "", - "default": ["", "", ""] + "default": ["", "", ""] }, + // TODO: toggle mute? "on-click": "pavucontrol" } } diff --git a/apps/de/waybar/style.css b/apps/de/waybar/style.css index 6f47ab3..a3b69d0 100644 --- a/apps/de/waybar/style.css +++ b/apps/de/waybar/style.css @@ -1,8 +1,7 @@ * { border: none; border-radius: 0; - /* `otf-font-awesome` is required to be installed for icons */ - font-family: "Iosevka", Roboto, Helvetica, Arial, sans-serif; + font-family: "Iosevka", "Font Awesome 5 Free", sans-serif; font-size: 16px; min-height: 0; } diff --git a/apps/kitty/kitty.conf b/apps/kitty/kitty.conf index d8f9366..54af113 100644 --- a/apps/kitty/kitty.conf +++ b/apps/kitty/kitty.conf @@ -4,8 +4,6 @@ repaint_delay 5 input_delay 1 sync_to_monitor no -# font_features Iosevka Fixed SS07 Medium -liga -dlig -calt - font_size 11.0 adjust_line_height 0 window_padding_width 10.0 @@ -22,15 +20,11 @@ enable_audio_bell yes url_style curly -# https://google.com - strip_trailing_spaces smart kitty_mod ctrl+shift+alt open_url_modifiers ctrl -# dark theme - # TODO: generate via color scheme generator background #111111 @@ -55,7 +49,7 @@ color13 #f5f4f1 color14 #cc6633 color15 #f9f8f5 -# color18 #333333 +color18 #333333 # # light theme # @@ -82,9 +76,7 @@ color15 #f9f8f5 # color15 #f9f8f5 # # color18 #cccccc -# -color18 #333333 kitty_mod ctrl+shift+alt open_url_modifiers ctrl wheel_scroll_multiplier 5.0 diff --git a/bin/app-launcher b/bin/app-launcher index ed2e008..3560a34 100755 --- a/bin/app-launcher +++ b/bin/app-launcher @@ -1,7 +1,4 @@ #!/usr/bin/env sh -if is_wayland; then - floating-term sh -c "launch | xargs swaymsg exec --" -else - rofi -combi-modi run,window -show combi -modi combi -sorting-method fzf --sort "$@" -fi +source "$HOME/.config/dotfiles/bin/prelude" +floating-term sh -c "launch | xargs swaymsg exec --" diff --git a/bin/floating-term b/bin/floating-term index 98680dd..9cb8688 100755 --- a/bin/floating-term +++ b/bin/floating-term @@ -1,21 +1,8 @@ -#!/usr/bin/env bash +#!/usr/bin/env sh -# TODO: geomoetry flags? - -flags=("") -case "$TERMINAL" in - kitty ) - flags=(-o remember_window_size=no -o initial_window_width=60c -o initial_window_height=12c --class floating_terminal) - ;; - - # TODO: rxvt? -esac - -if is_wayland; then - # wayland only needs app_id or class set to "floating_terminal" - : # no-op -else - bspc rule -a '*' -o state=floating -fi - -"$TERMINAL" "${flags[@]}" "$@" +kitty \ + -o remember_window_size=no \ + -o initial_window_width=60c \ + -o initial_window_height=12c \ + --class floating_terminal \ + "$@" diff --git a/bin/term b/bin/term deleted file mode 100755 index ae16d6f..0000000 --- a/bin/term +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash - -"$TERMINAL" diff --git a/env/laptop/sway/config.d/main b/env/laptop/sway/config.d/main index 61a3a53..d0fb39f 100644 --- a/env/laptop/sway/config.d/main +++ b/env/laptop/sway/config.d/main @@ -1,6 +1,8 @@ -exec libinput-gestures -c $DOTFILES_PATH/apps/de/libinput/sway-gestures.conf +# TODO: setup displays (when docked for work?) +output eDP-1 res 1600x900 pos 0 0 -# exec swayidle -w timeout 300 'swaylock -f -c 000000' timeout 600 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' before-sleep 'swaylock -f -c 000000' +exec libinput-gestures -c $HOME/.config/dotfiles/apps/de/libinput/sway-gestures.conf +exec swayidle -w timeout 300 'swaylock -f -c 000000' timeout 600 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' before-sleep 'swaylock -f -c 000000' bindswitch lid:toggle exec swaylock @@ -15,7 +17,3 @@ input type:touchpad { input type:keyboard { xkb_options ctrl:nocaps } - -# TODO: setup displays (when docked for work?) -output eDP-1 res 1600x900 pos 0 0 - diff --git a/env/nix/machines/third.nix b/env/nix/machines/third.nix index ad3fd7e..ff114cc 100644 --- a/env/nix/machines/third.nix +++ b/env/nix/machines/third.nix @@ -22,7 +22,10 @@ enable = true; }; - console.font = "TER16x32"; + console.useXkbConfig = true; + services.xserver.xkbOptions = "ctrl:nocaps"; + # TODO: setup caps-lock as Control/Escape? + # console.font = "TER16x32"; # services.upower = { # enable = true; diff --git a/env/nix/modules/de/sway.nix b/env/nix/modules/de/sway.nix index 1005883..f41dce1 100644 --- a/env/nix/modules/de/sway.nix +++ b/env/nix/modules/de/sway.nix @@ -10,9 +10,9 @@ in { extraPackages = with pkgs; [ swaylock swayidle - xwayland - waybar + unstable.xwayland mako + waybar kanshi wl-clipboard slurp @@ -21,6 +21,9 @@ in { unstable.gammastep ]; extraSessionCommands = '' + systemctl --user import-environment + export TERMINAL=kitty + export BROWSER=firefox-devedition export WLC_REPEAT_DELAY=200 export WLC_REPEAT_RATE=60 export CLUTTER_BACKEND=wayland @@ -30,7 +33,6 @@ in { export XDG_CURRENT_DESKTOP=sway ''; }; - waybar.enable = true; }; services = { pipewire.enable = true; diff --git a/env/nix/modules/docker.nix b/env/nix/modules/docker.nix index c38dee1..cc3ce8c 100644 --- a/env/nix/modules/docker.nix +++ b/env/nix/modules/docker.nix @@ -3,7 +3,5 @@ enable = true; enableOnBoot = false; }; - environment.systemPackages = with pkgs; [ - docker docker-compose - ]; + environment.systemPackages = [ pkgs.docker-compose ]; } diff --git a/env/nix/modules/lightdm.nix b/env/nix/modules/lightdm.nix index aad1fe0..92bcfa8 100644 --- a/env/nix/modules/lightdm.nix +++ b/env/nix/modules/lightdm.nix @@ -14,6 +14,10 @@ name = "Arc-Dark"; }; clock-format = "%H:%M:%S"; + extraConfig = '' + xft-dpi=260 + font-name=Iosevka + ''; }; # background = ""; }; diff --git a/env/nix/modules/pulseaudio.nix b/env/nix/modules/pulseaudio.nix index 20ae008..76ab651 100644 --- a/env/nix/modules/pulseaudio.nix +++ b/env/nix/modules/pulseaudio.nix @@ -4,5 +4,6 @@ support32Bit = true; package = pkgs.pulseaudioFull; }; + nixpkgs.config.pulseaudio = true; sound.enable = true; } diff --git a/env/nix/modules/tmux.nix b/env/nix/modules/tmux.nix index ea9ad57..5949874 100644 --- a/env/nix/modules/tmux.nix +++ b/env/nix/modules/tmux.nix @@ -1,4 +1,7 @@ { config, pkgs, ... }: { environment.systemPackages = [ pkgs.tmux ]; + programs.tmux = { + enable = true; + }; } diff --git a/env/nix/modules/users/daniel.nix b/env/nix/modules/users/daniel.nix index ef55ff0..469d72d 100644 --- a/env/nix/modules/users/daniel.nix +++ b/env/nix/modules/users/daniel.nix @@ -33,6 +33,7 @@ autoconf ncurses weechat + # thunar thunar-archive-plugin thunar-volman ]; }; } diff --git a/env/nix/profiles/base.nix b/env/nix/profiles/base.nix index 1c45506..dfe2421 100644 --- a/env/nix/profiles/base.nix +++ b/env/nix/profiles/base.nix @@ -6,7 +6,6 @@ ../modules/neovim.nix ]; i18n.defaultLocale = "en_US.UTF-8"; - console.keyMap = "us"; time.timeZone = "America/Chicago"; environment = { @@ -19,6 +18,7 @@ pciutils usbutils binutils ripgrep sd fd unzip + killall ]; variables = { PAGER = "less"; @@ -58,7 +58,5 @@ "a1efe4" "f9f8f5" ]; - # useXkbConfig = true; - # TODO: setup caps-lock as Control/Escape? }; }