1
0
mirror of https://github.com/alrayyes/dotfiles/ synced 2023-11-14 15:56:30 +00:00

Compare commits

..

5 Commits

Author SHA1 Message Date
Ryan Kes
8f59319027 feat: refactored x config 2020-12-01 20:02:19 +01:00
Ryan Kes
5c4f606b3b feat(alacritty): enable font styled 2020-11-30 19:12:54 +01:00
Ryan Kes
14144ee877 feat: use hack font in dunst 2020-11-28 21:51:31 +01:00
Ryan Kes
b1d1d53761 feat: replace jetbrains with hack and added joypixels font 2020-11-28 21:28:48 +01:00
Ryan Kes
78ec7cf2e0 feat: replaced betterlockscreen with xsecurelock 2020-11-28 21:22:35 +01:00
14 changed files with 185 additions and 47 deletions

View File

@ -109,7 +109,7 @@ font:
family: Hack Nerd Font Mono family: Hack Nerd Font Mono
# The `style` can be specified to pick a specific face. # The `style` can be specified to pick a specific face.
#style: Regular style: Regular
# Bold font face # Bold font face
bold: bold:
@ -120,7 +120,7 @@ font:
#family: monospace #family: monospace
family: Hack Nerd Font Mono family: Hack Nerd Font Mono
# The `style` can be specified to pick a specific face. # The `style` can be specified to pick a specific face.
#style: Bold style: Bold
# Italic font face # Italic font face
italic: italic:
@ -130,7 +130,7 @@ font:
# value specified for the normal font. # value specified for the normal font.
family: hack Nerd Font Mono family: hack Nerd Font Mono
# The `style` can be specified to pick a specific face. # The `style` can be specified to pick a specific face.
#style: Italic style: Italic
# Bold italic font face # Bold italic font face
bold_italic: bold_italic:
@ -141,7 +141,7 @@ font:
#family: monospace #family: monospace
family: Hack Nerd Font Mono family: Hack Nerd Font Mono
# The `style` can be specified to pick a specific face. # The `style` can be specified to pick a specific face.
#style: Bold Italic style: Bold Italic
# Point size # Point size
size: 6.5 size: 6.5

View File

@ -109,7 +109,7 @@ font:
family: Hack Nerd Font Mono family: Hack Nerd Font Mono
# The `style` can be specified to pick a specific face. # The `style` can be specified to pick a specific face.
#style: Regular style: Regular
# Bold font face # Bold font face
bold: bold:
@ -120,7 +120,7 @@ font:
#family: monospace #family: monospace
family: Hack Nerd Font Mono family: Hack Nerd Font Mono
# The `style` can be specified to pick a specific face. # The `style` can be specified to pick a specific face.
#style: Bold style: Bold
# Italic font face # Italic font face
italic: italic:
@ -130,7 +130,7 @@ font:
# value specified for the normal font. # value specified for the normal font.
family: Hack Nerd Font Mono family: Hack Nerd Font Mono
# The `style` can be specified to pick a specific face. # The `style` can be specified to pick a specific face.
#style: Italic style: Italic
# Bold italic font face # Bold italic font face
bold_italic: bold_italic:
@ -141,7 +141,7 @@ font:
#family: monospace #family: monospace
family: Hack Nerd Font Mono family: Hack Nerd Font Mono
# The `style` can be specified to pick a specific face. # The `style` can be specified to pick a specific face.
#style: Bold Italic style: Bold Italic
# Point size # Point size
size: 8.5 size: 8.5

View File

@ -137,9 +137,8 @@ pkill -f cleanfullscreen
###---System lock---### ###---System lock---###
pkill -f xss-lock pkill -f xss-lock
xss-lock -n ~/.local/bin/lock -- ~/.local/bin/lock & xset s 300 5
pkill -f xautolock xss-lock -n /usr/lib/xsecurelock/dimmer -l -- xsecurelock
xautolock -time 10 -locker ~/.local/bin/lock &
###---Misc---### ###---Misc---###
# Needed for Jetbrains products to work # Needed for Jetbrains products to work

View File

@ -1,3 +0,0 @@
#!/usr/bin/env sh
betterlockscreen -l blur -t "Step away from the machine!"

View File

@ -24,7 +24,7 @@
sort = yes sort = yes
idle_threshold = 120 idle_threshold = 120
font = JetBrainsMono Font Medium 10 font = Hack Nerd Font Medium 10
line_height = 0 line_height = 0
markup = full markup = full

View File

@ -0,0 +1,97 @@
#!/bin/sh
###---Start app if not running already---###
start_if_not_running() {
###---iceweasel/firefox is weird---###
if [ "$1" = "iceweasel" ]; then
PROCESS_NAME="iceweasel|MainThread"
elif [ "$1" = "element-desktop-nightly" ]; then
PROCESS_NAME="element-desktop"
else
PROCESS_NAME=$1
fi
if [ "$(pgrep -u "$(id -u)" -x "$PROCESS_NAME" | wc -l)" -lt 1 ]; then
if command -v "$1"; then
eval "$1 &"
fi
fi
}
###---Start app in alacritty if not running already---###
start_shell_if_not_running() {
if [ "$(pgrep -u "$(id -u)" -x "$1" | wc -l)" -lt 1 ]; then
if command -v "$1"; then
eval "st -c $1 -e $1 &"
fi
fi
}
# Set screen orientation if second monitor is connected
SCREENCOUNT=$(xrandr | grep -c "\*")
# If multi screen add special mode for monitor so it supports 1440p over HDMI
if [ "$SCREENCOUNT" -eq 2 ]; then
if [ -f "$HOME/.local/bin/screen_desktop" ]; then
screen_desktop &
# Make sure mouse is on main screen so windows are launched there
xdotool mousemove 3360 1080 &
fi
else
if [ -f "$HOME/.local/bin/screen" ]; then
screen &
fi
fi
###---Set working directory---###
cd ~ || exit
###---Load xresources---###
xrdb -load ~/.config/X11/xresources &
###---Sxhkd---###
start_if_not_running sxhkd
###---Keyboard---###
setxkbmap -option caps:escape &
###---Wallpaper, colours & opacity---###
~/.local/bin/wallpaper &
wal -n -R &
picom -b &
sh ~/.cache/wal/colors.sh &
###---Switch off microphones---###
# switch off microphones
amixer -c 2 set Mic nocap &
amixer -c 3 set Mic nocap &
###---Autostart---###
start_if_not_running dunst
start_if_not_running unclutter
start_if_not_running nm-applet
start_if_not_running pasystray
start_if_not_running redshift-gtk
start_if_not_running syncthing-gtk
start_if_not_running caffeine
start_if_not_running brave
start_if_not_running iceweasel
start_if_not_running firefox
start_if_not_running emacs
start_if_not_running element-desktop
start_if_not_running element-desktop-nightly
if [ "$SCREENCOUNT" -eq 2 ]; then
start_shell_if_not_running castero
start_if_not_running slack
fi
###---System lock---###
pkill -f xss-lock
xset s 300 5 &
env XSECURELOCK_FONT="Hack Nerd Font" xss-lock -n /usr/lib/xsecurelock/dimmer -l -- xsecurelock &
###---Misc---###
# Needed for Jetbrains products to work
wmname LG3D &

View File

@ -9,6 +9,7 @@ set configuredApps alacritty bspwm castero emacs firejail git gnupg gtk lf dunst
set locales aspell-en hunspell-en_GB hunspell-en_US hunspell-nl set locales aspell-en hunspell-en_GB hunspell-en_US hunspell-nl
set golang go golangci-lint-bin set golang go golangci-lint-bin
set shell shfmt shellcheck set shell shfmt shellcheck
set screenlock xsecurelock xss-lock
function mkdir_if_not_exist function mkdir_if_not_exist
if [ ! -d "$argv" ] if [ ! -d "$argv" ]
@ -70,6 +71,9 @@ for sh in $shell
install_app_if_not_exist "$sh" install_app_if_not_exist "$sh"
end end
for lock in $screenlock
install_app_if_not_exist "$lock"
end
# Create directories that need to exist # Create directories that need to exist
mkdir_if_not_exist ~/.cache/mpd mkdir_if_not_exist ~/.cache/mpd

View File

@ -3,9 +3,9 @@
unread="$(find ~/.local/share/mail/*/INBOX/new/* -type f 2>/dev/null | wc -l)" unread="$(find ~/.local/share/mail/*/INBOX/new/* -type f 2>/dev/null | wc -l)"
if [ ! "$(pgrep -x mbsync)" ]; then if [ ! "$(pgrep -x mbsync)" ]; then
icon="" icon="📬"
else else
icon="痢" icon="🔃"
fi fi
if [ ! "$unread" -eq 0 ]; then if [ ! "$unread" -eq 0 ]; then

View File

@ -40,15 +40,17 @@ wm-restack = bspwm
[bar/base-laptop] [bar/base-laptop]
inherit = "bar/base" inherit = "bar/base"
font-0 = FuraCode Nerd Font:pixelsize=16 font-0 = Hack Nerd Font:pixelsize=16
font-1 = Noto Sans Symbols2:size=16 font-1 = JoyPixels:style=Regular:scale=6;1
font-2 = Unifont Upper:size=16 font-2 = Noto Sans Symbols2:size=16
font-3 = Unifont Upper:size=16
[bar/base-desktop] [bar/base-desktop]
inherit = "bar/base" inherit = "bar/base"
font-0 = FuraCode Nerd Font:size=10 font-0 = Hack Nerd Font:size=10
font-1 = Noto Sans Symbols2:size=10 font-1 = JoyPixels:style=Regular:scale=10;2
font-2 = Unifont Upper:size=10 font-2 = Noto Sans Symbols2:size=10
font-3 = Unifont Upper:size=10
[bar/laptop-bottom] [bar/laptop-bottom]
inherit = bar/base-laptop inherit = bar/base-laptop
@ -64,7 +66,7 @@ monitor = ${env:MONITOR:eDP1}
modules-left = bspwm modules-left = bspwm
modules-center = battery0 battery1 seperator wlan wg0 wg1 bluetooth modules-center = battery0 battery1 seperator wlan wg0 wg1 bluetooth
modules-right = seperator xbacklight volume-laptop seperator docker memory cpu temperature seperator filesystem seperator updates-arch-combined mail reddit github rss seperator weather date modules-right = seperator xbacklight volume-laptop seperator docker memory cpu-laptop temperature seperator filesystem seperator updates-arch-combined mail reddit github rss seperator weather seperator date seperator
tray-position = right tray-position = right
@ -74,7 +76,7 @@ monitor = ${env:MONITOR:DP-1}
modules-left = bspwm modules-left = bspwm
modules-center = mpd player-mpris-tail modules-center = mpd player-mpris-tail
modules-right = eth bluetooth seperator volume seperator docker memory cpu temperature seperator system-usb-udev filesystem seperator updates-arch-combined mail reddit github rss seperator weather date modules-right = seperator eth bluetooth seperator volume seperator docker memory cpu temperature seperator system-usb-udev filesystem seperator updates-arch-combined mail reddit github rss seperator weather seperator date seperator
tray-position = right tray-position = right
@ -141,7 +143,7 @@ bar-progress-empty = ─
type = internal/xbacklight type = internal/xbacklight
format = <label> format = <label>
label = %percentage%% label = 💡 %percentage%%
bar-width = 10 bar-width = 10
bar-indicator = | bar-indicator = |
@ -154,11 +156,27 @@ bar-empty = ─
bar-empty-font = 2 bar-empty-font = 2
bar-empty-foreground = ${colors.foreground-alt} bar-empty-foreground = ${colors.foreground-alt}
[module/cpu-laptop]
type = internal/cpu
format = <label> <ramp-load>
format-prefix = "💻 "
label =
ramp-load-0 = ▁
ramp-load-1 = ▂
ramp-load-2 = ▃
ramp-load-3 = ▄
ramp-load-4 = ▅
ramp-load-5 = ▆
ramp-load-6 = ▇
ramp-load-7 = █
[module/cpu] [module/cpu]
type = internal/cpu type = internal/cpu
format = <label> <ramp-coreload> format = <label> <ramp-coreload>
format-prefix = " " format-prefix = "💻 "
label = %percentage%% label = %percentage%%
@ -192,24 +210,35 @@ type = internal/network
interface = wlp4s0 interface = wlp4s0
interval = 3.0 interval = 3.0
format-connected = <label-connected> format-connected = <ramp-signal>
format-packetloss = <animation-packetloss> <label-connected> format-packetloss = <animation-packetloss> <label-connected>
format-disconnected = format-disconnected =
format-connected-prefix = " " format-connected-prefix = " "
format-disconnected-prefix = "睊" format-disconnected-prefix = "睊"
label-connected = " %downspeed%  %upspeed%" label-connected = " %downspeed%  %upspeed%"
label-disconnected = label-disconnected =
ramp-signal-0 = ▁
ramp-signal-1 = ▂
ramp-signal-2 = ▃
ramp-signal-3 = ▄
ramp-signal-4 = ▅
ramp-signal-5 = ▆
ramp-signal-6 = ▇
ramp-signal-7 = █
animation-packetloss-0 = ⚠ animation-packetloss-0 = ⚠
animation-packetloss-0-foreground = #ffa64c
animation-packetloss-1 = 📶 animation-packetloss-1 = 📶
animation-packetloss-1-foreground = #000000
animation-packetloss-framerate = 500 animation-packetloss-framerate = 500
[module/eth] [module/eth]
type = internal/network type = internal/network
interface = eno1 interface = eno1
format-connected-prefix = " " format-connected-prefix = " "
format-disconnected-prefix = " " format-disconnected-prefix = " "
label-connected = "%local_ip%  %downspeed%  %upspeed%" label-connected = "%local_ip%  %downspeed%  %upspeed%"
@ -221,7 +250,7 @@ date-alt = " %d-%m-%Y"
time = "%H:%M" time = "%H:%M"
time-alt = time-alt =
format-prefix = format-prefix = 📅
label = %date% %time% label = %date% %time%
label-padding-right=1 label-padding-right=1
@ -230,22 +259,32 @@ label-padding-right=1
type = internal/pulseaudio type = internal/pulseaudio
sink = alsa_output.pci-0000_00_1b.0.iec958-stereo sink = alsa_output.pci-0000_00_1b.0.iec958-stereo
label-volume = 蓼 %percentage%% format-volume = <ramp-volume>
label-muted = "遼"
label-muted-foreground = ${colors.disabled} label-muted = 🔇 muted
label-muted-foreground = #666
click-right = setsid alacritty --class=float,float -e pulsemixer click-right = setsid alacritty --class=float,float -e pulsemixer
ramp-volume-0 = 🔈
ramp-volume-1 = 🔉
ramp-volume-2 = 🔊
[module/volume-laptop] [module/volume-laptop]
type = internal/pulseaudio type = internal/pulseaudio
sink = alsa_output.pci-0000_00_1f.3.analog-stereo sink = alsa_output.pci-0000_00_1f.3.analog-stereo
label-volume = 蓼 %percentage%% format-volume = <ramp-volume>
label-muted = "遼"
label-muted-foreground = ${colors.disabled}
click-right = setsid alacritty --class=float,float -e pulsemixer click-right = setsid alacritty --class=float,float -e pulsemixer
label-muted = 🔇 muted
label-muted-foreground = #666
ramp-volume-0 = 🔈
ramp-volume-1 = 🔉
ramp-volume-2 = 🔊
[module/battery0] [module/battery0]
type = internal/battery type = internal/battery
battery = BAT0 battery = BAT0
@ -279,7 +318,7 @@ full-at = 70
format-charging = <animation-charging> <label-charging> format-charging = <animation-charging> <label-charging>
format-discharging = <animation-discharging> <label-discharging> format-discharging = <animation-discharging> <label-discharging>
format-full-prefix = " " format-full-prefix = "🔋 "
format-full-prefix-foreground = ${colors.foreground-alt} format-full-prefix-foreground = ${colors.foreground-alt}
animation-charging-0 =  animation-charging-0 = 
@ -299,7 +338,7 @@ animation-discharging-framerate = 5000
[module/temperature] [module/temperature]
type = internal/temperature type = internal/temperature
format-prefix = " " format-prefix = "🌡 "
label-warn-foreground = ${colors.alert} label-warn-foreground = ${colors.alert}
@ -326,7 +365,7 @@ format-prefix = " "
[module/player-mpris-tail] [module/player-mpris-tail]
type = custom/script type = custom/script
exec = python ~/.local/share/polybar-scripts/polybar-scripts/player-mpris-tail/player-mpris-tail.py -f '{:title: {icon} {artist} - {title}:}' --icon-playing '' --icon-paused '' --icon-stop '栗' exec = python ~/.local/share/polybar-scripts/polybar-scripts/player-mpris-tail/player-mpris-tail.py -f '{:title: {icon} {artist} - {title}:}' --icon-playing '' --icon-paused '' --icon-stop '栗'
tail = true tail = true
click-left = python ~/.local/share/polybar-scripts/polybar-scripts/player-mpris-tail/player-mpris-tail.py previous & click-left = python ~/.local/share/polybar-scripts/polybar-scripts/player-mpris-tail/player-mpris-tail.py previous &
@ -364,7 +403,7 @@ type = custom/script
exec = ~/.config/polybar/bin/notification-reddit.sh exec = ~/.config/polybar/bin/notification-reddit.sh
interval = 300 interval = 300
label = %output% label = %output%
click-left = brave https://www.reddit.com/message/unread click-left = brave https://www.reddit.com/message/unread

View File

@ -1,7 +1,7 @@
#-----------------------------------------------------------Functions-------------------------------------------------------------- #-----------------------------------------------------------Functions--------------------------------------------------------------
# lock screen # lock screen
super + F1 super + F1
~/.local/bin/lock xset s activate
# dmenu password selector # dmenu password selector
super + F2 super + F2
@ -47,7 +47,6 @@ XF86MonBrightnessUp
~/.local/bin/brightness inc ~/.local/bin/brightness inc
XF86MonBrightnessDown XF86MonBrightnessDown
~/.local/bin/brightness dec ~/.local/bin/brightness dec
# Shutdown / reboot # Shutdown / reboot
XF86Eject XF86Eject
prompt "Shutdown computer?" "sudo -A shutdown -h now" prompt "Shutdown computer?" "sudo -A shutdown -h now"
@ -66,7 +65,7 @@ Print
#-----------------------------------------------------------App shortcuts-------------------------------------------------------------- #-----------------------------------------------------------App shortcuts--------------------------------------------------------------
# terminal emulator # terminal emulator
super + Return super + Return
alacritty st
# program launcher # program launcher
super + @space super + @space

3
x/.config/X11/xinitrc Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh
exec dwm

View File

@ -1,3 +1,3 @@
#!/usr/bin/env sh #!/usr/bin/env sh
exec bspwm xset s activate