polybar/i3: calendar
This commit is contained in:
commit
ab00395a44
6 changed files with 128 additions and 18 deletions
|
@ -33,6 +33,7 @@ alias sduo="sudo"
|
||||||
alias suso="sudo"
|
alias suso="sudo"
|
||||||
alias sdou="sudo"
|
alias sdou="sudo"
|
||||||
alias sodu="sudo"
|
alias sodu="sudo"
|
||||||
|
alias sodo="sudo"
|
||||||
alias susdo="sudo"
|
alias susdo="sudo"
|
||||||
alias sudo-i="sudo -i"
|
alias sudo-i="sudo -i"
|
||||||
alias cd..="cd .."
|
alias cd..="cd .."
|
||||||
|
|
40
i3/config
40
i3/config
|
@ -1,10 +1,3 @@
|
||||||
# This file has been auto-generated by i3-config-wizard(1).
|
|
||||||
# It will not be overwritten, so edit it as you like.
|
|
||||||
#
|
|
||||||
# Should you change your keyboard layout some time, delete
|
|
||||||
# this file and re-run i3-config-wizard(1).
|
|
||||||
#
|
|
||||||
|
|
||||||
# i3 config file (v4)
|
# i3 config file (v4)
|
||||||
#
|
#
|
||||||
# Please see https://i3wm.org/docs/userguide.html for a complete reference!
|
# Please see https://i3wm.org/docs/userguide.html for a complete reference!
|
||||||
|
@ -41,10 +34,10 @@ bindsym XF86AudioMicMute exec --no-startup-id pactl set-source-mute @DEFAULT_SOU
|
||||||
floating_modifier $mod
|
floating_modifier $mod
|
||||||
|
|
||||||
# start a terminal
|
# start a terminal
|
||||||
bindsym $mod+Return exec i3-sensible-terminal
|
bindsym $mod+Return exec alacritty
|
||||||
|
|
||||||
# kill focused window
|
# kill focused window
|
||||||
bindsym $mod+q kill
|
bindsym $mod++shift+q kill
|
||||||
|
|
||||||
# start dmenu (a program launcher)
|
# start dmenu (a program launcher)
|
||||||
bindsym $mod+d exec --no-startup-id i3-dmenu-desktop
|
bindsym $mod+d exec --no-startup-id i3-dmenu-desktop
|
||||||
|
@ -78,6 +71,18 @@ bindsym $mod+Shift+Down move down
|
||||||
bindsym $mod+Shift+Up move up
|
bindsym $mod+Shift+Up move up
|
||||||
bindsym $mod+Shift+Right move right
|
bindsym $mod+Shift+Right move right
|
||||||
|
|
||||||
|
# resize focused window
|
||||||
|
bindsym $mod+Control+j resize shrink width 10 px or 10 ppt
|
||||||
|
bindsym $mod+Control+k resize grow height 10 px or 10 ppt
|
||||||
|
bindsym $mod+Control+l resize shrink height 10 px or 10 ppt
|
||||||
|
bindsym $mod+Control+h resize grow width 10 px or 10 ppt
|
||||||
|
|
||||||
|
# alternatively, you can use the cursor keys:
|
||||||
|
bindsym $mod+Control+Left resize shrink width 10 px or 10 ppt
|
||||||
|
bindsym $mod+Control+Down resize grow height 10 px or 10 ppt
|
||||||
|
bindsym $mod+Control+Up resize shrink height 10 px or 10 ppt
|
||||||
|
bindsym $mod+Control+Right resize grow width 10 px or 10 ppt
|
||||||
|
|
||||||
# split in horizontal orientation
|
# split in horizontal orientation
|
||||||
bindsym $mod+v split h
|
bindsym $mod+v split h
|
||||||
|
|
||||||
|
@ -180,16 +185,19 @@ mode "resize" {
|
||||||
bindsym $mod+r mode "default"
|
bindsym $mod+r mode "default"
|
||||||
}
|
}
|
||||||
|
|
||||||
bindsym $mod+r mode "resize"
|
# bindsym $mod+r mode "resize" #deaktiviert
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
# keine Fensterrahmen wenn nur ein Fenster angezeigt wird
|
# keine Fensterrahmen wenn nur ein Fenster angezeigt wird
|
||||||
hide_edge_borders smart
|
hide_edge_borders smart
|
||||||
|
|
||||||
for_window [class=".*"] border pixel 1
|
for_window [class=".*"] border pixel 1
|
||||||
# Start i3bar to display a workspace bar (plus the system information i3status
|
|
||||||
# finds out, if available)
|
# polybar
|
||||||
# auskommentiert weil polybar verwendet wird
|
|
||||||
#bar {
|
|
||||||
# status_command i3status
|
|
||||||
#}
|
|
||||||
exec_always --no-startup-id /home/mg/dotfiles/polybar/launch.sh
|
exec_always --no-startup-id /home/mg/dotfiles/polybar/launch.sh
|
||||||
|
|
||||||
|
# feh
|
||||||
|
exec --no-startup-id /usr/bin/feh --bg-scale /home/mg/dotfiles/i3/wallpaper/dogg.jpg
|
||||||
|
|
||||||
|
# polybar/popup-calendar
|
||||||
|
for_window [class="Yad" title="yad-calendar"] floating enable
|
||||||
|
|
BIN
i3/wallpaper/dogg.jpg
Normal file
BIN
i3/wallpaper/dogg.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 189 KiB |
|
@ -39,8 +39,8 @@ font-0 = fixed:pixelsize=10;1
|
||||||
font-1 = unifont:fontformat=truetype:size=8:antialias=false;0
|
font-1 = unifont:fontformat=truetype:size=8:antialias=false;0
|
||||||
font-2 = siji:pixelsize=10;1
|
font-2 = siji:pixelsize=10;1
|
||||||
modules-left = i3
|
modules-left = i3
|
||||||
modules-center =
|
modules-center = popup-calendar
|
||||||
modules-right = nightscout_script backlight alsa memory cpu wlan eth_intern eth_dock battery date powermenu
|
modules-right = nightscout_script backlight alsa memory cpu wlan eth_intern eth_dock battery date powermenu
|
||||||
tray-position = right
|
tray-position = right
|
||||||
tray-padding = 2
|
tray-padding = 2
|
||||||
tray-background = #888888
|
tray-background = #888888
|
||||||
|
@ -57,6 +57,12 @@ exec = /home/mg/dotfiles/polybar/nightscout_cgm.sh
|
||||||
interval = 120
|
interval = 120
|
||||||
format-prefix = "BZ "
|
format-prefix = "BZ "
|
||||||
|
|
||||||
|
[module/popup-calendar]
|
||||||
|
type = custom/script
|
||||||
|
exec = /home/mg/dotfiles/polybar/popup-calendar.sh
|
||||||
|
interval = 5
|
||||||
|
click-left = /home/mg/dotfiles/polybar/popup-calendar.sh --popup &
|
||||||
|
|
||||||
[module/xwindow]
|
[module/xwindow]
|
||||||
type = internal/xwindow
|
type = internal/xwindow
|
||||||
label = %title:0:30:...%
|
label = %title:0:30:...%
|
||||||
|
|
41
polybar/popup-calendar.sh
Executable file
41
polybar/popup-calendar.sh
Executable file
|
@ -0,0 +1,41 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
BAR_HEIGHT=22 # polybar height
|
||||||
|
BORDER_SIZE=1 # border size from your wm settings
|
||||||
|
YAD_WIDTH=222 # 222 is minimum possible value
|
||||||
|
YAD_HEIGHT=193 # 193 is minimum possible value
|
||||||
|
DATE="$(date +"%a %d %H:%M")"
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
--popup)
|
||||||
|
if [ "$(xdotool getwindowfocus getwindowname)" = "yad-calendar" ]; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
eval "$(xdotool getmouselocation --shell)"
|
||||||
|
eval "$(xdotool getdisplaygeometry --shell)"
|
||||||
|
|
||||||
|
# X
|
||||||
|
if [ "$((X + YAD_WIDTH / 2 + BORDER_SIZE))" -gt "$WIDTH" ]; then #Right side
|
||||||
|
: $((pos_x = WIDTH - YAD_WIDTH - BORDER_SIZE))
|
||||||
|
elif [ "$((X - YAD_WIDTH / 2 - BORDER_SIZE))" -lt 0 ]; then #Left side
|
||||||
|
: $((pos_x = BORDER_SIZE))
|
||||||
|
else #Center
|
||||||
|
: $((pos_x = X - YAD_WIDTH / 2))
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Y
|
||||||
|
if [ "$Y" -gt "$((HEIGHT / 2))" ]; then #Bottom
|
||||||
|
: $((pos_y = HEIGHT - YAD_HEIGHT - BAR_HEIGHT - BORDER_SIZE))
|
||||||
|
else #Top
|
||||||
|
: $((pos_y = BAR_HEIGHT + BORDER_SIZE))
|
||||||
|
fi
|
||||||
|
|
||||||
|
yad --calendar --undecorated --fixed --close-on-unfocus --no-buttons \
|
||||||
|
--width="$YAD_WIDTH" --height="$YAD_HEIGHT" --posx="$pos_x" --posy="$pos_y" \
|
||||||
|
--title="yad-calendar" --borders=0 >/dev/null &
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "$DATE"
|
||||||
|
;;
|
||||||
|
esac
|
54
q
Normal file
54
q
Normal file
|
@ -0,0 +1,54 @@
|
||||||
|
[1mdiff --git a/cheat-sheets/i3.md b/cheat-sheets/i3.md[m
|
||||||
|
[1mindex 56165b3..76fa2c7 100644[m
|
||||||
|
[1m--- a/cheat-sheets/i3.md[m
|
||||||
|
[1m+++ b/cheat-sheets/i3.md[m
|
||||||
|
[36m@@ -18,7 +18,7 @@[m
|
||||||
|
`mod + r` toggle resize mode[m
|
||||||
|
mod + Strg + < move Workspace to on the left/right[m
|
||||||
|
mod + Shift + s Enable Lockscreen[m
|
||||||
|
[31m-[m
|
||||||
|
[32m+[m[32mmod + Shift + Pfeiltasten tauscht Fenster[m
|
||||||
|
## Resize-Mode[m
|
||||||
|
`hl/links/rechts` breite +-[m
|
||||||
|
`jk/oben/unten` höhe +-[m
|
||||||
|
[1mdiff --git a/i3/config b/i3/config[m
|
||||||
|
[1mindex 19b3d27..7a70e88 100644[m
|
||||||
|
[1m--- a/i3/config[m
|
||||||
|
[1m+++ b/i3/config[m
|
||||||
|
[36m@@ -181,7 +181,9 @@[m [mmode "resize" {[m
|
||||||
|
}[m
|
||||||
|
[m
|
||||||
|
bindsym $mod+r mode "resize"[m
|
||||||
|
[31m-[m
|
||||||
|
[32m+[m[32m# ausblenden von Fensterrahmen bei nur einem Fenster[m
|
||||||
|
[32m+[m[32mhide_edge_borders smart[m
|
||||||
|
[32m+[m[32m#[m
|
||||||
|
# Start i3bar to display a workspace bar (plus the system information i3status[m
|
||||||
|
# finds out, if available)[m
|
||||||
|
# auskommntiert weil polybar verwendet wird[m
|
||||||
|
[1mdiff --git a/polybar/config b/polybar/config[m
|
||||||
|
[1mindex 002c385..b401e6d 100644[m
|
||||||
|
[1m--- a/polybar/config[m
|
||||||
|
[1m+++ b/polybar/config[m
|
||||||
|
[36m@@ -39,8 +39,8 @@[m [mfont-0 = fixed:pixelsize=10;1[m
|
||||||
|
font-1 = unifont:fontformat=truetype:size=8:antialias=false;0[m
|
||||||
|
font-2 = siji:pixelsize=10;1[m
|
||||||
|
modules-left = i3[m
|
||||||
|
[31m-modules-center =[m
|
||||||
|
[31m-modules-right = nightscout_script backlight alsa memory cpu wlan eth_intern eth_dock battery date powermenu[m
|
||||||
|
[32m+[m[32mmodules-center = nightscout_script backlight alsa memory cpu wlan eth_intern eth_dock battery date powermenu[m
|
||||||
|
[32m+[m[32mmodules-right =[m
|
||||||
|
tray-position = right[m
|
||||||
|
tray-padding = 2[m
|
||||||
|
tray-background = #888888[m
|
||||||
|
[1mdiff --git a/polybar/launch.sh b/polybar/launch.sh[m
|
||||||
|
[1mindex 70a82ec..a1038be 100755[m
|
||||||
|
[1m--- a/polybar/launch.sh[m
|
||||||
|
[1m+++ b/polybar/launch.sh[m
|
||||||
|
[36m@@ -1,5 +1,5 @@[m
|
||||||
|
#!/bin/bash[m
|
||||||
|
[31m-# Terminate already running bar instances[m
|
||||||
|
[32m+[m[32m# Terminate already running instances[m
|
||||||
|
killall -q polybar[m
|
||||||
|
# Launch bar[m
|
||||||
|
for m in $(polybar --list-monitors | cut -d":" -f1); do[m
|
Loading…
Reference in a new issue