stoof
This commit is contained in:
@@ -71,9 +71,9 @@ alias gpe='gopass edit'
|
||||
# To temporarily bypass an alias, we preceed the command with a \
|
||||
# EG: the ls command is aliased, but to use the normal ls command you would type \ls
|
||||
|
||||
alias v='nvim'
|
||||
alias vim='nvim'
|
||||
alias vi='nvim'
|
||||
#alias v='nvim'
|
||||
#alias vim='nvim'
|
||||
#alias vi='nvim'
|
||||
|
||||
# APT
|
||||
alias ain='sudo apt install'
|
||||
@@ -106,9 +106,6 @@ alias .....='cd ../../../..'
|
||||
# cd into the old directory
|
||||
alias bd='cd "$OLDPWD"'
|
||||
|
||||
# ls -> eza
|
||||
alias ls='eza'
|
||||
|
||||
# Search command line history
|
||||
alias h="history | grep "
|
||||
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
;;grammar ; tasing grammar mistake every you make
|
||||
|
||||
:tools
|
||||
ansible
|
||||
;;ansible
|
||||
;;biblio ; Writes a PhD for you (citation needed)
|
||||
;;debugger ; FIXME stepping through code, to help you add bugs
|
||||
;;direnv
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
# title=foot
|
||||
# locked-title=no
|
||||
|
||||
font=Terminus:style=Bold:size=12
|
||||
font=Monospace:size=11
|
||||
# font-bold=<bold variant of regular font>
|
||||
# font-italic=<italic variant of regular font>
|
||||
# font-bold-italic=<bold+italic variant of regular font>
|
||||
|
||||
+28
-20
@@ -175,34 +175,41 @@ bindsym $mod+Shift+e exec wtype $(awk '{print $1, $0}' ~/.local/share/chars/emoj
|
||||
# EXECS
|
||||
#######################
|
||||
|
||||
set $gnome-schema org.gnome.desktop.interface
|
||||
set $cursor-theme breeze_cursors
|
||||
set $cursor-size 30 # Adjust to your desired size
|
||||
|
||||
# Set GTK/icon theme
|
||||
exec_always {
|
||||
gsettings set $gnome-schema gtk-theme 'ArcDarker'
|
||||
gsettings set $gnome-schema icon-theme 'Papirus-Dark'
|
||||
gsettings set $gnome-schema cursor-theme 'Breeze_Light'
|
||||
gsettings set $gnome-schema cursor-size 30
|
||||
export XCURSOR_THEME=$cursor-theme
|
||||
export XCURSOR_SIZE=$cursor-size
|
||||
}
|
||||
|
||||
# set $gnome-schema org.gnome.desktop.interface
|
||||
|
||||
# # Set GTK/icon theme
|
||||
# exec_always {
|
||||
# gsettings set $gnome-schema gtk-theme 'ArcDarker'
|
||||
# gsettings set $gnome-schema icon-theme 'Papirus'
|
||||
# gsettings set $gnome-schema cursor-theme 'Breeze'
|
||||
# gsettings set $gnome-schema cursor-size 30
|
||||
# }
|
||||
|
||||
# Syncthing
|
||||
exec /usr/bin/syncthing
|
||||
|
||||
# Notifications
|
||||
exec_always dunst
|
||||
exec_always pgrep -x dunst > /dev/null || dunst
|
||||
|
||||
# Wlsunset (Night Light)
|
||||
#exec_always pkill wlsunset && wlsunset -l 47.6 -L -122.3 -t 2000 -T 3000
|
||||
#exec_always pgrep -x wlsunset > /dev/null || wlsunset -l 47.6 -L -122.3 -t 2000 -T 3000
|
||||
|
||||
# Gammastep until wlsunset becomes a thing again:
|
||||
|
||||
exec_always gammastep -l 47.6062:-122.3321 -t 4000:3500
|
||||
exec_always pgrep -x gammastep > /dev/null || gammastep -l 47.6062:-122.3321 -t 4000:3500
|
||||
|
||||
# udiskie - auto usb mounting
|
||||
exec /usr/bin/udiskie &
|
||||
|
||||
# Network Manager tray applet
|
||||
exec_always /usr/bin/nm-applet
|
||||
exec_always pgrep -x nm-tray || /usr/bin/nm-tray
|
||||
|
||||
# Bluetooth manager tray applet
|
||||
exec /usr/bin/blueman-applet
|
||||
@@ -243,13 +250,12 @@ default_floating_border none
|
||||
client.focused "#D27A31" "#5F9EA0" "#000000" "#D27A31"
|
||||
|
||||
set $opacity 0.9
|
||||
for_window [app_id="emacs"] opacity $opacity
|
||||
for_window [class="Emacs"] opacity $opacity
|
||||
for_window [app_id="foot"] opacity $opacity
|
||||
for_window [app_id="strawberry"] opacity $opacity
|
||||
for_window [app_id="pcmanfm-qt"] opacity $opacity
|
||||
for_window [app_id="org.kde.polkit-kde-authentication-agent-1"] floating enable
|
||||
for_window [app_id="bemenu"] floating enable
|
||||
for_window [app_id="bemenu"] layer top
|
||||
#for_window [app_id="org.kde.polkit-kde-authentication-agent-1"] floating enable
|
||||
#for_window [app_id="bemenu"] floating enable
|
||||
#for_window [app_id="bemenu"] layer top
|
||||
|
||||
|
||||
#######################
|
||||
@@ -349,16 +355,18 @@ bindsym $mod+Shift+0 move container to workspace $ws7
|
||||
#######################
|
||||
|
||||
bar {
|
||||
#swaybar_command waybar
|
||||
position top
|
||||
font "ETBembo 16"
|
||||
icon_theme "Papirus"
|
||||
font "ETBembo 17"
|
||||
strip_workspace_numbers yes
|
||||
status_command while date +'%Y-%m-%d %I:%M:%S %p'; do sleep 1; done
|
||||
#status_command while ~/.config/sway/scripts/sway_bar.sh; do sleep 1; done
|
||||
status_command ~/.config/sway/scripts/bar.sh
|
||||
|
||||
colors {
|
||||
statusline #ffffff
|
||||
background #000000AA
|
||||
inactive_workspace #323232AA #323232AA #5c5c5cAA
|
||||
focused_workspace #323232AA #5c5c5cAA #FFFFFFAA
|
||||
}
|
||||
|
||||
#status_command while date +'%Y-%m-%d %I:%M:%S %p'; do sleep 1; done
|
||||
}
|
||||
|
||||
Regular → Executable
+64
-60
@@ -1,70 +1,74 @@
|
||||
# Change this according to your device
|
||||
################
|
||||
# Variables
|
||||
################
|
||||
#!/bin/bash
|
||||
|
||||
# Date and time
|
||||
date_and_week=$(date "+%Y/%m/%d (w%-V)")
|
||||
current_time=$(date "+%H:%M")
|
||||
get_date() {
|
||||
echo -n " $(date '+%Y-%m-%d %H:%M')"
|
||||
}
|
||||
|
||||
#############
|
||||
# Commands
|
||||
#############
|
||||
|
||||
# Battery or charger
|
||||
battery_charge=$(cat /sys/class/power_supply/BAT0/capacity)
|
||||
battery_status=$(upower --show-info $(upower --enumerate | grep 'BAT') | egrep "state" | awk '{print $2}')
|
||||
|
||||
# Audio and multimedia
|
||||
audio_volume=$(pamixer --sink `pactl list sinks short | grep RUNNING | awk '{print $1}'` --get-volume)
|
||||
audio_is_muted=$(pamixer --sink `pactl list sinks short | grep RUNNING | awk '{print $1}'` --get-mute)
|
||||
media_artist=$(playerctl metadata artist)
|
||||
media_song=$(playerctl metadata title)
|
||||
player_status=$(playerctl status)
|
||||
|
||||
# Network
|
||||
network=$(ip route get 1.1.1.1 | grep -Po '(?<=dev\s)\w+' | cut -f1 -d ' ')
|
||||
# interface_easyname grabs the "old" interface name before systemd renamed it
|
||||
interface_easyname=$(dmesg | grep $network | grep renamed | awk 'NF>1{print $NF}')
|
||||
ping=$(ping -c 1 www.google.es | tail -1| awk '{print $4}' | cut -d '/' -f 2 | cut -d '.' -f 1)
|
||||
|
||||
# Others
|
||||
language=$(swaymsg -r -t get_inputs | awk '/1:1:AT_Translated_Set_2_keyboard/;/xkb_active_layout_name/' | grep -A1 '\b1:1:AT_Translated_Set_2_keyboard\b' | grep "xkb_active_layout_name" | awk -F '"' '{print $4}')
|
||||
loadavg_5min=$(cat /proc/loadavg | awk -F ' ' '{print $2}')
|
||||
|
||||
# Removed weather because we are requesting it too many times to have a proper
|
||||
# refresh on the bar
|
||||
#weather=$(curl -Ss 'https://wttr.in/Pontevedra?0&T&Q&format=1')
|
||||
|
||||
if [ $battery_status = "discharging" ];
|
||||
then
|
||||
battery_pluggedin='⚠'
|
||||
get_battery() {
|
||||
BATTERY_PATH="/sys/class/power_supply/BAT0"
|
||||
if [ -f "$BATTERY_PATH/capacity" ]; then
|
||||
BAT_PERCENT=$(cat "$BATTERY_PATH/capacity")
|
||||
BAT_STATUS=$(cat "$BATTERY_PATH/status")
|
||||
if [ "$BAT_STATUS" == "Charging" ]; then
|
||||
echo -n " $BAT_PERCENT%"
|
||||
else
|
||||
battery_pluggedin='⚡'
|
||||
echo -n " $BAT_PERCENT%"
|
||||
fi
|
||||
|
||||
if ! [ $network ]
|
||||
then
|
||||
network_active="⛔"
|
||||
else
|
||||
network_active="⇆"
|
||||
echo -n "Battery not found"
|
||||
fi
|
||||
}
|
||||
|
||||
if [ $player_status = "Playing" ]
|
||||
then
|
||||
song_status='▶'
|
||||
elif [ $player_status = "Paused" ]
|
||||
then
|
||||
song_status='⏸'
|
||||
else
|
||||
song_status='⏹'
|
||||
fi
|
||||
while true; do
|
||||
echo "$(get_date) $(get_battery)"
|
||||
sleep 5
|
||||
done
|
||||
|
||||
if [ $audio_is_muted = "true" ]
|
||||
then
|
||||
audio_active='🔇'
|
||||
else
|
||||
audio_active='🔊'
|
||||
fi
|
||||
# #echo "🎧 $song_status $media_artist - $media_song | ⌨ $language | $network_active $interface_easyname ($ping ms) | 🏋 $loadavg_5min | $audio_active $audio_volume% | $battery_pluggedin $battery_charge | "
|
||||
|
||||
echo "🎧 $song_status $media_artist - $media_song | ⌨ $language | $network_active $interface_easyname ($ping ms) | 🏋 $loadavg_5min | $audio_active $audio_volume% | $battery_pluggedin $battery_charge | $date_and_week 🕘 $current_time"
|
||||
# #############
|
||||
# # Commands
|
||||
# #############
|
||||
|
||||
# # Audio and multimedia
|
||||
# audio_volume=$(pamixer --sink `pactl list sinks short | grep RUNNING | awk '{print $1}'` --get-volume)
|
||||
# audio_is_muted=$(pamixer --sink `pactl list sinks short | grep RUNNING | awk '{print $1}'` --get-mute)
|
||||
# media_artist=$(playerctl metadata artist)
|
||||
# media_song=$(playerctl metadata title)
|
||||
# player_status=$(playerctl status)
|
||||
|
||||
# # Removed weather because we are requesting it too many times to have a proper
|
||||
# # refresh on the bar
|
||||
# #weather=$(curl -Ss 'https://wttr.in/Pontevedra?0&T&Q&format=1')
|
||||
|
||||
# if [ $battery_status = "discharging" ];
|
||||
# then
|
||||
# battery_pluggedin='⚠'
|
||||
# else
|
||||
# battery_pluggedin='⚡'
|
||||
# fi
|
||||
|
||||
# if ! [ $network ]
|
||||
# then
|
||||
# network_active="⛔"
|
||||
# else
|
||||
# network_active="⇆"
|
||||
# fi
|
||||
|
||||
# if [ $player_status = "Playing" ]
|
||||
# then
|
||||
# song_status='▶'
|
||||
# elif [ $player_status = "Paused" ]
|
||||
# then
|
||||
# song_status='⏸'
|
||||
# else
|
||||
# song_status='⏹'
|
||||
# fi
|
||||
|
||||
# if [ $audio_is_muted = "true" ]
|
||||
# then
|
||||
# audio_active='🔇'
|
||||
# else
|
||||
# audio_active='🔊'
|
||||
# fr
|
||||
|
||||
Reference in New Issue
Block a user