This commit is contained in:
Daniel Flanagan 2020-01-07 19:38:43 -06:00
parent 1acb330746
commit 5195a855a6
13 changed files with 393 additions and 35 deletions

View file

@ -5,7 +5,7 @@ source "$HOME/.bashrc"
# NO_COMPTON=1
BORDER_WIDTH=5 # change in bspwm_config, here for launcher
START_BAR=1
BAR_COMMAND="$DOTFILES_PATH/apps/de/bar/bar.bash"
BAR_COMMAND="$DOTFILES_PATH/apps/de/polybar/run"
if [[ -z "$XDG_CONFIG_HOME" ]]; then
export XDG_CONFIG_HOME="$HOME/.config"

4
apps/de/mako/config Normal file
View file

@ -0,0 +1,4 @@
max-visible=5
default-timeout=30000
background-color=#111111
border-color=#666666

View file

@ -387,7 +387,7 @@ margin-bottom = ${env:WINDOW_GAP:0}
[module/microphone]
type = custom/script
exec = $DOTFILES_PATH/apps/de/bar/mic.bash
exec = $DOTFILES_PATH/apps/de/polybar/mic.bash
tail = true
format = <label>
label-foreground = ${colors.icon}

View file

@ -23,8 +23,8 @@ export POS_Y=0
# allow a per-device config to override options
echo "$EDFP"
if [ -f "$EDFP/bar" ]; then
source "$EDFP/bar"
if [ -f "$EDFP/polybar" ]; then
source "$EDFP/polybar"
fi
export MONITOR_WIDTH=$(xrandr | grep "^$BAR_MONITOR " | grep -Po ' \d+' | head -n 1)

View file

@ -20,12 +20,12 @@ output * bg $HOME/.wallpaper fill
#
# Example configuration:
#
# input "2:14:SynPS/2_Synaptics_TouchPad" {
#input "2:14:SynPS/2_Synaptics_TouchPad" {
# dwt enabled
# tap enabled
# natural_scroll enabled
# middle_emulation enabled
# }
#}
#
# You can get the names of your inputs by running: swaymsg -t get_inputs
# Read `man 5 sway-input` for more information about this section.
@ -117,12 +117,7 @@ default_border none
# man 5 sway-bar
bar {
position bottom
colors {
statusline #ffffff
background #111111
inactive_workspace #11111100 #11111100 #5c5c5c
}
swaybar_command waybar
}
input * {
@ -130,4 +125,7 @@ input * {
repeat_rate 60
}
focus_follows_mouse no
# include /etc/sway/config.d/*
include $EDFP/sway/config.d/*

View file

@ -16,4 +16,9 @@ export CLUTTER_BACKEND=wayland
export SDL_VIDEODRIVER=wayland
export MOZ_ENABLE_WAYLAND=1
# configuration flag for some of my dotfiles scripts
export IS_WAYLAND=1
exec mako
sway

158
apps/de/waybar/config Normal file
View file

@ -0,0 +1,158 @@
{
"layer": "top", // Waybar at top layer
"position": "bottom", // Waybar position (top|bottom|left|right)
"height": 32, // Waybar height (to be removed for auto height)
// "width": 1280, // Waybar width
// Choose the order of the modules
"modules-left": ["sway/workspaces", "sway/mode", "custom/media"],
"modules-center": ["sway/window"],
"modules-right": [
// "mpd",
// "idle_inhibitor",
"pulseaudio",
"network",
"cpu",
"memory",
"temperature",
"backlight",
"battery",
// "battery#bat2",
"clock",
"tray"
],
"sway/workspaces": {
"disable-scroll": false,
"all-outputs": true,
"format": "{name}: {icon}",
"format-icons": {
"1": "",
"2": "龜",
"3": "",
"4": "",
"5": "",
"urgent": "",
"focused": "",
"default": ""
}
},
"sway/mode": {
"format": "<span style=\"italic\">{}</span>"
},
"mpd": {
"format": "{stateIcon} {consumeIcon}{randomIcon}{repeatIcon}{singleIcon}{artist} - {album} - {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S}) ",
"format-disconnected": "Disconnected ",
"format-stopped": "{consumeIcon}{randomIcon}{repeatIcon}{singleIcon}Stopped ",
"unknown-tag": "N/A",
"interval": 2,
"consume-icons": {
"on": " "
},
"random-icons": {
"off": "<span color=\"#f53c3c\"></span> ",
"on": " "
},
"repeat-icons": {
"on": " "
},
"single-icons": {
"on": "1 "
},
"state-icons": {
"paused": "",
"playing": ""
},
"tooltip-format": "MPD (connected)",
"tooltip-format-disconnected": "MPD (disconnected)"
},
"idle_inhibitor": {
"format": "{icon}",
"format-icons": {
"activated": "",
"deactivated": ""
}
},
"tray": {
// "icon-size": 21,
"spacing": 10
},
"clock": {
"interval": 1,
"format": "{:%a %b %d %H:%M:%S}"
},
"cpu": {
"format": "{usage}% ",
"tooltip": false
},
"memory": {
"format": "{}% "
},
"temperature": {
// "thermal-zone": 2,
// "hwmon-path": "/sys/class/hwmon/hwmon2/temp1_input",
"critical-threshold": 80,
// "format-critical": "{temperatureC}°C {icon}",
"format": "{temperatureC}°C {icon}",
"format-icons": ["", "", ""]
},
"backlight": {
// "device": "acpi_video1",
"format": "{percent}% {icon}",
"format-icons": ["", ""]
},
"battery": {
"states": {
// "good": 95,
"warning": 30,
"critical": 15
},
"format": "{capacity}% {icon}",
"format-charging": "{capacity}% ",
"format-plugged": "{capacity}% ",
"format-alt": "{time} {icon}",
// "format-good": "", // An empty format will hide the module
// "format-full": "",
"format-icons": ["", "", "", "", ""]
},
"battery#bat2": {
"bat": "BAT2"
},
"network": {
// "interface": "wlp2*", // (Optional) To force the use of this interface
"format-wifi": "{essid} ({signalStrength}%) ",
"format-ethernet": "{ifname}: {ipaddr}/{cidr} ",
"format-linked": "{ifname} (No IP) ",
"format-disconnected": "Disconnected ⚠",
"format-alt": "{ifname}: {ipaddr}/{cidr}"
},
"pulseaudio": {
// "scroll-step": 1, // %, can be a float
"format": "{volume}% {icon} {format_source}",
"format-bluetooth": "{volume}% {icon} {format_source}",
"format-bluetooth-muted": " {icon} {format_source}",
"format-muted": " {format_source}",
"format-source": "{volume}% ",
"format-source-muted": "",
"format-icons": {
"headphones": "",
"handsfree": "",
"headset": "",
"phone": "",
"portable": "",
"car": "",
"default": ["", "", ""]
},
"on-click": "pavucontrol"
},
"custom/media": {
"format": "{icon} {}",
"return-type": "json",
"max-length": 40,
"format-icons": {
"spotify": "",
"default": "🎜"
},
"escape": true,
"exec": "$HOME/.config/waybar/mediaplayer.py 2> /dev/null" // Script in resources folder
// "exec": "$HOME/.config/waybar/mediaplayer.py --player spotify 2> /dev/null" // Filter player based on name
}
}

188
apps/de/waybar/style.css Normal file
View file

@ -0,0 +1,188 @@
* {
border: none;
border-radius: 0;
/* `otf-font-awesome` is required to be installed for icons */
font-family: "Iosevka", Roboto, Helvetica, Arial, sans-serif;
font-size: 16px;
min-height: 0;
}
window#waybar {
background-color: #111111;
color: #ffffff;
transition-property: background-color;
transition-duration: .5s;
}
window#waybar.hidden {
opacity: 0.2;
}
window#waybar.termite {
background-color: #3F3F3F;
}
window#waybar.chromium {
background-color: #000000;
border: none;
}
#workspaces button {
padding: 0 0.75em;
background-color: transparent;
color: #ffffff;
}
#workspaces button:hover {
/*
* background: rgba(0, 0, 0, 0.2);
* box-shadow: inherit;
*/
}
#workspaces button.focused {
background-color: #333333;
}
#workspaces button.urgent {
background-color: #eb4d4b;
}
#mode {
background-color: #64727D;
}
#clock,
#battery,
#cpu,
#memory,
#temperature,
#backlight,
#network,
#pulseaudio,
#custom-media,
#tray,
#mode,
#idle_inhibitor,
#mpd {
padding: 0 0.75em;
color: #ffffff;
}
#clock {
/* background-color: #64727D; */
}
#battery {
/* background-color: #ffffff; */
/* color: #000000; */
}
#battery.charging {
/* color: #ffffff; */
/* background-color: #26A65B; */
}
@keyframes blink {
to {
background-color: #ffffff;
color: #000000;
}
}
#battery.critical:not(.charging) {
background-color: #f53c3c;
color: #ffffff;
animation-name: blink;
animation-duration: 0.5s;
animation-timing-function: linear;
animation-iteration-count: infinite;
animation-direction: alternate;
}
label:focus {
background-color: #000000;
}
#cpu {
/* background-color: #2ecc71; */
/* color: #000000; */
}
#memory {
/* background-color: #9b59b6; */
}
#backlight {
/* background-color: #90b1b1; */
}
#network {
/* background-color: #2980b9; */
}
#network.disconnected {
/* background-color: #f53c3c; */
}
#pulseaudio {
/* background-color: #f1c40f; */
/* color: #000000; */
}
#pulseaudio.muted {
/* background-color: #90b1b1; */
/* color: #2a5c45; */
}
#custom-media {
/* background-color: #66cc99; */
/* color: #2a5c45; */
/* min-width: 100px; */
}
#custom-media.custom-spotify {
/* background-color: #66cc99; */
}
#custom-media.custom-vlc {
/* background-color: #ffa000; */
}
#temperature {
/* background-color: #f0932b; */
}
#temperature.critical {
/* background-color: #eb4d4b; */
}
#tray {
/* background-color: #2980b9; */
}
#idle_inhibitor {
/* background-color: #2d3436; */
}
#idle_inhibitor.activated {
/* background-color: #ecf0f1; */
/* color: #2d3436; */
}
#mpd {
/* background-color: #66cc99; */
/* color: #2a5c45; */
}
#mpd.disconnected {
/* background-color: #f53c3c; */
}
#mpd.stopped {
/* background-color: #90b1b1; */
}
#mpd.paused {
/* background-color: #51a37a; */
}

View file

@ -1,6 +1,6 @@
#!/usr/bin/env bash
source "$DOTFILES_PATH/apps/de/bar/bar.bash" --just-vars
source "$DOTFILES_PATH/apps/de/polybar/run" --just-vars
LAUNCHER_FONT="$BAR_FONT"
LAUNCHER_FONT_SIZE="$BAR_FONT_SIZE"

View file

@ -38,6 +38,7 @@ pacaur --needed -S \
gtk-engine-murrine xorg-server-devel `# GTK Theme Base and Headers?` \
bspwm-git sxhkd-git xdo-git `# Window Manager and Tools for its use` \
wlroots-git sway-git `# Wayland Compositor` \
waybar mako `# Wayland Bar & Notifications` \
terminus-font ttf-iosevka-type ttf-iosevka-term `# Primary Fonts` \
ttf-font-awesome `# Icon Font` \
curl `# HTTP Utility` \

View file

@ -1,3 +1,3 @@
#!/usr/bin/env bash
"${DOTFILES_PATH}/apps/de/bar/bar.bash"
"${DOTFILES_PATH}/apps/de/polybar/run"

12
setup
View file

@ -41,6 +41,7 @@ links=(
"$dfp/apps/de/x/modmap" "$HOME/.xmodmap"
"$dfp/apps/de/compton/compton.conf" "$XDG_CONFIG_HOME/compton.conf"
"$dfp/apps/de/dunst/dunstrc" "$XDG_CONFIG_HOME/dunst/dunstrc"
"$dfp/apps/de/mako/" "$XDG_CONFIG_HOME/mako"
"$dfp/bin/lib/colors/xresources" "$HOME/.Xresources.colors"
# shell files
@ -60,6 +61,10 @@ links=(
"$dfp/apps/de/gtk/2rc" "$HOME/.gtkrc"
"$dfp/apps/de/gtk/3settings.ini" "$XDG_CONFIG_HOME/gtk-3.0/settings.ini"
# bar files
"$dfp/apps/de/polybar/config" "$XDG_CONFIG_HOME/polybar/config"
"$dfp/apps/de/waybar/" "$XDG_CONFIG_HOME/waybar"
# irc files
"$dfp/apps/irssi/" "$HOME/.irssi"
"$dfp/apps/weechat/" "$HOME/.weechat"
@ -90,9 +95,6 @@ links=(
# rofi config
"$dfp/apps/rofi/config" "$XDG_CONFIG_HOME/rofi/config"
# bar files
"$dfp/apps/de/bar/polybar-config" "$XDG_CONFIG_HOME/polybar/config"
# ranger config
"$dfp/apps/ranger/" "$XDG_CONFIG_HOME/ranger"
@ -118,6 +120,8 @@ mkdir -p "$edfp/"
mkdir -p "$edfp/bash.d/"
mkdir -p "$edfp/bin/"
mkdir -p "$edfp/x/"
mkdir -p "$edfp/sway/waybar"
mkdir -p "$edfp/sway/config.d"
mkdir -p "$HOME/.bin/"
touches=(
@ -127,7 +131,7 @@ touches=(
"$edfp/x/resources"
"$edfp/vim"
"$edfp/bspwm"
"$edfp/bar"
"$edfp/polybar"
"$edfp/app-launcher"
)