added rofi for defualt sing

This commit is contained in:
Alexander Szczepanski
2021-08-28 22:47:33 +02:00
parent 19303de17d
commit f8a3e7410d
5 changed files with 35 additions and 159 deletions

View File

@ -1,4 +1,4 @@
#!/usr/bin/env bash
#!/usr/bin/env zsh
sudo rsync -ah --delete --progress `pwd`/ /root/nixos/
sudo rm /etc/nixos/configuration.nix

View File

@ -0,0 +1,7 @@
#!/usr/bin/env zsh
sink=$(ponymix -t sink list | awk '/^sink/ {s=$1" "$2;getline;gsub(/^ +/,"",$0);print s" "$0}' | rofi -dmenu -p 'default sink' | grep -Po '[0-9]+(?=:)') &&
ponymix set-default -d $sink &&
for input in $(ponymix list -t sink-input | grep -Po '[0-9]+(?=:)');do
echo "$input -> $sink"
ponymix -t sink-input -d $input move $sink
done

View File

@ -1,157 +1,6 @@
{ pkgs, ... }:
{
environment.etc."polybar.conf" = {
text = ''
[colors]
foreground = #666
foreground-alt = #FFF
background = #000
background-alt = #ABC
accent = #333
info = #689eca
warn = #d08292
[bar/default]
monitor = ''${env:MONITOR:VGA-1}
width = 100%
height = 32
offset-x = 0
offset-y = 0
;radius = 8.0
fixed-center = true
; Put the bar at the bottom of the screen
;bottom = true
background = ''${colors.background}
foreground = ''${colors.foreground}
border-size = 1
border-color = ''${colors.background-alt}
padding-left = 3
padding-right = 1
module-margin-left = 0
module-margin-right = 1
font-0 = Liberation Sans Regular:size=16;4
font-1 = Font Awesome 5 Free Solid:size=14;3
font-2 = Noto Emoji:size=14;4
font-3 = DejaVu Sans:size=14;2
font-4 = Font Awesome 5 Free Regular:size=14;3
modules-left = xwindow
modules-center =
modules-right = temperature clock bspwm
tray-position = center
tray-padding = 2
tray-maxsize = 24
wm-restack = bspwm
override-redirect = false
scroll-up = bspwm-desknext
scroll-down = bspwm-deskprev
cursor-click = default
cursor-scroll = default
enable-ipc = true
[module/onboard]
type = custom/script
exec-if = test -x /usr/bin/onboard
exec = echo
click-left = onboard &
interval = 3600
format-foreground = ''${colors.foreground-alt}
[module/clock]
type = custom/script
exec = date '+ %a %_d %b %_H:%M ' | sed 's/ / /g'
interval = 30
format-foreground = ''${colors.foreground}
label-font = 1
[module/xwindow]
type = internal/xwindow
label = %title:0:92:%
label-font = 1
label-empty =
label-empty-font = 3
label-empty-foreground = ''${colors.accent}
[module/bspwm]
type = internal/bspwm
format = <label-mode><label-state>
format-foreground = ''${colors.foreground}
label-focused = " "
label-focused-foreground = ''${colors.accent}
label-focused-padding = 0
label-focused-font = 2
label-occupied = " "
label-occupied-padding = 0
label-occupied-foreground = ''${colors.foreground-alt}
label-occupied-font = 5
label-urgent = " "
label-urgent-foreground = ''${colors.info}
label-urgent-padding = 0
label-urgent-font = 2
label-empty = " "
label-empty-foreground = ''${colors.background-alt}
label-empty-padding = 0
label-empty-font = 5
label-dimmed-focused = " "
label-dimmed-focused-foreground = ''${colors.foreground-alt}
label-dimmed-font = 2
label-floating = " "
label-pseudotiled = " "
label-floating-foreground = ''${colors.foreground-alt}
label-pseudotiled-foreground = ''${colors.foreground-alt}
[module/temperature]
type = internal/temperature
thermal-zone = 2
warn-temperature = 75
interval = 5
format =
format-underline =
format-warn = <ramp> <label-warn>
label = %temperature-c%
label-font = 1
label-warn = %temperature-c%
label-warn-foreground = ''${colors.warn}
label-warn-font = 1
ramp-0 =
ramp-1 =
ramp-2 =
ramp-foreground = ''${colors.warn}
[settings]
screenchange-reload = true
compositing-overline = source
compositing-underline = source
compositing-background = source
compositing-foreground = source
compositing-border = source
[global/wm]
margin-top = 0
margin-bottom = 0
'';
};
environment.etc.bspwmrc = {
mode = "0645";
text = ''

View File

@ -16,6 +16,7 @@
};
environment.systemPackages = with pkgs; [
ponymix
libsecret
baobab
barrier

View File

@ -3,11 +3,28 @@
imports = [ <home-manager/nixos> ];
home-manager.users.alex = { pkgs, ... }: {
home.packages = with pkgs; [
home = {
file = {
".bin/rofi-default-sink.sh" = {
executable = true;
source = ./.bin/rofi-default-sink.sh;
};
};
packages = with pkgs; [
spotify
signal-desktop
bitwarden
teams
];
};
xdg.desktopEntries = {
defaultSink = {
name = "Default Sink";
exec = "/home/alex/.bin/rofi-default-sink.sh";
terminal = false;
};
};
programs = {
vscode = {
@ -180,8 +197,8 @@
sxhkd = {
enable = true;
keybindings = {
"super + z" = "notify-send Time $(date '+%H:%M')";
"super + x" = "notify-send Battery $(cat /sys/class/power_supply/BAT0/capacity)%";
"super + x" = "notify-send Time $(date '+%H:%M')";
"super + z" = "notify-send Battery $(cat /sys/class/power_supply/BAT0/capacity)%";
"alt + Tab" = "rofi -show window";
"super + Return" = "kitty";
"super + shift + Return" = "rofi -show drun";
@ -214,6 +231,8 @@
duskTime = "21:00-22:00";
dawnTime = "06:30-07:00";
};
flameshot.enable = true;
};
# manuals not needed