Various fixes for nm-tray
This commit is contained in:
parent
cf7ce4f5b4
commit
247be85149
3 changed files with 17 additions and 5 deletions
|
@ -5,7 +5,6 @@
|
|||
|
||||
hostname=$(hostname --fqdn)
|
||||
ip=$(hostname -I)
|
||||
|
||||
# Produces "21 days", for example
|
||||
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".
|
||||
battery_status=$(cat /sys/class/power_supply/BAT0/status)
|
||||
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
|
||||
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
|
||||
|
||||
# Floating windows
|
||||
|
||||
for_window [window_role="pop-up"] floating enable
|
||||
for_window [window_role="bubble"] floating enable
|
||||
for_window [window_role="task_dialog"] 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="File Operation Progress"] floating enable sticky
|
||||
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.
|
||||
# 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 {
|
||||
statusline #ffffff
|
||||
|
|
8
setup.sh
8
setup.sh
|
@ -19,6 +19,7 @@ sudo apt install \
|
|||
firefox-esr \
|
||||
geary \
|
||||
git \
|
||||
jq \
|
||||
keepassxc \
|
||||
libdbus-1-dev \
|
||||
libncursesw5-dev \
|
||||
|
@ -65,6 +66,11 @@ else
|
|||
echo /etc/fstab allready configured
|
||||
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
|
||||
mkdir -p ~/sources
|
||||
|
@ -151,6 +157,8 @@ sudo cp target/release/ncspot /usr/local/bin/
|
|||
cd ${WORKDIR}
|
||||
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 "Rebooting in 5 seconds"
|
||||
sleep 5s
|
||||
|
|
Loading…
Add table
Reference in a new issue