Various fixes for nm-tray

main
Micke Nordin 4 years ago
parent cf7ce4f5b4
commit 247be85149

@ -5,7 +5,6 @@
hostname=$(hostname --fqdn) hostname=$(hostname --fqdn)
ip=$(hostname -I) ip=$(hostname -I)
# Produces "21 days", for example # Produces "21 days", for example
uptime_formatted=$(uptime | cut -d ',' -f1 | cut -d ' ' -f4,5) uptime_formatted=$(uptime | cut -d ',' -f1 | cut -d ' ' -f4,5)
@ -18,7 +17,13 @@ linux_version=$(uname -r | cut -d '-' -f1)
# Returns the battery status: "Full", "Discharging", or "Charging". # Returns the battery status: "Full", "Discharging", or "Charging".
battery_status=$(cat /sys/class/power_supply/BAT0/status) battery_status=$(cat /sys/class/power_supply/BAT0/status)
battery_percent=$(cat /sys/class/power_supply/BAT0/capacity) battery_percent=$(cat /sys/class/power_supply/BAT0/capacity)
bicon="⚡"
if [[ "${battery_status}" == "Full" ]]; then
bicon=""
elif [[ "${battery_status}" == "Discharging" ]]; then
bicon=""
fi
# Emojis and characters for the status bar # Emojis and characters for the status bar
echo ${hostname} ${uptime_formatted}${linux_version}${battery_percent}% ${battery_status}${date_formatted}${ip} echo ${hostname}: ${uptime_formatted}${linux_version}${battery_percent}% ${battery_status} ${bicon} ${date_formatted}${ip}

@ -177,13 +177,11 @@ input * xkb_layout "se"
bindsym $mod+a focus parent bindsym $mod+a focus parent
# Floating windows # Floating windows
for_window [window_role="pop-up"] floating enable for_window [window_role="pop-up"] floating enable
for_window [window_role="bubble"] floating enable for_window [window_role="bubble"] floating enable
for_window [window_role="task_dialog"] floating enable for_window [window_role="task_dialog"] floating enable
for_window [window_role="Preferences"] floating enable for_window [window_role="Preferences"] floating enable
for_window [window_role="task_dialog|bubble|page-info|Preferences|pop-up"] floating enable
for_window [window_role="Open Files"] floating enable sticky for_window [window_role="Open Files"] floating enable sticky
for_window [window_role="File Operation Progress"] floating enable sticky for_window [window_role="File Operation Progress"] floating enable sticky
for_window [window_role="Save As"] floating enable for_window [window_role="Save As"] floating enable
@ -237,7 +235,8 @@ bar {
# When the status_command prints a new line to stdout, swaybar updates. # When the status_command prints a new line to stdout, swaybar updates.
# The default just shows the current date and time. # The default just shows the current date and time.
status_command while date +'%Y-%m-%d %l:%M:%S %p'; do sleep 1; done #status_command while date +'%Y-%m-%d %l:%M:%S %p'; do sleep 1; done
status_command while ~/.config/sway/bin/status.sh; do sleep 1; done
colors { colors {
statusline #ffffff statusline #ffffff

@ -19,6 +19,7 @@ sudo apt install \
firefox-esr \ firefox-esr \
geary \ geary \
git \ git \
jq \
keepassxc \ keepassxc \
libdbus-1-dev \ libdbus-1-dev \
libncursesw5-dev \ libncursesw5-dev \
@ -65,6 +66,11 @@ else
echo /etc/fstab allready configured echo /etc/fstab allready configured
fi fi
# Fix nm-tray icon
nm=$(grep QT_QPA_PLATFORMTHEME /etc/security/pam_env.conf)
if [[ "x${nm}" == "x" ]]; then
echo 'QT_QPA_PLATFORMTHEME DEFAULT=qt5ct' | sudo tee -a /etc/security/pam_env.conf
fi
# Install software from sources # Install software from sources
mkdir -p ~/sources mkdir -p ~/sources
@ -151,6 +157,8 @@ sudo cp target/release/ncspot /usr/local/bin/
cd ${WORKDIR} cd ${WORKDIR}
rsync -a dotfiles/ ~/ rsync -a dotfiles/ ~/
echo "Follow this instruction if gnome-keyring gives you trouble: https://wiki.archlinux.org/index.php/GNOME/Keyring#Using_the_keyring_outside_GNOME" echo "Follow this instruction if gnome-keyring gives you trouble: https://wiki.archlinux.org/index.php/GNOME/Keyring#Using_the_keyring_outside_GNOME"
echo "Rebooting in 5 seconds" echo "Rebooting in 5 seconds"
sleep 5s sleep 5s

Loading…
Cancel
Save