Modification barre des taches avec l'ajout d'un status.sh
This commit is contained in:
parent
a6db725c90
commit
8626591b5b
6
bashrc
6
bashrc
|
@ -1 +1,7 @@
|
|||
fish
|
||||
|
||||
#Alias
|
||||
alias v="nvim"
|
||||
alias spu="sudo pacman -syu"
|
||||
alias sps="sudo pacman -S"
|
||||
alias ps="pacman -s"
|
||||
|
|
5
config.fish
Normal file
5
config.fish
Normal file
|
@ -0,0 +1,5 @@
|
|||
#Alias
|
||||
alias v="nvim"
|
||||
alias spu="sudo pacman -syu"
|
||||
alias sps="sudo pacman -S"
|
||||
alias ps="pacman -s"
|
|
@ -1,5 +1,7 @@
|
|||
#!/bin/sh
|
||||
mkdir -p ~/.config/sway
|
||||
cp -v sway-config ~/.config/sway/config
|
||||
cp -v status.sh ~/.config/sway/status.sh
|
||||
cp -v config.fish ~/.config/fish
|
||||
cp -v bashrc ~/.bashrc
|
||||
cp -v ssh-config ~/.ssh/config
|
||||
|
|
14
status.sh
Normal file
14
status.sh
Normal file
|
@ -0,0 +1,14 @@
|
|||
# The Sway configuration file in ~/.config/sway/config calls this script.
|
||||
# You should see changes to the status bar after saving this script.
|
||||
# If not, do "killall swaybar" and $mod+Shift+c to reload the configuration.
|
||||
|
||||
# The abbreviated weekday (e.g., "Sat"), followed by the ISO-formatted date
|
||||
# like 2018-10-06 and the time (e.g., 14:01)
|
||||
date_formatted=$(date "+%a %d-%m-%+4Y %H:%M")
|
||||
|
||||
# Returns the battery status: "Full", "Discharging", or "Charging".
|
||||
battery_status=$(cat /sys/class/power_supply/BAT1/status)
|
||||
battery_level=$(cat /sys/class/power_supply/BAT1/capacity)
|
||||
|
||||
echo "$battery_level%" $battery_status '|' $date_formatted
|
||||
|
|
@ -206,10 +206,11 @@ bindsym $mod+r mode "resize"
|
|||
# Read `man 5 sway-bar` for more information about this section.
|
||||
bar {
|
||||
position top
|
||||
mode hide
|
||||
|
||||
# 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 %I:%M:%S %p'; do sleep 1; done
|
||||
status_command while bash ~/.config/sway/status.sh; do sleep 1; done
|
||||
|
||||
colors {
|
||||
statusline #ffffff
|
||||
|
|
Loading…
Reference in a new issue