diff --git a/bin/i3-scratchpad.sh b/bin/i3-scratchpad.sh index e697b3a..3295371 100755 --- a/bin/i3-scratchpad.sh +++ b/bin/i3-scratchpad.sh @@ -1,7 +1,7 @@ #!/bin/bash # checks if instance of arg 1 exists, will show it if it does -exists=$(i3-msg "[instance=$1] scratchpad show" 2>&1 | grep ERROR) +exists=$(swaymsg "[instance=$1] scratchpad show" 2>&1 | grep -i error) if [ -n "$exists" ] ; then # creating it then showing if [ -z "$1" ] ; then @@ -16,5 +16,5 @@ if [ -n "$exists" ] ; then ${@:2} 2>&1 1>/dev/null & sleep 1 # lets application load then shows it on scratchpad - i3-msg "[instance=$1] scratchpad show" 1>/dev/null + swaymsg "[instance=$1] scratchpad show" 1>/dev/null fi diff --git a/gui/sway/config b/gui/sway/config index 12ea2d8..8d404b1 100644 --- a/gui/sway/config +++ b/gui/sway/config @@ -20,7 +20,7 @@ gaps inner 10 smart_gaps on # setup screens -exec_always --no-startup-id kanshi +exec --no-startup-id kanshi workspace 1 output DP-2 workspace 2 output DP-3 @@ -62,13 +62,21 @@ bindsym $mod+Shift+q kill # start dmenu (a program launcher) bindsym $mod+d exec --no-startup-id rofi-launcher -# setting up a vimscratch pad to use vimwiki +# exec --no-startup-id st -n todo -e nvim ~/vimwiki/todo/index.md +# exec --no-startup-id st -n cal -e calcurse +# bindsym $mod+s [instance="todo"] scratchpad show +# bindsym $mod+c [instance="cal"] scratchpad show + for_window [instance="todo"] move window to scratchpad for_window [instance="cal"] move window to scratchpad -exec --no-startup-id st -n todo -e nvim ~/vimwiki/todo/index.md -exec --no-startup-id st -n cal -e calcurse -bindsym $mod+s [instance="todo"] scratchpad show -bindsym $mod+c [instance="cal"] scratchpad show +for_window [instance="spotify"] move window to scratchpad +for_window [instance="wiki"] move window to scratchpad +for_window [instance="scratch"] move window to scratchpad +# bindings +bindsym $mod+s exec i3-scratchpad.sh todo st -n todo -e nvim ~/vimwiki/todo/index.md +bindsym $mod+c exec i3-scratchpad.sh cal st -n cal -e calcurse +bindsym $mod+m exec i3-scratchpad.sh spotify spotify +bindsym $mod+w exec i3-scratchpad.sh wiki st -n wiki -e nvim ~/vimwiki/index.md # bindcode $mod+40 exec "rofi -modi drun,run -show drun" # There also is i3-dmenu-desktop which only displays applications shipping a @@ -110,7 +118,6 @@ bindsym $mod+f fullscreen toggle # change container layout (stacked, tabbed, toggle split) # bindsym $mod+s layout stacking -bindsym $mod+w layout tabbed bindsym $mod+e layout toggle split # toggle tiling / floating @@ -199,4 +206,4 @@ bindsym $mod+r mode "resize" # background exec_always --no-startup-id wallpaper.sh # waybar -exec_always --no-startup-id killall -q waybar && waybar +exec_always --no-startup-id killall -q waybar; waybar diff --git a/gui/waybar/config b/gui/waybar/config index 35c9295..1800de6 100644 --- a/gui/waybar/config +++ b/gui/waybar/config @@ -2,7 +2,7 @@ "layer": "top", "modules-left": ["sway/workspaces", "sway/window"], "modules-center": ["weather"], - "modules-right": ["cpu", "memory", "network", "clock"], + "modules-right": ["cpu", "memory", "network", "privacy", "custom/date"], "sway/workspaces": { "all-outputs": true }, @@ -10,8 +10,22 @@ "all-outputs": true, "max-length": 30 }, - "clock": { - "format": "{:%A, %b. %e %r}" + "cpu": { + "format": "CPU: {usage}%" + }, + "memory": { + "format": "RAM: {percentage}%", + "tooltip-format": "RAM: {used}/{total} GiB" + }, + "network": { + "interval": 2, + "format-ethernet": "ETH: {bandwidthTotalBytes}", + "format-wifi": "WLAN: {ssid}", + "tooltip-format": "DOWN: {bandwidthDownBits} UP: {bandwidthUpBits} IP: {ipaddr}" + }, + "custom/date": { + "exec": "date +'%A, %b %d %l:%M %P'", + "interval": 10 } } diff --git a/gui/waybar/style.css b/gui/waybar/style.css index 17e9e64..8ad83a2 100644 --- a/gui/waybar/style.css +++ b/gui/waybar/style.css @@ -1,10 +1,107 @@ * { - /* `otf-font-awesome` is required to be installed for icons */ + border: none; + border-radius: 0; font-family: Hack Nerd Font, Roboto, Helvetica, Arial, sans-serif; - font-size: 13px; + font-size: 13pt; + min-height: 0; } window#waybar { + background-color: rgba(43, 48, 59, 1); + color: #ffffff; + transition-property: background-color; + transition-duration: .5s; +} + +window#waybar.empty { + color: rgba(0,0,0,0); +} + +.topbar { + border-bottom: 3px solid rgba(100, 114, 125, 1); +} + +.bottombar { + border-top: 3px solid rgba(100, 114, 125, 1); +} + +#workspaces button { + padding: 0 5px; background-color: transparent; color: #ffffff; } + +#workspaces button:hover { + background: rgba(0, 0, 0, 0.2); + box-shadow: inset 0 3px #ffffff; +} + +#workspaces button.focused { + background-color: #64727D; + box-shadow: inset 0 3px #ffffff; +} + +#workspaces button.urgent { + background-color: #eb4d4b; +} + +#mode { + background-color: #64727D; + border-top: 3px solid #ffffff; +} + +#backlight, +#battery.bat1, +#battery.bat2, +#clock, +#cpu, +#custom-mail, +#custom-poweroff, +#custom-weather, +#disk, +#idle_inhibitor, +#memory, +#mode, +#network.vpn, +#network.wifi, +#network.ethernet, +#network.disconnected, +#pulseaudio, +#taskbar, +#temperature, +#tray { + padding: 0 6px; + margin: 0 0px; + color: #ffffff; +} + +@keyframes blink { + to { + background-color: #ffffff; + color: #000000; + } +} + +#battery.bat2.critical:not(.charging) { + background-color: #f53c3c; + color: #ffffff; + animation-name: blink; + animation-duration: 0.5s; + animation-timing-function: linear; + animation-iteration-count: infinite; + animation-direction: alternate; +} + +#temperature.critical { + background-color: #eb4d4b; +} + +#taskbar button:hover { + background: rgba(0, 0, 0, 0.2); + box-shadow: inset 0 3px #ffffff; +} + +#taskbar button.active { + background-color: #64727D; + box-shadow: inset 0 3px #ffffff; +}