Add initial working polybar

This commit is contained in:
Evie Litherland-Smith 2023-04-05 22:30:11 +01:00
parent bdfcda93bd
commit 56ae5967fa
20 changed files with 211 additions and 1229 deletions

View file

@ -11,9 +11,16 @@
desktopManager.xfce = {
enable = true;
enableXfwm = false;
noDesktop = true;
};
windowManager.bspwm.enable = true;
displayManager.defaultSession = "xfce+bspwm";
displayManager = {
defaultSession = "xfce+bspwm";
sessionCommands = ''
xwallpaper --daemon --center $HOME/.dotfiles/wallpaper/images_dark/1920x1080.png
${pkgs.xorg.xinput}/bin/xinput set-button-map "Logitech USB Receiver Mouse" 3 2 1
'';
};
};
programs.i3lock = {
enable = true;

View file

@ -2,14 +2,6 @@
{
services.polybar = {
enable = true;
script = ''
POLYBAR_CONFIG_DIR="$HOME/.dotfiles/polybar"
polybar -c "$POLYBAR_CONFIG_DIR/config" pam1 &
polybar -c "$POLYBAR_CONFIG_DIR/config" pam2 &
polybar -c "$POLYBAR_CONFIG_DIR/config" pam3 &
polybar -c "$POLYBAR_CONFIG_DIR/config" pam4 &
polybar -c "$POLYBAR_CONFIG_DIR/config" pam5 &
polybar -c "$POLYBAR_CONFIG_DIR/config" pam6 &
'';
script = "polybar -c $HOME/.dotfiles/polybar/polybar.ini &";
};
}

View file

@ -5,7 +5,7 @@
./sxhkd.nix
./picom.nix
./rofi.nix
#./polybar.nix
./polybar.nix
];
home.packages = with pkgs; [
catppuccin-gtk
@ -16,6 +16,9 @@
power-profiles-daemon
];
xfconf.settings = {
xfce4-session = {
"general/LockCommand" = "${pkgs.i3lock-fancy}/bin/i3lock-fancy";
};
xsettings = {
"Net/ThemeName" = "Catppuccin-Frappe-Standard-Blue-Dark";
"Gtk/CursorThemeName" = "Catppuccin-Macchiato-Dark-Cursors";

View file

@ -1,8 +1,11 @@
{ pkgs, ... }:
{
services.nextcloud-client = {
enable = true;
startInBackground = true;
};
home.packages = with pkgs; [
nextcloud-client
zotero
];
}

View file

@ -22,7 +22,14 @@
};
};
home.packages = with pkgs; [
(nerdfonts.override { fonts = [ "FiraCode" ]; })
fira-code
iosevka
(nerdfonts.override {
fonts = [
"FiraCode"
"Iosevka"
];
})
file
silver-searcher
];

View file

@ -29,9 +29,6 @@
user = "xenia";
};
# Fix Logitech MX Master buttons being inverted
sessionCommands = ''
${pkgs.xorg.xinput}/bin/xinput set-button-map "Logitech USB Receiver Mouse" 3 2 1
'';
};
# Set up home manager for user

View file

@ -1,29 +0,0 @@
[color]
;; Dark Add FC at the beginning #FC1E1F29 for 99 transparency
bg = #2f354b
bg-alt = #BF1D1F28
fg = #FDFDFD
trans = #00000000
white = #FFFFFF
black = #000000
;; Colors
red = #F37F97
pink = #EC407A
purple = #C574DD
blue = #8897F4
cyan = #79E6F3
teal = #00B19F
green = #5ADECD
lime = #B9C244
yellow = #F2A272
amber = #FBC02D
orange = #E57C46
brown = #AC8476
grey = #8C8C8C
indigo = #6C77BB
blue-gray = #6D8895

View file

@ -1,373 +0,0 @@
[global/wm]
margin-bottom = 0
margin-top = 0
include-file = ~/.dotfiles/polybar/system
include-file = ~/.dotfiles/polybar/colors.ini
# contains brightness, workspaces, Date, etc.... #
include-file = ~/.dotfiles/polybar/modules/modules
# contains Music, microphone, etc.... #
include-file = ~/.dotfiles/polybar/modules/mediaModules
# contains CPU, Temperature, etc.... #
include-file = ~/.dotfiles/polybar/modules/monitoringModules
# contains the separators (e.g  , | , <| ,  ,etc..) #
include-file = ~/.dotfiles/polybar/modules/separatorsModules
## ---------------------------------- [bar/pam1] ---------------------------------- ##
[bar/pam1]
monitor =
monitor-fallback =
monitor-strict = false
override-redirect = false
bottom = false
fixed-center = true
width = 2.5%
height = 40
offset-x = 2%
offset-y = 10
background = ${color.bg-alt}
foreground = ${color.fg}
radius = 6
line-size = 2
line-color = ${color.blue}
border-size = 2
border-color = ${color.bg}
padding = 0
module-margin-left = 0
module-margin-right = 0
font-0 = "Iosevka Nerd Font:size=10;3"
font-1 = "Iosevka Nerd Font:size=12;3"
font-2 = "google\-mdi:size=12;3"
font-3 = "Iosevka:style=bold:size=12;3"
font-4 = "Iosevka Nerd Font:size=18;4"
font-5 = "Iosevka:style=bold:size=18;4"
modules-left =
modules-center = xdomenu
modules-right =
separator =
dim-value = 1.0
wm-restack = bspwm
enable-ipc = true
cursor-click = pointer
cursor-scroll = ns-resize
## ---------------------------------- [bar/pam2] ---------------------------------- ##
[bar/pam2]
monitor =
monitor-fallback =
monitor-strict = false
override-redirect = false
bottom = false
fixed-center = false
width = 17%
height = 40
offset-x = 5%
offset-y = 10
background = ${color.bg-alt}
foreground = ${color.fg}
radius = 6
line-size = 2
line-color = ${color.blue}
border-size = 2
border-color = ${color.bg}
padding = 1
module-margin-left = 0
module-margin-right = 0
font-0 = "Iosevka Nerd Font:size=10;3"
font-1 = "Iosevka Nerd Font:size=12;3"
font-2 = "google\-mdi:size=12;3"
font-3 = "Iosevka:style=bold:size=12;3"
font-4 = "Iosevka Nerd Font:size=18;4"
font-5 = "Iosevka:style=bold:size=18;4"
modules-left = title space bspwm
modules-center =
modules-right =
separator =
dim-value = 1.0
wm-restack = bspwm
enable-ipc = true
cursor-click = pointer
cursor-scroll = ns-resize
## ---------------------------------- [bar/pam3] ---------------------------------- ##
[bar/pam3]
monitor =
monitor-fallback =
monitor-strict = false
override-redirect = false
bottom = false
fixed-center = true
width = 21.5%
height = 40
offset-x = 43.5%
offset-y = 10
background = ${color.bg-alt}
foreground = ${color.fg}
radius = 6
line-size = 2
line-color = ${color.blue}
border-size = 2
border-color = ${color.bg}
padding = 1
module-margin-left = 0
module-margin-right = 0
font-0 = "Iosevka Nerd Font:size=10;3"
font-1 = "Iosevka Nerd Font:size=12;3"
font-2 = "google\-mdi:size=12;3"
font-3 = "Iosevka:style=bold:size=12;3"
font-4 = "Iosevka Nerd Font:size=18;4"
font-5 = "Iosevka:style=bold:size=18;4"
font-6 = "Material Design Icons:style=Bold:size18;4"
modules-left = volume space cpu space cpuTemp space updates-pacman space notification-github space battery
modules-center =
modules-right =
separator =
dim-value = 1.0
wm-restack = bspwm
enable-ipc = true
cursor-click = pointer
cursor-scroll = ns-resize
## ---------------------------------- [bar/pam4] ---------------------------------- ##
[bar/pam4]
monitor =
monitor-fallback =
monitor-strict = false
override-redirect = false
bottom = false
fixed-center = true
width = 20%
height = 40
offset-x = 65.5%
offset-y = 10
background = ${color.bg-alt}
foreground = ${color.fg}
radius = 6
line-size = 2
line-color = ${color.blue}
border-size = 2
border-color = ${color.bg}
padding = 1
module-margin-left = 0
module-margin-right = 0
font-0 = "Iosevka Nerd Font:size=10;3"
font-1 = "Iosevka Nerd Font:size=12;3"
font-2 = "google\-mdi:size=12;3"
font-3 = "Iosevka:style=bold:size=12;3"
font-4 = "Iosevka Nerd Font:size=18;4"
font-5 = "Iosevka:style=bold:size=18;4"
modules-left = themes space brightness space network space mod
modules-center =
modules-right =
separator =
dim-value = 1.0
wm-restack = bspwm
enable-ipc = true
cursor-click = pointer
cursor-scroll = ns-resize
## ---------------------------------- [bar/pam5] ---------------------------------- ##
[bar/pam5]
monitor =
monitor-fallback =
monitor-strict = false
override-redirect = false
bottom = false
fixed-center = false
width = 11.5%
height = 40
offset-x = 86%
offset-y = 10
background = ${color.bg-alt}
foreground = ${color.fg}
radius = 6
line-size = 2
line-color = ${color.blue}
border-size = 2
border-color = ${color.bg}
padding = 1
module-margin-left = 0
module-margin-right = 0
font-0 = "Iosevka Nerd Font:size=10;3"
font-1 = "Iosevka Nerd Font:size=12;3"
font-2 = "google\-mdi:size=12;3"
font-3 = "Iosevka:style=bold:size=12;3"
font-4 = "Iosevka Nerd Font:size=18;4"
font-5 = "Iosevka:style=bold:size=18;4"
modules-left = sysmenu space date
modules-center =
modules-right =
separator =
dim-value = 1.0
tray-position = right
tray-detached = true
tray-maxsize = 16
tray-background = ${color.bg-alt}
tray-offset-x = 0
tray-offset-y = 0
tray-padding = 0
tray-scale = 1.0
wm-restack = bspwm
enable-ipc = true
cursor-click = pointer
cursor-scroll = ns-resize
## ---------------------------------- [bar/pam6] ---------------------------------- ##
[bar/pam6]
monitor =
monitor-fallback =
monitor-strict = false
override-redirect = false
bottom = false
fixed-center = true
width = 20.5%
height = 40
offset-x = 22.5%
offset-y = 10
background = ${color.bg-alt}
foreground = ${color.fg}
radius = 6
line-size = 2
line-color = ${color.blue}
border-size = 2
border-color = ${color.bg}
padding = 2
module-margin-left = 0
module-margin-right = 0
font-0 = "Iosevka Nerd Font:size=10;3"
font-1 = "Iosevka Nerd Font:size=12;3"
font-2 = "google\-mdi:size=12;3"
font-3 = "Iosevka:style=bold:size=12;3"
font-4 = "Iosevka Nerd Font:size=18;4"
font-5 = "Iosevka:style=bold:size=18;4"
modules-left = song
modules-center = info-cava
modules-right = mpd
separator =
dim-value = 1.0
wm-restack = bspwm
enable-ipc = true
cursor-click = pointer
cursor-scroll = ns-resize
[settings]
screenchange-reload = false
compositing-background = source
compositing-foreground = over
compositing-overline = over
compositing-underline = over
compositing-border = over
pseudo-transparency = false

View file

@ -36,4 +36,12 @@
flamingo = #f0c6c6
rosewater = #f4dbd6
transparent = #FF00000
transparent = #00000000
background = ${colors.base}
background-alt = ${colors.crust}
foreground = ${colors.text}
primary = ${colors.lavender}
secondary = ${colors.mauve}
alert = ${colors.red}
disabled = ${colors.surface0}

View file

@ -1,56 +0,0 @@
# Select the right temperature file. #
for temp_dir in /sys/class/hwmon/*; do
[[ "$(< "${temp_dir}/name")" =~ (coretemp|fam15h_power|k10temp) ]] && {
temp_dirs=("$temp_dir"/temp*_input)
temp_dir=${temp_dirs[0]}
break
}
done
# Get CPU temp. #
[[ -f "$temp_dir" ]] && deg="$(($(< "$temp_dir") * 100 / 10000))"
# Add CPU temp to the output. #
if [[ "$cpu_temp" != "off" && "$deg" ]]; then
deg="${deg//.}"
# Convert to Fahrenheit if enabled
[[ "$cpu_temp" == "F" ]] && deg="$((deg * 90 / 50 + 320))"
deg_no_format="${deg/${deg: -1}}"
# Format the output
deg="${deg/${deg: -1}}°${cpu_temp:-C}"
fi
# from 0°C to 40°C print -> 
if [[ "$deg_no_format" -le 40 ]]
then
# the ' %{T3} ' -> pass font type to polybar config file
# the selected font type is number 3, which is (font-3 = "Iosevka:style=bold:"size=12;3" )
echo "%{T3} %{F#79E6F3}$deg"
# from 40°C to 60°C print -> 
elif [[ "$deg_no_format" -le 60 ]]
then
echo "%{T3} %{F#79E6F3}$deg"
# from 60°C to 85°C print -> 
elif [[ "$deg_no_format" -le 85 ]]
then
echo "%{T3} %{F#79E6F3}$deg"
# from 85°C to +... print -> 
elif [[ "$deg_no_format" -gt 85 ]]
then
# the ' -n "%{F#FF0008}" ' -> red font as 85°C to +... is the default warn temperature
echo -n "%{T3}%{F#FF0008} %{F#FF0008}$deg"
fi

View file

@ -1,155 +0,0 @@
[module/volume]
type = internal/pulseaudio
; Sink to be used, if it exists (find using `pacmd list-sinks`, name field)
; If not, uses default sink
sink = alsa_output.pci-0000_12_00.3.analog-stereo
; Use PA_VOLUME_UI_MAX (~153%) if true, or PA_VOLUME_NORM (100%) if false
; Default: true
use-ui-max = false
; Interval for volume increase/decrease (in percent points)
; Default: 5
interval = 5
; format-volume = <ramp-volume> <label-volume>
format-volume =  <bar-volume> <label-volume>
format-volume-foreground = ${color.green}
format-muted = <label-muted>
format-muted-prefix = 婢
format-muted-prefix-font = 3
format-muted-prefix-foreground = ${color.red}
label-volume = %percentage%%
label-volume-font = 4
label-volume-foreground = ${color.green}
label-muted = " Mute"
muted-label-font = 5
label-muted-foreground = ${color.red}
ramp-volume-0 = 奄
ramp-volume-1 = 奄
ramp-volume-2 = 奄
ramp-volume-3 = 奔
ramp-volume-4 = 奔
ramp-volume-5 = 奔
ramp-volume-6 = 墳
ramp-volume-7 = 墳
ramp-volume-8 = 墳
ramp-volume-9 = 墳
ramp-volume-font = 3
ramp-volume-foreground = ${color.green}
ramp-headphones-0 = 
ramp-headphones-1 = 
; Only applies if <bar-volume> is used
bar-volume-width = 10
bar-volume-gradient = false
bar-volume-indicator = 󰮯
bar-volume-indicator-font = 7
bar-volume-indicator-foreground = ${color.green}
bar-volume-fill = ━
bar-volume-fill-font = 7
bar-volume-foreground-0 = ${color.green}
bar-volume-foreground-1 = ${color.green}
bar-volume-foreground-2 = ${color.green}
bar-volume-foreground-3 = ${color.green}
bar-volume-foreground-4 = ${color.green}
bar-volume-empty = ━
bar-volume-empty-font = 7
bar-volume-empty-foreground = ${color.green}
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/mpd]
type = internal/mpd
interval = 2
format-online = <icon-prev> <toggle> <icon-next>
; format-online-background = ${color.mb}
format-offline-foreground = ${color.grey}
format-playing = ${self.format-online}
format-paused = ${self.format-online}
format-stopped = ${self.format-online}
format-offline = <label-offline>
format-offline-prefix = " "
; format-offline-background = ${color.mb}
label-song = "%artist% - %title%"
label-song-maxlen = 25
label-song-ellipsis = true
label-offline = "Offline"
icon-play = 
icon-play-font = 2
icon-play-foreground = ${color.lime}
icon-pause = 
icon-pause-font = 2
icon-pause-foreground = ${color.lime}
icon-stop = 
icon-stop-foreground = ${color.lime}
icon-prev = 玲
icon-prev-font = 1
icon-prev-foreground = ${color.blue}
icon-next = 怜
icon-next-font = 1
icon-next-foreground = ${color.blue}
;;-----------
[module/song]
type = internal/mpd
interval = 2
format-online = "[ <icon-repeat> <label-song> ]"
format-online-foreground = ${color.pink}
format-playing = ${self.format-online}
format-paused = ${self.format-online}
format-stopped = ${self.format-online}
label-song = "%title% - %artist%"
label-song-foreground = ${color.cyan}
label-song-maxlen = 25
label-song-ellipsis = true
icon-repeat = ""
icon-repeat-foreground = #FF0677
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/info-cava]
type = custom/script
exec = ~/.dotfiles/polybar/scripts/cava
format = <label>
label = %output%
format-foreground = ${color.purple}
tail = true
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
; pipewire-microphone
[module/pip-mic]
type = custom/script
exec = ~/.dotfiles/polybar/scripts/pipewire-microphone.sh
tail = true
click-left = ~/.dotfiles/polybar/scripts/pipewire-microphone.sh --toggle &
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_

View file

@ -1,313 +0,0 @@
[module/bna]
type = custom/text
content = " NON"
content-foreground = ${color.pink}
content-prefix = 
content-prefix-font = 2
content-prefix-foreground = ${color.pink}
content-padding = 0
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/backlight]
type = internal/xbacklight
card = intel_backlight
format = <ramp><label>
label = %percentage%%
label-font = 4
label-foreground = ${color.pink}
ramp-0 = " "
ramp-1 = " "
ramp-2 = " "
ramp-3 = " "
ramp-4 = " "
ramp-5 = " "
ramp-6 = " "
ramp-7 = " "
ramp-8 = " "
ramp-9 = " "
ramp-font = 7
ramp-foreground = ${color.pink}
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/brightness]
type = internal/backlight
card = ${system.graphics_card}
enable-scroll = true
format = <ramp><label>
label = %percentage%%
label-font = 4
label-foreground = ${color.pink}
ramp-0 = " "
ramp-1 = " "
ramp-2 = " "
ramp-3 = " "
ramp-4 = " "
ramp-5 = " "
ramp-6 = " "
ramp-7 = " "
ramp-8 = " "
ramp-9 = " "
ramp-font = 7
ramp-foreground = ${color.pink}
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/bspwm]
type = internal/bspwm
pin-workspaces = true
inline-mode = false
enable-click = true
enable-scroll = true
reverse-scroll = true
fuzzy-match = true
ws-icon-0 = I;
ws-icon-1 = II;
ws-icon-2 = III;
ws-icon-3 = IV;
ws-icon-4 = V;
ws-icon-5 = VI;
ws-icon-6 = VII;
ws-icon-7 = VIII;
ws-icon-8 = IX;
ws-icon-default = 
format = <label-state>
format-font = 2
label-monitor = %name%
label-focused = %name%
label-focused-foreground = ${color.yellow}
label-focused-padding = 0
label-occupied = %name%
label-occupied-foreground = ${color.blue}
label-occupied-padding = 0
label-urgent = %name%
label-urgent-foreground = ${color.red}
label-urgent-padding = 0
label-empty = %name%
label-empty-foreground = ${color.grey}
label-empty-padding = 0
; Separator in between workspaces
label-separator = " "
label-separator-padding = 0
label-separator-foreground = ${color.bg-alt}
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/mod]
type = internal/bspwm
format = [<label-mode>]
format-foreground = ${color.cyan}
format-padding = 1
format-font = 4
label-monocle = "Monocle"
label-tiled = " Tiled"
label-floating = " | Float"
label-pseudotiled = " | Pseudo"
label-fullscreen = " | Full"
label-locked = " | Locked"
label-sticky = " | Sticky"
label-private = " | Private"
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/date]
type = internal/date
interval = 1.0
time = %I:%M %p
time-alt = %d %b %Y
format = <label>
format-prefix = " "
format-prefix-font = 3
format-prefix-foreground = ${color.purple}
label = %time%
label-font = 4
label-foreground = ${color.purple}
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
; If you use both a wired and a wireless network, add both modules in config.
[module/ethernet]
type = internal/network
interface = ${system.network_interface}
interval = 1.0
accumulate-stats = true
unknown-as-up = true
format-connected = <label-connected>
format-connected-prefix = " "
format-connected-prefix-font = 3
format-connected-prefix-foreground = ${color.purple}
format-disconnected = <label-disconnected>
format-disconnected-prefix = " "
format-disconnected-prefix-font = 3
format-disconnected-prefix-foreground = ${color.purple}
; label-connected = "%{A1:sh ~/.dotfiles/bspwm/rofi/bin/network &:}  %downspeed%  %upspeed%%{A}"
label-connected = "%{A1:sh ~/.dotfiles/bspwm/rofi/bin/network &:} %downspeed% ◆  %upspeed%%{A}"
label-connected-foreground = ${color.purple}
label-disconnected = "%{A1:sh ~/.dotfiles/bspwm/rofi/bin/network &:}Offline%{A}"
label-disconnected-foreground = ${color.purple}
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/network]
type = internal/network
interface = ${system.network_interface}
interval = 1.0
;;ping-interval = 3
;;udspeed-minwidth = 5
accumulate-stats = true
unknown-as-up = true
format-connected = <ramp-signal><label-connected>
format-disconnected = <label-disconnected>
format-disconnected-prefix = " "
format-disconnected-prefix-font = 7
format-disconnected-prefix-foreground = ${color.purple}
label-connected = "%{A1:nmd &:} %essid%%{A}"
label-connected-foreground = ${color.purple}
label-disconnected = "%{A1:nmd &:} dis%{A}"
label-disconnected-foreground = ${color.purple}
ramp-signal-0 = 
ramp-signal-1 = 
ramp-signal-2 = 
ramp-signal-3 = 
ramp-signal-4 = 
ramp-signal-font = 3
ramp-signal-foreground = ${color.purple}
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/xkeyboard]
type = internal/xkeyboard
blacklist-0 = num lock
label-layout = %layout%
label-layout-foreground = ${colors.primary}
label-layout-font = 4
label-layout-background = #0C1018
# label-indicator-padding = 2
# label-indicator-margin = 1
label-indicator-foreground = ${colors.background}
label-indicator-background = #0C1018
label-indicator-font = 4
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/sysmenu]
type = custom/text
; content = ""
content = ""
content-font = 5
content-foreground = ${color.blue}
content-padding = 0
click-left = ~/.dotfiles/bspwm/rofi/bin/powermenu
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/notification-github]
type = custom/script
exec = ~/.dotfiles/bspwm/polybar/scripts/notification-github.sh
interval = 60
label-background = ${color.BGL}
click-left = google-chrome-stable --newtab https://github.com/notifications
label-font = 4
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/menu]
type = custom/text
; content = ""
; content = ""
; content = ""
content = ""
content-font = 5
;content-font = 3
content-foreground = ${color.blue}
content-padding = 0
; content-background = #0C1018
click-left = ~/.dotfiles/bspwm/rofi/bin/launcher
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/xdomenu]
type = custom/text
interval = 1
content = ""
content-font = 5
content-foreground = ${color.blue}
content-padding = 0
click-left = jgmenu_run
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/themes]
type = custom/text
; content = ""
content = ""
content-font = 5
content-foreground = ${color.blue}
content-padding = 0
click-left = ~/.dotfiles/bspwm/rofi/bin/themes
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/title]
type = internal/xwindow
format = [<label>]
format-foreground = ${color.blue}
label = "%title%"
label-maxlen = 6
label-empty = "Arch"
label-empty-foreground = ${color.blue}
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_

View file

@ -1,124 +0,0 @@
[module/battery]
type = internal/battery
full-at = 99
battery = ${system.battery}
adapter = ${system.adapter}
format-charging = <animation-charging><label-charging>
label-charging = %percentage%%
format-charging-foreground = ${color.yellow}
format-charging-font = 4
format-discharging = <ramp-capacity><label-discharging>
label-discharging = %percentage%%
format-discharging-foreground = ${color.red}
format-discharging-font = 4
format-full-prefix = " "
format-full-prefix-foreground = #A0E8A2
format-full-prefix-font = 4
label-full = %percentage%%
label-full-foreground = #A0E8A2
label-full-font = 4
label-discharging-foreground = ${color.red}
label-discharging-font = 4
ramp-capacity-foreground = ${color.red}
label-charging-foreground = ${color.yellow}
label-charging-font = 4
label-padding = 1
ramp-capacity-0 = " "
ramp-capacity-1 = " "
ramp-capacity-2 = " "
ramp-capacity-3 = " "
ramp-capacity-4 = " "
animation-charging-0 = " "
animation-charging-1 = " "
animation-charging-2 = " "
animation-charging-3 = " "
animation-charging-4 = " "
animation-charging-foreground = ${color.yellow}
animation-charging-framerate = 750
animation-charging-font = 4
format-charging-padding = 1
format-discharging-padding = 1
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/cpu]
type = internal/cpu
interval = 1
format = <label>
format-prefix = ""
format-prefix-font = 4
format-prefix-foreground = ${color.red}
label = "%{A1:stacer &:} %percentage%%%{A}"
label-font = 4
label-foreground = ${color.red}
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/filesystem]
type = internal/fs
mount-0 = /
interval = 30
fixed-values = true
format-mounted = <label-mounted>
format-mounted-prefix = " "
format-mounted-prefix-foreground = ${color.background}
format-mounted-prefix-background = ${color.cyan}
format-unmounted = <label-unmounted>
format-unmounted-prefix = " "
format-unmounted-prefix-foreground = ${color.background}
format-unmounted-prefix-background = ${color.cyan}
label-mounted = "%{A1:alacritty --config-file ~/.config/bspwm/alacritty/alacritty.yml -e duf &:} %free%%{A}"
label-unmounted = " %mountpoint%: NA"
label-mounted-foreground = ${color.background}
label-mounted-background = ${color.cyan}
label-unmounted-background = ${color.cyan}
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/cpuTemp]
type = custom/script
exec = ~/.config/bspwm/polybar/Pamela/modules/heatSensors
interval = 1
click-left = xsensors
format-foreground = ${color.cyan}
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/updates-pacman]
type = custom/script
exec = ~/.config/bspwm/polybar/scripts/updates-pacman.sh
interval = 180
format = <label>
;label = %output% Updates
label = "%{A1:alacritty --config-file ~/.config/bspwm/alacritty/alacritty.yml -e sudo pacman -Syyu &:} %output%%{A}"
format-font = 4
label-foreground = #e92ef0
;label-foreground = #BF616A
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_

View file

@ -1,64 +0,0 @@
[module/space]
type = custom/text
content = " "
content-background = ${color.background}
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/Blankspace]
type = custom/text
content = " "
content-background = #0C1018
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/spaceB]
type = custom/text
content = " "
content-background = ${color.BACKGROUND}
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
##########################
# LD modules #
##########################
[module/LD]
type = custom/text
content = "%{T5}█%{T-}"
content-foreground = #0C1018
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/LT]
type = custom/text
content = "%{T6}%{T5}█%{T-}"
content-foreground = #0C1018
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
##########################
# RD modules #
##########################
[module/RD]
type = custom/text
content = "%{T5}█%{T-}"
content-foreground = #0C1018
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_
[module/RT]
type = custom/text
content = "%{T5}█%{T-}"
content-foreground = #0C1018
;; _-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_

166
polybar/polybar.ini Normal file
View file

@ -0,0 +1,166 @@
;==========================================================
;
;
; ██████╗ ██████╗ ██╗ ██╗ ██╗██████╗ █████╗ ██████╗
; ██╔══██╗██╔═══██╗██║ ╚██╗ ██╔╝██╔══██╗██╔══██╗██╔══██╗
; ██████╔╝██║ ██║██║ ╚████╔╝ ██████╔╝███████║██████╔╝
; ██╔═══╝ ██║ ██║██║ ╚██╔╝ ██╔══██╗██╔══██║██╔══██╗
; ██║ ╚██████╔╝███████╗██║ ██████╔╝██║ ██║██║ ██║
; ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝
;
;
; To learn more about how to configure Polybar
; go to https://github.com/polybar/polybar
;
; The README contains a lot of information
;
;==========================================================
[global/wm]
include-file = ~/.dotfiles/polybar/macchiato.ini
[bar/example]
width = 100%
height = 24pt
radius = 6
; dpi = 96
background = ${colors.background}
foreground = ${colors.foreground}
line-size = 3pt
border-size = 4pt
border-color = ${colors.transparent}
padding-left = 0
padding-right = 1
module-margin = 1
separator = |
separator-foreground = ${colors.disabled}
font-0 = Fira Code Nerd Font;2
modules-left = xworkspaces xwindow
modules-right = filesystem alsa xkeyboard memory cpu wlan eth date
cursor-click = pointer
cursor-scroll = ns-resize
enable-ipc = true
; tray-position = right
wm-restack = bspwm
; override-redirect = true
[module/xworkspaces]
type = internal/xworkspaces
label-active = %name%
label-active-background = ${colors.background-alt}
label-active-underline= ${colors.primary}
label-active-padding = 1
label-occupied = %name%
label-occupied-padding = 1
label-urgent = %name%
label-urgent-background = ${colors.alert}
label-urgent-padding = 1
label-empty = %name%
label-empty-foreground = ${colors.disabled}
label-empty-padding = 1
[module/xwindow]
type = internal/xwindow
label = %title:0:60:...%
[module/filesystem]
type = internal/fs
interval = 25
mount-0 = /
#mount-1 = /mnt/primary
#mount-2 = /mnt/secondary
label-mounted = %{F#b7bdf8}%mountpoint%%{F-} %percentage_used%%
label-unmounted = %mountpoint% not mounted
label-unmounted-foreground = ${colors.disabled}
[module/alsa]
type = internal/alsa
format-volume-prefix = "VOL "
format-volume-prefix-foreground = ${colors.primary}
format-volume = <label-volume>
label-volume = %percentage%%
label-muted = muted
label-muted-foreground = ${colors.disabled}
[module/xkeyboard]
type = internal/xkeyboard
blacklist-0 = num lock
label-layout = %layout%
label-layout-foreground = ${colors.primary}
label-indicator-padding = 2
label-indicator-margin = 1
label-indicator-foreground = ${colors.background}
label-indicator-background = ${colors.secondary}
[module/memory]
type = internal/memory
interval = 2
format-prefix = "RAM "
format-prefix-foreground = ${colors.primary}
label = %percentage_used:2%%
[module/cpu]
type = internal/cpu
interval = 2
format-prefix = "CPU "
format-prefix-foreground = ${colors.primary}
label = %percentage:2%%
[network-base]
type = internal/network
interval = 5
format-connected = <label-connected>
format-disconnected = <label-disconnected>
label-disconnected = %{F#b7bdf8}%ifname%%{F#ed8796} disconnected
[module/wlan]
inherit = network-base
interface-type = wireless
label-connected = %{F#b7bdf8}%ifname%%{F-} %essid% %local_ip%
[module/eth]
inherit = network-base
interface-type = wired
label-connected = %{F#b7bdf8}%ifname%%{F-} %local_ip%
[module/date]
type = internal/date
interval = 1
date = %H:%M
date-alt = %Y-%m-%d %H:%M:%S
label = %date%
label-foreground = ${colors.primary}
[settings]
screenchange-reload = true
pseudo-transparency = false
; vim:ft=dosini

View file

@ -1,40 +0,0 @@
#! /bin/bash
bar="▁▂▃▄▅▆▇█"
dict="s/;//g;"
# creating "dictionary" to replace char with bar
i=0
while [ $i -lt ${#bar} ]
do
dict="${dict}s/$i/${bar:$i:1}/g;"
i=$((i=i+1))
done
# make sure to clean pipe
pipe="/tmp/cava.fifo"
if [ -p $pipe ]; then
unlink $pipe
fi
mkfifo $pipe
# write cava config
config_file="/tmp/polybar_cava_config"
echo "
[general]
bars = 10
[output]
method = raw
raw_target = $pipe
data_format = ascii
ascii_max_range = 7
" > $config_file
# run cava in the background
cava -p $config_file &
# reading data from fifo
while read -r cmd; do
echo $cmd | sed $dict
done < $pipe

View file

@ -1,52 +0,0 @@
#!/bin/sh
get_mic_default() {
pw-cat --record --list-targets | sed -n -E "1 s/^.*: (.*)/\1/p"
}
is_mic_muted() {
mic_name="$(get_mic_default)"
pactl list sources | \
awk -v mic_name="${mic_name}" '{
if ($0 ~ "Name: " mic_name) {
matched_mic_name = 1;
} else if (matched_mic_name && /Mute/) {
print $2;
exit;
}
}'
}
get_mic_status() {
is_muted="$(is_mic_muted)"
if [ "${is_muted}" = "yes" ]; then
printf "%s\n" "#1"
else
printf "%s\n" "#2"
fi
}
listen() {
get_mic_status
LANG=EN; pactl subscribe | while read -r event; do
if printf "%s\n" "${event}" | grep --quiet "source" || printf "%s\n" "${event}" | grep --quiet "server"; then
get_mic_status
fi
done
}
toggle() {
pactl set-source-mute @DEFAULT_SOURCE@ toggle
}
case "$1" in
--toggle)
toggle
;;
*)
listen
;;
esac

10
polybar/startup.sh Executable file
View file

@ -0,0 +1,10 @@
#!/usr/bin/env bash
POLYBAR_CONFIG_DIR="$HOME/.dotfiles/polybar"
polybar -c "$POLYBAR_CONFIG_DIR/polybar.ini" & disown
#polybar -c "$POLYBAR_CONFIG_DIR/config" pam1 & disown
#polybar -c "$POLYBAR_CONFIG_DIR/config" pam2 & disown
#polybar -c "$POLYBAR_CONFIG_DIR/config" pam3 & disown
#polybar -c "$POLYBAR_CONFIG_DIR/config" pam4 & disown
#polybar -c "$POLYBAR_CONFIG_DIR/config" pam5 & disown
#polybar -c "$POLYBAR_CONFIG_DIR/config" pam6 & disown

View file

@ -1,5 +0,0 @@
[system]
adapter = AC
battery = BAT1
graphics_card = amdgpu_bl1
network_interface = wlan0

View file

@ -117,7 +117,7 @@ menu=(
[ Reboot]="systemctl reboot"
[ Suspend]="systemctl suspend"
[ Hibernate]="systemctl hibernate"
[ Lock]="i3lock-fancy"
[ Lock]="xflock4"
[ Logout]="xfce4-session-logout"
[ Cancel]=""
)