From 08fe7f54c0daf00f49993eb74f56e1ce4d0be781 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Tue, 17 Oct 2023 00:04:16 +0200 Subject: refactor --- config/essentials/zsh/.zshrc | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'config/essentials/zsh') diff --git a/config/essentials/zsh/.zshrc b/config/essentials/zsh/.zshrc index 414a7d7..993ae8a 100644 --- a/config/essentials/zsh/.zshrc +++ b/config/essentials/zsh/.zshrc @@ -1,15 +1,14 @@ #!/bin/zsh -if [[ "/dev/tty1" = "$TTY" || "/dev/tty2" = "$TTY" ]] && [[ "$(id -u)" -ne 0 ]] +if [ "$(id -u)" -ne 0 ] then clear - if [ "/dev/tty1" = "$TTY" ] - then - exec startw > /dev/null 2>&1 - else - exec startx > /dev/null 2>&1 - fi - exit + case "${TTY#/dev/}" in + tty1) exec startw ;; + tty2) exec startx ;; + tty3) exec startdwl ;; + *) false ;; + esac && exit fi autoload -U select-word-style -- cgit v1.2.3 From a3aca5cf6bc7e5c3d9623e48f4c57ea4745d62dd Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Tue, 17 Oct 2023 23:15:47 +0200 Subject: added dwl configuration --- bin/guiscripts/startdwl | 49 +++++++++++++++++++ bin/guiscripts/startw | 2 + config/essentials/zsh/.zshrc | 8 ++-- config/hyprland/waybar/config.jsonc | 78 ------------------------------- config/hyprland/waybar/dwl.jsonc | 74 +++++++++++++++++++++++++++++ config/hyprland/waybar/hyprland.jsonc | 78 +++++++++++++++++++++++++++++++ config/hyprland/waybar/schemes/base16.css | 24 +++++++--- 7 files changed, 225 insertions(+), 88 deletions(-) create mode 100755 bin/guiscripts/startdwl delete mode 100644 config/hyprland/waybar/config.jsonc create mode 100644 config/hyprland/waybar/dwl.jsonc create mode 100644 config/hyprland/waybar/hyprland.jsonc (limited to 'config/essentials/zsh') diff --git a/bin/guiscripts/startdwl b/bin/guiscripts/startdwl new file mode 100755 index 0000000..64b2515 --- /dev/null +++ b/bin/guiscripts/startdwl @@ -0,0 +1,49 @@ +#!/bin/sh + +eval "$(keychain --dir "$XDG_CONFIG_HOME/keychain" --eval --quiet --agents gpg,ssh)" +eval "$(keychain --dir "$XDG_CONFIG_HOME/keychain" --eval --quiet --agents gpg 3A626DD20A32EB2E5DD9CE71CFD9ABC97158CD5D 2> /dev/null)" + +export XCURSOR_THEME="Bibata-Modern-Classic" +export XCURSOR_SIZE="24" + +export GTK_THEME="Arc-Dark" + +export GTK_IM_MODULE="fcitx" +export XMODIFIERS="@im=fcitx" +export GLFW_IM_MODULE="ibus" + +export MOZ_ENABLE_WAYLAND="1" + +export QT_IM_MODULE="fcitx" +export QT_AUTO_SCREEN_SCALE_FACTOR="1" +export QT_QPA_PLATFORM="wayland;xcb" +export QT_QPA_PLATFORMTHEME="qt5ct" +export QT_WAYLAND_DISABLE_WINDOWDECORATION="1" + +export XDG_CURRENT_DESKTOP="dwl" +export XDG_SESSION_TYPE="wayland" +export XDG_SESSION_DESKTOP="dwl" + +export SDL_IM_MODULE="fcitx" +export SDL_VIDEODRIVER="wayland" +export CLUTTER_BACKEND="wayland" + +export TERMINAL="foot" +export MENUCMD="tofi" +export IMAGE="imv" + +# # nvidia +# env = LIBVA_DRIVER_NAME,nvidia +# env = XDG_SESSION_TYPE,wayland +# env = GBM_BACKEND,nvidia-drm +# env = __GLX_VENDOR_LIBRARY_NAME,nvidia +# env = WLR_NO_HARDWARE_CURSORS,1 + +(cd ~/.config/waybar/ && ln -sf dwl.jsonc config.jsonc) + +eval "$(keychain --dir "$XDG_CONFIG_HOME/keychain" --eval --quiet --agents gpg,ssh)" +eval "$(keychain --dir "$XDG_CONFIG_HOME/keychain" --eval --quiet --agents gpg 3A626DD20A32EB2E5DD9CE71CFD9ABC97158CD5D 2> /dev/null)" + +while true; +do dwl -s $HOME/.config/hypr/startup.sh +done diff --git a/bin/guiscripts/startw b/bin/guiscripts/startw index 9b35556..0383f48 100755 --- a/bin/guiscripts/startw +++ b/bin/guiscripts/startw @@ -3,4 +3,6 @@ eval "$(keychain --dir "$XDG_CONFIG_HOME/keychain" --eval --quiet --agents gpg,ssh)" eval "$(keychain --dir "$XDG_CONFIG_HOME/keychain" --eval --quiet --agents gpg 3A626DD20A32EB2E5DD9CE71CFD9ABC97158CD5D 2> /dev/null)" +(cd ~/.config/waybar/ && ln -sf hyprland.jsonc config.jsonc) + Hyprland diff --git a/config/essentials/zsh/.zshrc b/config/essentials/zsh/.zshrc index 993ae8a..e46cf8e 100644 --- a/config/essentials/zsh/.zshrc +++ b/config/essentials/zsh/.zshrc @@ -3,10 +3,10 @@ if [ "$(id -u)" -ne 0 ] then clear - case "${TTY#/dev/}" in - tty1) exec startw ;; - tty2) exec startx ;; - tty3) exec startdwl ;; + case "${TTY#/dev/tty}" in + 1) exec startw > /dev/null 2>&1 ;; + 2) exec startx > /dev/null 2>&1 ;; + 3) exec startdwl > /dev/null 2>&1 ;; *) false ;; esac && exit fi diff --git a/config/hyprland/waybar/config.jsonc b/config/hyprland/waybar/config.jsonc deleted file mode 100644 index cd24d14..0000000 --- a/config/hyprland/waybar/config.jsonc +++ /dev/null @@ -1,78 +0,0 @@ -{ - "layer": "top", - "modules-left": ["battery", "hyprland/workspaces", "mpd", "hyprland/window"], - "modules-center": ["clock"], - "modules-right": ["custom/wireguard", "network", "pulseaudio", "temperature", "cpu", "custom/memory", "custom/bluetooth", "tray"], - "mpd": { - "format": "{artist} - {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S})", - "artist-len": 24, - "format-disconnected": "s", - "format-stopped": "", - "state-icons": { - "playing": "", - "paused": "", - }, - "tooltip-format": "{songPosition}/{queueLength} ({volume}%)", - "on-click": "mpc toggle", - "on-scroll-up": "mpc volume +5", - "on-scroll-down": "mpc volume -5", - }, - "battery": { - "format-charging": " {capacity}%", - "on-click": "mpower", - "interval": 10, - }, - "hyprland/window": { - "format": "{}", - "separate-outputs": true, - }, - "pulseaudio": { - "scroll-step": 1, - "format": "{icon} {volume:3}%", - "format-icons": { - "default": ["", "", ""] - }, - "on-click": "pavucontrol", - }, - "temperature": { - "interval": 3, - "format": "{icon} {temperatureC}°C", - "format-icons": { - "default":["", "", "", "", ""] - }, - }, - "custom/wireguard": { - "exec": "ip addr show dev wg0", - "format": "wg0", - "restart-interval": 3, - }, - "network": { - "format-wifi": " ", - "tooltip-format-wifi": "{ifname} {essid}", - "format-ethernet": "", - "tooltip-format-ethernet": "{ifname} {ipaddr}", - "format-disconnected": "", - }, - "cpu": { - "format": " {usage:2}%", - "interval": 3, - }, - "custom/memory": { - "exec": "free -h | awk '(NR==2){ print $3 }'", - "format": "{}", - "restart-interval": 3, - }, - "clock": { - "format": "{:%R}", - "format-alt": "{:(%T) %A %d %B}", - "interval": 1, - }, - "custom/bluetooth": { - "exec": "bluetoothctl info", - "format": "", - "interval": 3, - }, - "tray": { - "spacing": 5, - } -} diff --git a/config/hyprland/waybar/dwl.jsonc b/config/hyprland/waybar/dwl.jsonc new file mode 100644 index 0000000..9d65564 --- /dev/null +++ b/config/hyprland/waybar/dwl.jsonc @@ -0,0 +1,74 @@ +{ + "layer": "top", + "modules-left": ["battery", "dwl/tags", "mpd"], + "modules-center": ["clock"], + "modules-right": ["custom/wireguard", "network", "pulseaudio", "temperature", "cpu", "custom/memory", "custom/bluetooth", "tray"], + "mpd": { + "format": "{artist} - {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S})", + "artist-len": 24, + "format-disconnected": "s", + "format-stopped": "", + "state-icons": { + "playing": "", + "paused": "", + }, + "tooltip-format": "{songPosition}/{queueLength} ({volume}%)", + "on-click": "mpc toggle", + "on-scroll-up": "mpc volume +5", + "on-scroll-down": "mpc volume -5", + }, + "battery": { + "format-charging": " {capacity}%", + "on-click": "mpower", + "interval": 10, + }, + "pulseaudio": { + "scroll-step": 1, + "format": "{icon} {volume:3}%", + "format-icons": { + "default": ["", "", ""] + }, + "on-click": "pavucontrol", + }, + "temperature": { + "interval": 3, + "format": "{icon} {temperatureC}°C", + "format-icons": { + "default":["", "", "", "", ""] + }, + }, + "custom/wireguard": { + "exec": "ip addr show dev wg0", + "format": "wg0", + "restart-interval": 3, + }, + "network": { + "format-wifi": " ", + "tooltip-format-wifi": "{ifname} {essid}", + "format-ethernet": "", + "tooltip-format-ethernet": "{ifname} {ipaddr}", + "format-disconnected": "", + }, + "cpu": { + "format": " {usage:2}%", + "interval": 3, + }, + "custom/memory": { + "exec": "free -h | awk '(NR==2){ print $3 }'", + "format": "{}", + "restart-interval": 3, + }, + "clock": { + "format": "{:%R}", + "format-alt": "{:(%T) %A %d %B}", + "interval": 1, + }, + "custom/bluetooth": { + "exec": "bluetoothctl info", + "format": "", + "interval": 3, + }, + "tray": { + "spacing": 5, + } +} diff --git a/config/hyprland/waybar/hyprland.jsonc b/config/hyprland/waybar/hyprland.jsonc new file mode 100644 index 0000000..cd24d14 --- /dev/null +++ b/config/hyprland/waybar/hyprland.jsonc @@ -0,0 +1,78 @@ +{ + "layer": "top", + "modules-left": ["battery", "hyprland/workspaces", "mpd", "hyprland/window"], + "modules-center": ["clock"], + "modules-right": ["custom/wireguard", "network", "pulseaudio", "temperature", "cpu", "custom/memory", "custom/bluetooth", "tray"], + "mpd": { + "format": "{artist} - {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S})", + "artist-len": 24, + "format-disconnected": "s", + "format-stopped": "", + "state-icons": { + "playing": "", + "paused": "", + }, + "tooltip-format": "{songPosition}/{queueLength} ({volume}%)", + "on-click": "mpc toggle", + "on-scroll-up": "mpc volume +5", + "on-scroll-down": "mpc volume -5", + }, + "battery": { + "format-charging": " {capacity}%", + "on-click": "mpower", + "interval": 10, + }, + "hyprland/window": { + "format": "{}", + "separate-outputs": true, + }, + "pulseaudio": { + "scroll-step": 1, + "format": "{icon} {volume:3}%", + "format-icons": { + "default": ["", "", ""] + }, + "on-click": "pavucontrol", + }, + "temperature": { + "interval": 3, + "format": "{icon} {temperatureC}°C", + "format-icons": { + "default":["", "", "", "", ""] + }, + }, + "custom/wireguard": { + "exec": "ip addr show dev wg0", + "format": "wg0", + "restart-interval": 3, + }, + "network": { + "format-wifi": " ", + "tooltip-format-wifi": "{ifname} {essid}", + "format-ethernet": "", + "tooltip-format-ethernet": "{ifname} {ipaddr}", + "format-disconnected": "", + }, + "cpu": { + "format": " {usage:2}%", + "interval": 3, + }, + "custom/memory": { + "exec": "free -h | awk '(NR==2){ print $3 }'", + "format": "{}", + "restart-interval": 3, + }, + "clock": { + "format": "{:%R}", + "format-alt": "{:(%T) %A %d %B}", + "interval": 1, + }, + "custom/bluetooth": { + "exec": "bluetoothctl info", + "format": "", + "interval": 3, + }, + "tray": { + "spacing": 5, + } +} diff --git a/config/hyprland/waybar/schemes/base16.css b/config/hyprland/waybar/schemes/base16.css index 61696d0..35737b4 100644 --- a/config/hyprland/waybar/schemes/base16.css +++ b/config/hyprland/waybar/schemes/base16.css @@ -54,7 +54,7 @@ window#waybar.PCSX2 #window { margin-left: 3px; } -#workspaces, #mpd, #battery, +#workspaces, #tags, #mpd, #battery, #clock, #custom-wireguard, #network, #pulseaudio, #temperature, #cpu, #custom-memory, #custom-bluetooth, #tray { border: solid @background; @@ -73,26 +73,38 @@ window#waybar.PCSX2 #window { margin-right: 16px; } -#workspaces { +#workspaces, #tags { border: solid @background 2px; background: @color3; } -#workspaces button { +#workspaces button, #tags button { transition: none; background: transparent; color: @background; } -#workspaces button.active { - text-shadow: 0px 1px 0px @color1; +#tags button.occupied { + background: @color2; } -#workspaces button:hover { +#workspaces button.active, #tags button.focused { + background-color: @color6; + border-bottom: 6px solid @color4; + +} + +#workspaces button:hover, #tags button:hover { transition: none; color: @color8; } +#tags button { + margin: 0; + padding-left: 5px; + padding-right: 5px; +} + #mpd { color: @background; padding: 0 16px; -- cgit v1.2.3 From 3811c7c3c611a03b36b0589033c31bb738313135 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Thu, 19 Oct 2023 11:23:24 +0200 Subject: fix: path not working --- config/essentials/zsh/aliases.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'config/essentials/zsh') diff --git a/config/essentials/zsh/aliases.sh b/config/essentials/zsh/aliases.sh index 4aff77e..db5bd4f 100644 --- a/config/essentials/zsh/aliases.sh +++ b/config/essentials/zsh/aliases.sh @@ -206,8 +206,8 @@ alias esl='$EDITOR ~/proj/suckless/slock/config.def.h' alias esls='$EDITOR ~/proj/suckless/slstatus/config.def.h' alias ehy='$EDITOR ~/.config/hypr/hyprland.conf' alias ehyb='$EDITOR ~/.config/hypr/binds.conf' -alias ewbj='$EDITOR ~/src/dotfiles/config/hyprland/waybar/config.jsonc' -alias ewbs='$EDITOR ~/src/dotfiles/config/hyprland/waybar/style.css' +alias ewbj='$EDITOR ~/.config/waybar/config.jsonc' +alias ewbs='$EDITOR ~/.config/waybar/style.css' alias cfd='$EDITOR config.def.h' # /# quick cd jV}k:!sort -t "'" -k 2 alias cdl='cd ~/dl' -- cgit v1.2.3 From e658b9abed15fcf0f6947f4c92d5c1809aa7da0e Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Fri, 20 Oct 2023 20:24:04 +0200 Subject: set 'dwl' as default (tty1) --- config/essentials/zsh/.zshrc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'config/essentials/zsh') diff --git a/config/essentials/zsh/.zshrc b/config/essentials/zsh/.zshrc index e46cf8e..7a2f945 100644 --- a/config/essentials/zsh/.zshrc +++ b/config/essentials/zsh/.zshrc @@ -4,9 +4,9 @@ if [ "$(id -u)" -ne 0 ] then clear case "${TTY#/dev/tty}" in - 1) exec startw > /dev/null 2>&1 ;; + 1) exec startdwl > /dev/null 2>&1 ;; 2) exec startx > /dev/null 2>&1 ;; - 3) exec startdwl > /dev/null 2>&1 ;; + 3) exec startw > /dev/null 2>&1 ;; *) false ;; esac && exit fi -- cgit v1.2.3 From c997f2a94462e694c2fdcf9c01fba17c889cf03d Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Fri, 20 Oct 2023 21:42:38 +0200 Subject: don't clear in normal shell and don't print PLUGPATH on reload --- config/essentials/zsh/.zshrc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'config/essentials/zsh') diff --git a/config/essentials/zsh/.zshrc b/config/essentials/zsh/.zshrc index 7a2f945..0efee9b 100644 --- a/config/essentials/zsh/.zshrc +++ b/config/essentials/zsh/.zshrc @@ -2,7 +2,7 @@ if [ "$(id -u)" -ne 0 ] then - clear + [ "${TTY%%tty*}" = '/dev/' ] && clear case "${TTY#/dev/tty}" in 1) exec startdwl > /dev/null 2>&1 ;; 2) exec startx > /dev/null 2>&1 ;; @@ -27,7 +27,6 @@ compinit . $ZDOTDIR/functions.zsh . $ZDOTDIR/aliases.sh -local PLUGPATH for file in /etc/os-release /usr/lib/os-release do [ -f "$file" ] && . "$file" && break done -- cgit v1.2.3