diff --git a/alacritty/alacritty.toml b/alacritty/alacritty.toml index 84114df..6064a59 100644 --- a/alacritty/alacritty.toml +++ b/alacritty/alacritty.toml @@ -6,7 +6,7 @@ blinking = "On" shape = "Block" [env] -TERM = "alacritty" +TERM= "xterm-256color" [window] decorations = "full" diff --git a/install.conf.yaml b/install.conf.yaml index 6f9f781..f134af3 100644 --- a/install.conf.yaml +++ b/install.conf.yaml @@ -8,6 +8,12 @@ ~/.config/alacritty: create: true path: alacritty + ~/.config/sway: + create: true + path: sway + ~/.config/waybar: + create: true + path: waybar ~/.config/nvim: path: nvim ~/.zshrc: diff --git a/sway/config b/sway/config new file mode 100644 index 0000000..ba21573 --- /dev/null +++ b/sway/config @@ -0,0 +1,220 @@ +# Read `man 5 sway` for a complete reference. + +default_border pixel 2 +client.focused #64107d #1e222a #eceff4 #c44be8 #64107d +# client.focused_inactive #88c0d0 #2e3440 #d8dee9 #4c566a #4c566a +# client.unfocused #88c0d0 #2e3440 #d8dee9 #4c566a #4c566a +# client.urgent #ebcb8b #ebcb8b #2e3440 #8fbcbb #ebcb8b + +font pango:IosevkaFont Medium 11 + +### Variables +# +xwayland enable +# Logo key. Use Mod1 for Alt. +set $mod Mod4 +# Home row direction keys, like vim +set $left h +set $down j +set $up k +set $right l +# Your preferred terminal emulator +set $term alacritty +# Your preferred application launcher +# Note: pass the final command to swaymsg so that the resulting window can be opened +# on the original workspace that the command was run on. +set $menu dmenu-wl_run + +### Output configuration +# +# Default wallpaper (more resolutions are available in /usr/local/share/backgrounds/sway/) +output * bg ~/.config/sway/od_freebsd.png fill + +# Example configuration: +# +output DP-3 resolution 3440x1440@165hz position 1920,0 +# +# You can get the names of your outputs by running: swaymsg -t get_outputs + +### Idle configuration +set $lock swaylock -f -c 000000 --clock +# This will lock your screen after 300 seconds of inactivity, then turn off +# your displays after another 300 seconds, and turn your screens back on when +# resumed. It will also lock your screen before your computer goes to sleep. +exec swayidle -w \ + timeout 300 'swaylock -f -c 000000' --clock \ + timeout 600 'swaymsg "output * power off"' resume 'swaymsg "output * power on"' \ + before-sleep 'swaylock -f -c 000000' --clock + + +### Input configuration +input * xkb_rules evdev +input * xkb_layout "be" +# +# Example configuration: +# +# input "2:14:SynPS/2_Synaptics_TouchPad" { +# dwt enabled +# tap enabled +# natural_scroll enabled +# middle_emulation enabled +# } +# +# You can get the names of your inputs by running: swaymsg -t get_inputs +# Read `man 5 sway-input` for more information about this section. + +### Key bindings +# +# Basics: +# + # Start a terminal + bindsym $mod+t exec $term + + # Kill focused window + bindsym $mod+q kill + + # Start your launcher + bindsym $mod+p exec $menu + + bindsym $mod+w exec firefox + bindsym $mod+i exec $term -e "nvim" + + # Drag floating windows by holding down $mod and left mouse button. + # Resize them with right mouse button + $mod. + # Despite the name, also works for non-floating windows. + # Change normal to inverse to use left mouse button for resizing and right + # mouse button for dragging. + floating_modifier $mod normal + + # Reload the configuration file + bindsym $mod+Shift+c reload + + # Exit sway (logs you out of your Wayland session) + bindsym $mod+Shift+q exec sway exit +# +# Moving around: +# + # Move your focus around + bindsym $mod+$left focus left + bindsym $mod+$down focus down + bindsym $mod+$up focus up + bindsym $mod+$right focus right + # Or use $mod+[up|down|left|right] + bindsym $mod+Left focus left + bindsym $mod+Down focus down + bindsym $mod+Up focus up + bindsym $mod+Right focus right + + bindsym alt+tab focus next + + # Move the focused window with the same, but add Shift + bindsym $mod+Shift+$left move left + bindsym $mod+Shift+$down move down + bindsym $mod+Shift+$up move up + bindsym $mod+Shift+$right move right + # Ditto, with arrow keys + bindsym $mod+Shift+Left move left + bindsym $mod+Shift+Down move down + bindsym $mod+Shift+Up move up + bindsym $mod+Shift+Right move right +# +# Workspaces: +# + bindsym $mod+tab workspace next + bindsym $mod+Shift+tab workspace prev + + # Switch to workspace + bindsym $mod+ampersand workspace number 1 + bindsym $mod+eacute workspace number 2 + bindsym $mod+quotedbl workspace number 3 + bindsym $mod+apostrophe workspace number 4 + bindsym $mod+parenleft workspace number 5 + bindsym $mod+section workspace number 6 + bindsym $mod+egrave workspace number 7 + bindsym $mod+exclam workspace number 8 + bindsym $mod+ccedilla workspace number 9 + bindsym $mod+agrave workspace number 10 + # Move focused container to workspace + bindsym $mod+1 move container to workspace number 1 + bindsym $mod+2 move container to workspace number 2 + bindsym $mod+3 move container to workspace number 3 + bindsym $mod+4 move container to workspace number 4 + bindsym $mod+5 move container to workspace number 5 + bindsym $mod+6 move container to workspace number 6 + bindsym $mod+7 move container to workspace number 7 + bindsym $mod+8 move container to workspace number 8 + bindsym $mod+9 move container to workspace number 9 + bindsym $mod+0 move container to workspace number 10 + # Note: workspaces can have any name you want, not just numbers. + # We just use 1-10 as the default. +# +# Layout stuff: +# + # You can "split" the current object of your focus with + # $mod+b or $mod+v, for horizontal and vertical splits + # respectively. + bindsym $mod+b splith + bindsym $mod+v splitv + bindsym $mod+c split none + + # Switch the current container between different layout styles + bindsym $mod+Shift+s layout stacking + bindsym $mod+Shift+t layout tabbed + bindsym $mod+Shift+e layout toggle split + + # Make the current focus fullscreen + bindsym $mod+f fullscreen + + # Toggle the current focus between tiling and floating mode + bindsym $mod+Shift+space floating toggle + + # Swap focus between the tiling area and the floating area + bindsym $mod+space focus mode_toggle + + # Move focus to the parent container + bindsym $mod+a focus parent +# +# Scratchpad: +# + # Sway has a "scratchpad", which is a bag of holding for windows. + # You can send windows there and get them back later. + + # Move the currently focused window to the scratchpad + bindsym $mod+Shift+minus move scratchpad + + # Show the next scratchpad window or hide the focused scratchpad window. + # If there are multiple scratchpad windows, this command cycles through them. + bindsym $mod+minus scratchpad show +# +# Resizing containers: +# +mode "resize" { + # left will shrink the containers width + # right will grow the containers width + # up will shrink the containers height + # down will grow the containers height + bindsym $left resize shrink width 10px + bindsym $down resize grow height 10px + bindsym $up resize shrink height 10px + bindsym $right resize grow width 10px + + # Ditto, with arrow keys + bindsym Left resize shrink width 10px + bindsym Down resize grow height 10px + bindsym Up resize shrink height 10px + bindsym Right resize grow width 10px + + # Return to default mode + bindsym Return mode "default" + bindsym Escape mode "default" +} +bindsym $mod+r mode "resize" + +# +# Status Bar: +# +bar { + swaybar_command waybar +} + +include /usr/local/etc/sway/config.d/* diff --git a/sway/od_freebsd.png b/sway/od_freebsd.png new file mode 100644 index 0000000..00a550b Binary files /dev/null and b/sway/od_freebsd.png differ diff --git a/waybar/config b/waybar/config new file mode 100755 index 0000000..8a07333 --- /dev/null +++ b/waybar/config @@ -0,0 +1,234 @@ +{ + "layer": "top", + "output": ["DP-3"], + // "mode": "dock", + "gtk-layer-shell": "true", + //"exclusive": "false", + //"passthrough": "true", + // "spacing": 0, + // "margin-top": 0, + // "margin-left": 16, + // "margin-right": 16, + // "margin-bottom": -7, + "height": 32, + "modules-left": ["custom/launcher","sway/workspaces","cpu","memory","disk","sway/window"], + "modules-center": [], + "modules-right": ["sway/mode","custom/kernel","pulseaudio","tray","clock","custom/power"], + "keyboard-state": { + "numlock": true, + "capslock": true, + "format": "{name} {icon}", + "format-icons": { + "locked": "", + "unlocked": "" + } + }, + "wlr/taskbar": { + "format": "{icon} {app_id}", + "icon-size": 16, + "icon-theme": "Papirus", + "tooltip-format": "{title}", + "on-click": "activate", + "on-click-middle": "close", + "on-click-right": "minimize-raise", + "ignore-list": [ + "Alacritty" + ], + "app_ids-mapping": { + } + }, + "sway/workspaces": { + "sort-by-name": true, + "on-click": "activate", + "format": "{icon}", + "format-icons": { + "1": "", + "2": "", + "3": "", + "4": "", + "5": "", + "6": "", + "7": "", + "8": "", + "9": "", + "10": "", + "urgent": "", + "active": "", + "focused": "" + }, + "on-click": "activate" + // "sort-by-coordinates": true + }, + "sway/window": { + "format": "{}", + "max-length": 45, + "rewrite": { + "(.*) - Mozilla Firefox": "🌎 $1", + "(.*) - zsh": "> [$1]", + "nvim(.*)": "Editing $1" + }, + "tooltip": false + }, + "temperature": { + "hwmon-path": "/sys/module/k10temp/drivers/pci:k10temp/0000:00:18.3/hwmon/hwmon3/temp1_input", + "format": " {temperatureC}°C", + "interval": 2, + "on-click" : "", + }, + "sway/language": { + "format": "{short}  " + }, + "sway/mode": { + "format": "{}" + }, + "idle_inhibitor": { + "format": "{icon}", + "format-icons": { + "activated": "", + "deactivated": "" + } + }, + "tray": { + "spacing": 10, + "icon-size": 14, + }, + "clock": { + // "timezone": "America/New_York", + "format": " {:%H:%M}", + "tooltip-format": "{:%Y %B}\n{calendar}", + "format-alt": "󰃭 {:%A, %B %d, %Y}", + "on-click" : "", + }, + "backlight": { + // "device": "acpi_video1", + "format": " {percent}%", + }, + "cpu": { + "format": "{usage}% ", + "tooltip": false, + "interval": 2, + "on-click" : "alacritty -e htop", + }, + "memory": { + "format": "{}%  ", + "interval": 5, + "on-click" : "alacritty -e htop", + }, + "custom/memory": { + "format": "{} ", + "interval": 5, + "exec": "$HOME/.local/bin/mem3", + "on-click" : "", + }, + "disk": { + "interval": 30, + "format": "{percentage_used}% 󰋊", + "path": "/", + "on-click" : "", + }, + "network": { + // "interface": "wlp2*", // (Optional) To force the use of this interface + "format-wifi": "", + "format-ethernet": " {ifname}: {ipaddr}/{cidr}", + "format-linked": "{ifname} (No IP) ", + "format-disconnected": "睊 Not connected", + "format-alt": "{ifname}: {ipaddr}/{cidr}", + "tooltip-format": "{essid} {signalStrength}%" + }, + "pulseaudio": { + "format": "{icon} {volume}%", + "format-bluetooth": "{icon} {volume}% {format_source}", + "format-bluetooth-muted": "  {volume}% {format_source}", + "format-muted": " {format_source}", + "format-source": "", + "format-source-muted": "", + "format-icons": { + "headphone": "", + "hands-free": "", + "headset": "", + "phone": "", + "portable": "", + "car": "", + "default": ["", "", ""] + }, + "tooltip-format": "{desc}, {volume}%", + "on-click": "pactl set-sink-mute @DEFAULT_SINK@ toggle", + "on-click-right": "pactl set-source-mute @DEFAULT_SOURCE@ toggle", + "on-click-middle": "pavucontrol" + }, + "custom/updater":{ + "format": " {}", + "exec": "checkupdates | wc -l", + "exec-if": "[[ $(checkupdates | wc -l) ]]", + "interval": 300, + "on-click": "kitty --class update -T update -e yay -Syu && notify-send -i '/usr/share/icons/hicolor/256x256/apps/kitty.png' 'Kitty Terminal' 'The system has been updated' " + }, + "custom/power": { + "format": "", + "on-click": "wofi-power", + "on-click-right": "killall -9 wofi", + "tooltip": false + }, + "custom/launcher": { + "format": "", + //"format": "異", + "on-click": "wofi --show drun", + "on-click-right": "killall -9 wofi", + "tooltip": false + }, + "custom/dunst": { + "exec": "~/.config/waybar/scripts/dunst.sh", + "on-click": "dunstctl set-paused toggle", + "restart-interval": 1, + "format": "{}", + "return-type": "json", + "on-click" : "", + }, + "custom/dot4": { + "format": " ", + "on-click" : "", + }, + "custom/dot": { + "format": "", + "on-click" : "", + }, + "custom/dot2": { + "format": " ", + "on-click" : "", + }, + "custom/dot3": { + "format": " ", + "on-click" : "", + }, + "custom/network": { + "format": "{}", + "exec": "$HOME/.local/bin/network-traffic.sh", + "on-click" : "", + }, + "custom/gputmp": { + "format": "{}", + "exec": "$HOME/.local/bin/gputemp", + "interval": 2, + "on-click" : "", + }, + "custom/uptime": { + "format": " {}", + "interval": 30, + "exec": "$HOME/.local/bin/upt2", + "on-click" : "", + }, + "custom/kernel": { + "format": " {}", + "interval": 7200, + "exec": "uname -v | cut -d '-' -f1", + "on-click" : "", + }, + "custom/eix": { + "format": "{}  ", + "interval": 3600, // every hour + "exec": "(eix --installed --upgrade --format '') | wc -l", + "exec-if": "exit 0", // always run; consider advanced run conditions + "signal": 8, + "tooltip": false, + } +} diff --git a/waybar/style.css b/waybar/style.css new file mode 100755 index 0000000..9879f63 --- /dev/null +++ b/waybar/style.css @@ -0,0 +1,199 @@ +* { + border: none; + font-family: JetBrains Mono Nerd Font,Weather Icons,sans-serif; + font-size: 14px; + font-weight: bold; + min-height: 0; +} + +window#waybar { + background-color: transparent; + +} + +tooltip { + background: #1e222a; /* tooltip background */ + /*border: 2px solid #c0caf5; */ + border-radius: 6px; /* tooltip rounded corners */ + box-shadow: 1px 1px 2px 1px rgba(0, 0, 0, 0.4); +} + +/*window > box { + background: #1e222a; + border-radius: 12px; + min-width: 28px; + margin: 2px; + background-clip: border-box; + transition-property: background-color; + transition-duration: .5s; + box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.18), 0 1px 2px 1px rgba(0, 0, 0, 0.18), 0 2px 4px 2px rgba(0, 0, 0, 0.18); +}*/ + +#custom-memory, +#memory, +#cpu, +#custom-gputmp, +#custom-uptime, +#temperature, +#custom-weather, +#workspaces, +#custom-media, +#custom-fans, +#clock, +#network, +#custom-power, +#mode, +#pulseaudio, +#custom-kernel, +#custom-launcher, +#custom-network, +#window, +#custom-window, +#custom-eix, +#custom-update, +#disk, +#tray { + background-color: #1e222a; + padding: 0 6px; + margin: 4px 4px 4px 4px; + border-radius: 6px; + box-shadow: 1px 1px 2px 1px rgba(0, 0, 0, 0.4); + background-clip: padding-box; +} + +#pulseaudio { + color: #efbd5d; +} + +#pulseaudio.muted { + background-color: #e06c75; +} + +#custom-gputmp { + color: #41a7fc; +} + +#custom-memory { + color: #c75ae8; +} + +#memory { + color: #8bcd5b; +} + +#cpu { + color: #efbd5d; +} + +#custom-uptime { + color: #34bfd0; +} + +#temperature { + color: #c75ae8; +} + +#temperature.critical { + background-color: #e06c75; + color: #1f1f1f; +} + +#custom-kernel { + color: #41a7fc; +} + +#custom-weather { + color: #34bfd0; +} + +#disk { + color: #34bfd0; +} + +#custom-network { + color: #e06c75; +} + +#workspaces{ +} + +#workspaces button { + padding: 1px 0px; + color: #41a7fc; + transition-property: background-color; /* smooth transition for workspace module */ + transition-duration: .1s; +} + +#workspaces button:hover { + background-color: rgba(36, 36, 36, 0.9); +} + +#workspaces button.active { + color: #c75ae8; +} + +#workspaces button.focused { + color: #c75ae8; +} + +#workspaces button.urgent { + color: #e06c75; +} + +#clock { + color: #41a7fc; +} + +#mode { + color: #0fa4bf; +} + +#window { + color: #DDDAEC; +} + +#custom-power { + color: #f65866; +} + +#custom-launcher { + font-size: 13px; + color: #ADA8D0; +} +#custom-eix { + color: #2ec27e; +} + +#custom-update { + color: #2ec27e; +} + +#network { + color: #c75ae8; +} + +#network.disconnected { + color: #1f1f1f; + background-color: #e06c75; +} + +@keyframes gradient { + 0% { + background-position: 0% 50%; + } + 50% { + background-position: 100% 50%; + } + 100% { + background-position: 0% 50%; + } +} + +@keyframes blink { + to { + color: #e06c75; + background-color: #1f1f1f; + } +} + +