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 # NO_COMPTON=1
BORDER_WIDTH=5 # change in bspwm_config, here for launcher BORDER_WIDTH=5 # change in bspwm_config, here for launcher
START_BAR=1 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 if [[ -z "$XDG_CONFIG_HOME" ]]; then
export XDG_CONFIG_HOME="$HOME/.config" 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] [module/microphone]
type = custom/script type = custom/script
exec = $DOTFILES_PATH/apps/de/bar/mic.bash exec = $DOTFILES_PATH/apps/de/polybar/mic.bash
tail = true tail = true
format = <label> format = <label>
label-foreground = ${colors.icon} label-foreground = ${colors.icon}

View file

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

View file

@ -1,8 +1,8 @@
set $mod Mod4 set $mod Mod4
set $left h set $left h
set $down j set $down j
set $up k set $up k
set $right l set $right l
set $term kitty set $term kitty
@ -20,12 +20,12 @@ output * bg $HOME/.wallpaper fill
# #
# Example configuration: # Example configuration:
# #
# input "2:14:SynPS/2_Synaptics_TouchPad" { #input "2:14:SynPS/2_Synaptics_TouchPad" {
# dwt enabled # dwt enabled
# tap enabled # tap enabled
# natural_scroll enabled # natural_scroll enabled
# middle_emulation enabled # middle_emulation enabled
# } #}
# #
# You can get the names of your inputs by running: swaymsg -t get_inputs # 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. # Read `man 5 sway-input` for more information about this section.
@ -97,18 +97,18 @@ bindsym $mod+Shift+minus move scratchpad
bindsym $mod+minus scratchpad show bindsym $mod+minus scratchpad show
mode "resize" { mode "resize" {
bindsym $left resize shrink width 10 px or 10 ppt bindsym $left resize shrink width 10 px or 10 ppt
bindsym $down resize grow height 10 px or 10 ppt bindsym $down resize grow height 10 px or 10 ppt
bindsym $up resize shrink height 10 px or 10 ppt bindsym $up resize shrink height 10 px or 10 ppt
bindsym $right resize grow width 10 px or 10 ppt bindsym $right resize grow width 10 px or 10 ppt
bindsym Left resize shrink width 10 px or 10 ppt bindsym Left resize shrink width 10 px or 10 ppt
bindsym Down resize grow height 10 px or 10 ppt bindsym Down resize grow height 10 px or 10 ppt
bindsym Up resize shrink height 10 px or 10 ppt bindsym Up resize shrink height 10 px or 10 ppt
bindsym Right resize grow width 10 px or 10 ppt bindsym Right resize grow width 10 px or 10 ppt
bindsym Return mode "default" bindsym Return mode "default"
bindsym Escape mode "default" bindsym Escape mode "default"
} }
default_border none default_border none
@ -117,12 +117,7 @@ default_border none
# man 5 sway-bar # man 5 sway-bar
bar { bar {
position bottom swaybar_command waybar
colors {
statusline #ffffff
background #111111
inactive_workspace #11111100 #11111100 #5c5c5c
}
} }
input * { input * {
@ -130,4 +125,7 @@ input * {
repeat_rate 60 repeat_rate 60
} }
focus_follows_mouse no
# include /etc/sway/config.d/* # 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 SDL_VIDEODRIVER=wayland
export MOZ_ENABLE_WAYLAND=1 export MOZ_ENABLE_WAYLAND=1
# configuration flag for some of my dotfiles scripts
export IS_WAYLAND=1
exec mako
sway 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 #!/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="$BAR_FONT"
LAUNCHER_FONT_SIZE="$BAR_FONT_SIZE" 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?` \ gtk-engine-murrine xorg-server-devel `# GTK Theme Base and Headers?` \
bspwm-git sxhkd-git xdo-git `# Window Manager and Tools for its use` \ bspwm-git sxhkd-git xdo-git `# Window Manager and Tools for its use` \
wlroots-git sway-git `# Wayland Compositor` \ wlroots-git sway-git `# Wayland Compositor` \
waybar mako `# Wayland Bar & Notifications` \
terminus-font ttf-iosevka-type ttf-iosevka-term `# Primary Fonts` \ terminus-font ttf-iosevka-type ttf-iosevka-term `# Primary Fonts` \
ttf-font-awesome `# Icon Font` \ ttf-font-awesome `# Icon Font` \
curl `# HTTP Utility` \ curl `# HTTP Utility` \

View file

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