Move all config files to config directory and add corresponding changes to bootstrap script

This commit is contained in:
2021-10-20 16:25:36 +03:00
parent 7bece0cbd7
commit 5ad043a15a
41 changed files with 49 additions and 45 deletions

130
config/polybar/config.ini Normal file
View File

@@ -0,0 +1,130 @@
[colors]
; This is colors for ayu theme (https://github.com/ayu-theme/ayu-colors)
primary = #ffa759
background = #202734
background-alt = #191e2a
foreground = #cbccc6
[bar/main]
width = 100%
height = 40
fixed-center = true
padding-right = 2
wm-restack = i3
override-redirect = true
background = ${colors.background}
foreground = ${colors.foreground}
font-0 = FiraCode:size=11
font-1 = FontAwesome5Brands:size=12
font-2 = FontAwesome5FreeSolid:size=12
modules-left = workspaces player
modules-center = date
modules-right = keyboard-layout volume-control network power-menu
module-margin = 1
; _ _____ _____ _____ __ __ ___ ____ _ _ _ _____ ____
; | | | ____| ___|_ _| | \/ |/ _ \| _ \| | | | | | ____/ ___|
; | | | _| | |_ | | | |\/| | | | | | | | | | | | | _| \___ \
; | |___| |___| _| | | | | | | |_| | |_| | |_| | |___| |___ ___) |
; |_____|_____|_| |_| |_| |_|\___/|____/ \___/|_____|_____|____/
;
[module/workspaces]
type = internal/i3
; Current active workspace
label-focused = "%index%"
label-focused-foreground = ${colors.primary}
label-focused-background = ${colors.background-alt}
label-focused-padding = 2
; All the other workspaces but the active
label-unfocused = ${self.label-focused}
label-unfocused-padding = ${self.label-focused-padding}
label-urgent = %index%
label-urgent-padding = ${self.label-focused-padding}
label-urgent-background = ${colors.primary}
label-mode = --%mode%--
[module/player]
type = custom/script
exec = players=`playerctl -l | wc -l` ; [[ $players != "0" ]] && playerctl metadata -f "{{status}}: {{trunc(title, 30)}} by {{artist}}" || echo
tail = true
format = <label>
label = %output%
click-left = playerctl play-pause
; ____ _____ _ _ _____ _____ ____
; / ___| ____| \ | |_ _| ____| _ \
; | | | _| | \| | | | | _| | |_) |
; | |___| |___| |\ | | | | |___| _ <
; \____|_____|_| \_| |_| |_____|_| \_\
;
; __ __ ___ ____ _ _ _ _____ ____
; | \/ |/ _ \| _ \| | | | | | ____/ ___|
; | |\/| | | | | | | | | | | | | _| \___ \
; | | | | |_| | |_| | |_| | |___| |___ ___) |
; |_| |_|\___/|____/ \___/|_____|_____|____/
[module/date]
type = internal/date
date = "%d %b %H:%M, %A"
label = %date%
; ____ ___ ____ _ _ _____ __ __ ___ ____ _ _ _ _____ ____
; | _ \|_ _/ ___| | | |_ _| | \/ |/ _ \| _ \| | | | | | ____/ ___|
; | |_) || | | _| |_| | | | | |\/| | | | | | | | | | | | | _| \___ \
; | _ < | | |_| | _ | | | | | | | |_| | |_| | |_| | |___| |___ ___) |
; |_| \_\___\____|_| |_| |_| |_| |_|\___/|____/ \___/|_____|_____|____/
;
[module/keyboard-layout]
type = internal/xkeyboard
format = <label-layout>
label-layout = %layout%
[module/volume-control]
type = internal/pulseaudio
format-volume = <label-volume>
label-muted = MUTE
label-muted-foreground = ${colors.primary}
[module/network]
type = internal/network
interface = enp2s0
format-connected = <label-connected>
format-disconnected = <label-disconnected>
label-connected =
label-disconnected = No Network
[module/power-menu]
type = custom/text
content = %{A:~/dotfiles/polybar/logout-window.sh:}%{A}
[settings]
screenchange-reload = true

9
config/polybar/launch.sh Executable file
View File

@@ -0,0 +1,9 @@
#! /bin/bash
# Terminate already running bar instances
killall -q polybar
polybar main -c $HOME/.config/polybar/config.ini
echo "Bars launched..."

22
config/polybar/logout-window.sh Executable file
View File

@@ -0,0 +1,22 @@
#! /bin/bash
action=$(yad --width 300 --entry --title "System Logout" \
--button="Ok" --button="Cancel" \
--text "What to do?" \
--entry-text \
"Power Off" "Reboot" "Logout" \
)
return=$?
if [[ $return -eq 1 ]] ; then
exit 0
fi
case $action in
Power*) cmd="systemctl poweroff" ;;
Reboot*) cmd="systemctl reboot" ;;
Logout*) cmd="i3-msg exit"
esac
eval exec $cmd

1
config/polybar/polybar Symbolic link
View File

@@ -0,0 +1 @@
/home/daniil/dotfiles/config/polybar