diff --git a/bash/.bashrc b/bash/.bashrc index 90758d9..ea75b4c 100644 --- a/bash/.bashrc +++ b/bash/.bashrc @@ -88,9 +88,10 @@ fi #export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01' # some more ls aliases -alias ll='ls -alF' -alias la='ls -A' -alias l='ls -CF' +alias ls='exa' +alias ll='exa -alF' +alias la='exa -A' +alias l='exa -F' # Add an "alert" alias for long running commands. Use like so: # sleep 10; alert @@ -125,8 +126,9 @@ eval "$(zoxide init bash)" source ~/.dotfiles/nfrc.sh -export QT_QPA_PLATFORMTHEME=qt5ct - export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/ssh-agent.socket" export PATH="$HOME/.local/bin:$PATH" + + +export EDITOR=helix diff --git a/bin/fuzzel-powermenu b/bin/fuzzel-powermenu index 0e39e79..1fbbe23 100755 --- a/bin/fuzzel-powermenu +++ b/bin/fuzzel-powermenu @@ -4,7 +4,7 @@ cmd="fuzzel --minimal-lines --dmenu --hide-prompt " -action=$(printf "Sleep\0icon\x1fsystem-suspend\nReboot\0icon\x1fsystem-reboot\nShutdown\0icon\x1fsystem-shutdown\nExit Niri\0icon\x1fsystem-log-out\nCancel" | $cmd --index) +action=$(printf "Sleep\0icon\x1fnfrc-suspend\nReboot\0icon\x1fnfrc-reboot\nShutdown\0icon\x1fnfrc-poweroff\nExit Niri\0icon\x1fnfrc-logout\nCancel" | $cmd --index) command="" diff --git a/bin/fuzzel-remmina b/bin/fuzzel-remmina new file mode 100755 index 0000000..f02b1a4 --- /dev/null +++ b/bin/fuzzel-remmina @@ -0,0 +1,41 @@ +#!/usr/bin/env bash + +read -r -d '' awkscript <<- 'EOF' +{ + if ($1 == "name") { + print FILENAME":"$2; + } + if ($1 == "protocol") { + print "("$2")"; + } +} +EOF + +getentry() { + awk -F'=' "$awkscript" "$1" | paste -sd' ' +} + +export awkscript +export -f getentry + +groups=$(ls -1 ~/.local/share/remmina/ | cut -d_ -f1 | uniq) +groupcnt=$(wc -l <<<$groups) + +while true; do + if [ "$groupcnt" -eq 1 ]; then + group=$groups + else + group=$(echo -e "$groups" | fuzzel --dmenu) + fi + [ -z "$group" ] && exit + + entries=$(find ~/.local/share/remmina/ -name "$group*" -type f -exec bash -c "getentry {}" \; ) + #echo -e "$entries" + + fuzcmd="fuzzel --dmenu --terminal='' --with-nth=2 --accept-nth=1 --nth-delimiter=: --hide-prompt" + selected=$(echo -e "$entries" | $fuzcmd 2>/dev/null | tail -n1) + [[ $selected =~ delim ]] && [ "$groupcnt" -gt 1 ] && continue + break +done + +remmina -c "$selected" diff --git a/bin/fuzzel-tscale b/bin/fuzzel-tscale index 8e3a674..123c2cc 100755 --- a/bin/fuzzel-tscale +++ b/bin/fuzzel-tscale @@ -14,9 +14,11 @@ action=1 case "$action" in 0) echo '{"text": "connecting...", "class":"action"}' - endpoint=$(tailscale status | grep "exit node" | awk '{print $2}' | $cmd) + items=$(tailscale status | grep "exit node" | grep -v "offline" | awk '{print $2 " (" $1 ")"}') + + endpoint=$(echo -e "$items" | $cmd) [ -z "$endpoint" ] && exit - tailscale set --exit-node="$endpoint" + tailscale set --exit-node="${endpoint% *}" tailscale up ;; 1) diff --git a/kitty/.config/kitty/kitty.conf b/kitty/.config/kitty/kitty.conf index cc1b2aa..21a62e8 100644 --- a/kitty/.config/kitty/kitty.conf +++ b/kitty/.config/kitty/kitty.conf @@ -5,11 +5,21 @@ background_opacity 0.9 background_blur 1 window_margin_width 10 - +cursor_trail 20 +cursor_trail_decay 0.1 0.5 +cursor_trail_start_threshold 0 # BEGIN_KITTY_FONTS -font_family family="VictorMono Nerd Font Mono" +font_family family='Iosevka Nerd Font Mono' bold_font auto italic_font auto bold_italic_font auto # END_KITTY_FONTS + + + + +# BEGIN_KITTY_THEME +# Noctalia +include current-theme.conf +# END_KITTY_THEME \ No newline at end of file diff --git a/nfrc.sh b/nfrc.sh index 2798caf..c7b36f4 100644 --- a/nfrc.sh +++ b/nfrc.sh @@ -1,6 +1,6 @@ eval "$(fzf --bash)" -FMENU="fzf --header=$(basename "$0") \ +FMENU="fzf \ --layout=reverse \ --exact \ --border=bold \ diff --git a/niri/.config/niri/config.kdl b/niri/.config/niri/config.kdl index 65cbcac..3d5066c 100644 --- a/niri/.config/niri/config.kdl +++ b/niri/.config/niri/config.kdl @@ -84,17 +84,25 @@ output "DP-2" { // off //DP-2 mode "1920x1080" scale 1.25 - transform "normal" + // transform "270" position x=0 y=1080 } - -output "HDMI-A-1" { - // off //HDMI-A-1 +output "DP-1" { + // off //DP-2 mode "1920x1080" + scale 1 + // transform "270" position x=0 y=0 } output "HDMI-A-2" { + // off //HDMI-A-1 + mode "1920x1080" + scale 1 + position x=0 y=0 +} + +output "HDMI-A-1" { // off //HDMI-A-2 mode "2048x1152" position x=-2048 y=0 @@ -106,7 +114,7 @@ output "HDMI-A-2" { // https://yalter.github.io/niri/Configuration:-Layout layout { // Set gaps around windows in logical pixels. - gaps 12 + gaps 16 // When to center a column when changing focus, options are: // - "never", default behavior, focusing an off-screen column will keep at the left @@ -151,7 +159,7 @@ layout { // You can change how the focus ring looks. focus-ring { // Uncomment this line to disable the focus ring. - // off + // off // How many logical pixels the ring extends out from the windows. width 2 @@ -168,7 +176,7 @@ layout { // // The focus ring only draws around the active window, so the only place // where you can see its inactive-color is on other monitors. - inactive-color "#505050" + inactive-color "#888" // You can also use gradients. They take precedence over solid colors. // Gradients are rendered the same as CSS linear-gradient(angle, from, to). @@ -193,7 +201,7 @@ layout { off width 4 - active-color "#ffc87f" + active-color "#ffffff" inactive-color "#505050" // Color of the border around windows that request your attention. @@ -207,6 +215,15 @@ layout { // inactive-gradient from="#505050" to="#808080" angle=45 relative-to="workspace-view" } + tab-indicator { + width 10 + // place-within-column + corner-radius 20 + gaps-between-tabs 20 + position "left" + + } + // You can enable drop shadows for windows. shadow { // Uncomment the next line to enable shadows. @@ -226,7 +243,7 @@ layout { // window. These will also remove client-side shadows if the window // draws any. // - // draw-behind-window true + //draw-behind-window true // You can change how shadows look. The values below are in logical // pixels and match the CSS box-shadow properties. @@ -241,7 +258,7 @@ layout { offset x=0 y=5 // You can also change the shadow color and opacity. - color "#0007" + color "#000f" } // Struts shrink the area occupied by windows, similarly to layer-shell panels. @@ -250,8 +267,8 @@ layout { // Top and bottom struts will simply add outer gaps in addition to the area occupied by // layer-shell panels and regular gaps. struts { - left 24 - right 24 + left 32 + right 32 // top 64 // bottom 64 } @@ -263,13 +280,15 @@ layout { // See the binds section below for more spawn examples. // This line starts waybar, a commonly used bar for Wayland compositors. -spawn-at-startup "waybar" +//spawn-at-startup "waybar" +spawn-at-startup "qs" "-c" "noctalia-shell" spawn-at-startup "swww-daemon" -spawn-at-startup "gsettings set org.gnome.desktop.interface gtk-theme 'Arc-Dark'" -spawn-at-startup "gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark'" -spawn-at-startup "gsettings set org.gnome.desktop.interface icon-theme 'Papirus-Dark'" +// spawn-at-startup "gsettings set org.gnome.desktop.interface gtk-theme 'Arc-Dark'" +// spawn-at-startup "gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark'" +// spawn-at-startup "gsettings set org.gnome.desktop.interface icon-theme 'Papirus-Dark'" spawn-at-startup "swayidle" "-w" spawn-at-startup "systemctl" "--user" "start" "plasma-polkit-agent.service" +spawn-at-startup "xhost" "+local:" environment { QT_QPA_PLATFORMTHEME "qt6ct" @@ -285,7 +304,7 @@ xwayland-satellite { hotkey-overlay { // Uncomment this line to disable the "Important Hotkeys" pop-up at startup. - // skip-at-startup + skip-at-startup } // Uncomment this line to ask the clients to omit their client-side decorations if possible. @@ -352,7 +371,7 @@ window-rule { // Example: enable rounded corners for all windows. // (This example rule is commented out with a "/-" in front.) window-rule { - geometry-corner-radius 0 + geometry-corner-radius 20 clip-to-geometry true } @@ -373,10 +392,17 @@ binds { // Suggested binds for running programs: terminal, app launcher, screen locker. - Mod+Return hotkey-overlay-title="Open a Terminal: kitty" { spawn "kitty"; } - Mod+D hotkey-overlay-title="Run an Application: fuzzel" { spawn "fuzzel" "--lines=10"; } + Mod+D hotkey-overlay-title="Noctalia launcher" { spawn "qs" "-c" "noctalia-shell" "ipc" "call" "launcher" "toggle"; } + Mod+S { spawn "qs" "-c" "noctalia-shell" "ipc" "call" "controlCenter" "toggle"; } + Mod+V { spawn "qs" "-c" "noctalia-shell" "ipc" "call" "launcher" "clipboard"; } + Mod+T { spawn "kitty" "--single-instance" "-e" "tsui"; } + + Mod+Return hotkey-overlay-title="Open a Terminal: kitty" { spawn "kitty" "--single-instance"; } + //Mod+D hotkey-overlay-title="Run an Application: fuzzel" { spawn "fuzzel" "--lines=10"; } Mod+E hotkey-overlay-title="Nemo" { spawn "nemo"; } - Super+Alt+L hotkey-overlay-title="Lock the Screen: swaylock" { spawn "swaylock"; } + Super+Alt+L hotkey-overlay-title="Lock the Screen: swaylock" { spawn "qs" "-c" "noctalia-shell" "ipc" "call" "lockScreen" "lock"; } + Super+Shift+C hotkey-overlay-title="Remmina" { spawn "~/.dotfiles/bin/fuzzel-remmina"; } + Super+Shift+S hotkey-overlay-title="Fast ssh" { spawn "~/.local/bin/fuzzel-ssh"; } // Use spawn-sh to run a shell command. Do this if you need pipes, multiple commands, etc. @@ -401,7 +427,7 @@ binds { // Open/close the Overview: a zoomed-out view of workspaces and windows. // You can also move the mouse into the top-left hot corner, // or do a four-finger swipe up on a touchpad. - Mod+O repeat=false { toggle-overview; } + Mod+Tab repeat=false { toggle-overview; } Mod+Q repeat=false { close-window; } @@ -588,7 +614,7 @@ binds { Mod+Shift+Equal { set-window-height "+10%"; } // Move the focused window between the floating and the tiling layout. - Mod+V { toggle-window-floating; } + Mod+Alt+V { toggle-window-floating; } Mod+Shift+V { switch-focus-between-floating-and-tiling; } // Toggle tabbed column display mode. diff --git a/waybar/.config/waybar/config b/waybar/.config/waybar/config index 6f1742f..52e3f20 100644 --- a/waybar/.config/waybar/config +++ b/waybar/.config/waybar/config @@ -2,16 +2,57 @@ "layer": "top", "position": "bottom", "height": 16, - "modules-left": ["niri/workspaces", "niri/window"], - "modules-center": ["custom/media"], - "modules-right": ["tray", "niri/language", "network", "custom/tscale", "pulseaudio", "clock", "custom/quit"], + "modules-left": ["group/workspace"], + "modules-center": [], + "modules-right": ["group/media", "tray", "niri/language", "group/net", "pulseaudio", "privacy", "clock", "custom/quit"], "clock": { "format": "{:%H:%M}", "format-alt": "{:%a %b %d}", "tooltip": false }, "tray": { - "spacing": 10 + "spacing": 10 + }, + "custom/musicplay": { + "format": "{}", + "interval": 1, + "exec": "$HOME/.config/waybar/get_media.sh play", + "max-length": 40, + "on-click": "playerctl play-pause" + }, + "custom/musicnext": { + "format": "{}", + "exec": "$HOME/.config/waybar/get_media.sh next", + "max-length": 40, + "on-click": "playerctl next" + }, + "custom/musicprev": { + "format": "{}", + "exec": "$HOME/.config/waybar/get_media.sh prev", + "max-length": 40, + "on-click": "playerctl previous" + }, + "custom/musicname": { + "format": "{}", + "interval": 1, + "exec": "$HOME/.config/waybar/get_media.sh name", + "max-length": 40, + }, + "group/media": { + "orientation": "inherit", + "drawer": { + "transition-duration": 200, + "children-class": "not-med" + }, + "modules": [ + "custom/musicplay", "custom/musicprev", "custom/musicname", "custom/musicnext" + ] + }, + "custom/tscale": { + "interval": 5, + "exec": "~/.config/waybar/tscale", + "return-type": "json", + "on-click": "~/.dotfiles/bin/fuzzel-tscale" }, "network": { "format": "{ifname}", @@ -21,27 +62,40 @@ "tooltip-format-wifi": "{signalStrength}%", "max-length": 20 }, - "custom/media": { - "format": "{}", - "interval": 1, - "exec": "$HOME/.config/waybar/get_media.sh", - "max-length": 60, - "on-click": "playerctl play-pause" - }, - "custom/tscale": { - "interval": 5, - "exec": "~/.config/waybar/tscale", - "return-type": "json", - "on-click": "~/.dotfiles/bin/fuzzel-tscale" - }, "custom/keyboard": { "format": " {}", "interval": 1, "exec": "$HOME/.config/waybar/get_kbdlayout.sh" }, + "group/net": { + "orientation": "inherit", + "drawer": { + "transition-duration": 200, + "children-class": "not-net" + }, + "modules": [ + "network", "custom/tscale" + ] + }, + + "group/workspace": { + "orientation": "inherit", + "drawer": { + "transition-duration": 200, + "children-class": "workspace" + }, + "modules": ["niri/workspaces", "wlr/taskbar"] + }, "niri/language": { "format": "{short}" }, + "wlr/taskbar": { + "format": "{icon}", + "icon-theme": "Papirus", + //"all-outputs": true, + "on-click": "activate", + "on-click-middle": "close" + }, "pulseaudio": { "format": "{icon} {volume}%", diff --git a/waybar/.config/waybar/get_media.sh b/waybar/.config/waybar/get_media.sh index df8ebe8..52965d0 100755 --- a/waybar/.config/waybar/get_media.sh +++ b/waybar/.config/waybar/get_media.sh @@ -1,15 +1,28 @@ -media=$(playerctl metadata -f "({{playerName}}) {{artist}} - {{title}}" 2>/dev/null) +#!/usr/bin/env bash + +media=$(playerctl metadata -f "{{artist}} - {{title}}") player_status=$(playerctl status) -if [[ $player_status = "Playing" ]] -then - song_status='' -elif [[ $player_status = "Paused" ]] -then - song_status='' -else - song_status='' -fi -[ -z "$media" ] && echo -e "$song_status" -[ ! -z "$media" ] && echo -e "$song_status $media" +case "$1" in + "name") + [ -z "$media" ] || echo -e "$media" + ;; + "play") + if [[ "$player_status" = "Playing" ]] + then + echo -e '󰐊' + elif [[ "$player_status" = "Paused" ]] + then + echo -e '󰏤' + else + exit + fi + ;; + "next") + [ "$player_status" = "Stopped" ] || echo -e "󰒭" + ;; + "prev") + [ "$player_status" = "Stopped" ] || echo -e "󰒮" + ;; +esac diff --git a/waybar/.config/waybar/style.css b/waybar/.config/waybar/style.css index 16eee8a..166537b 100644 --- a/waybar/.config/waybar/style.css +++ b/waybar/.config/waybar/style.css @@ -74,14 +74,19 @@ window#waybar { color: #c5ffc6; } +#workspace { + margin: 3px; + border: 1px solid @cl_border; +} #workspaces { background: @bg_block; color: @fg_main; - margin: 3px 0px 3px 3px; - border-top: 1px solid @cl_border; - border-bottom: 1px solid @cl_border; - border-left: 1px solid @cl_border; + /* margin: 3px 0px 3px 3px; */ + /* border-top: 1px solid @cl_border; */ + /* border-bottom: 1px solid @cl_border; */ + /* border-left: 1px solid @cl_border; */ + /* border-right: 1px solid @cl_border; */ } #workspaces button { @@ -102,6 +107,7 @@ window#waybar { border-top: 1px solid @cl_border; border-bottom: 1px solid @cl_border; border-right: 1px solid @cl_border; + border-left: none; } window#waybar.empty #window { background-color: transparent; @@ -116,7 +122,39 @@ window#waybar.empty #window { border: 1px solid @cl_border; } -#custom-media { +#taskbar { + background: @bg_block; + color: @fg_main; + /* margin: 3px 3px 3px 0px; */ + padding: 0; + border-left: none; + border-right: none; +} + + +#taskbar button { + padding: 3px; + padding-left: 7px; + margin: 0px; + border-radius: 0; + border-top: 0px; + border-bottom: 0px; + border-left: 0px; + border-right: 0px; +} +#taskbar button.active { + background-color: #606060; +} + + +#privacy { + margin: 3px 3px 3px 3px; + padding: 5px 7px 5px 7px; + background-color: @bg_block; + border: 1px solid @cl_border; +} + +#media { margin: 3px; padding: 5px 7px 5px 7px; background: @bg_block; @@ -126,6 +164,11 @@ window#waybar.empty #window { border-left: 1px solid @cl_border; border-right: 1px solid @cl_border; } + +#media * { + margin: 0 3px; + padding: 0 4px; +} #pulseaudio { margin: 3px 3px 3px 0px; padding: 5px 7px 5px 5px; @@ -145,3 +188,5 @@ window#waybar.empty #window { border-left: 0px solid rgba(0,0,0,0); padding: 5px; } + +