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..116e0d5 100644 --- a/install.conf.yaml +++ b/install.conf.yaml @@ -8,6 +8,15 @@ ~/.config/alacritty: create: true path: alacritty + ~/.config/sway: + create: true + path: sway + ~/.config/waybar: + create: true + path: waybar + ~/.config/rofi: + create: true + path: rofi ~/.config/nvim: path: nvim ~/.zshrc: diff --git a/rofi/config.rasi b/rofi/config.rasi new file mode 100644 index 0000000..4336a1c --- /dev/null +++ b/rofi/config.rasi @@ -0,0 +1,182 @@ +/** + * + * Author : Aditya Shakya (adi1090x) + * Github : @adi1090x + * + * Configuration For Rofi Version: 1.7.3 + **/ + +configuration { + /*---------- General setting ----------*/ + modi: "drun,run,filebrowser,window"; + case-sensitive: false; + cycle: true; + filter: ""; + scroll-method: 0; + normalize-match: true; + show-icons: true; + icon-theme: "Papirus"; +/* cache-dir: ;*/ + steal-focus: false; +/* dpi: -1;*/ + + /*---------- Matching setting ----------*/ + matching: "normal"; + tokenize: true; + + /*---------- SSH settings ----------*/ + ssh-client: "ssh"; + ssh-command: "{terminal} -e {ssh-client} {host} [-p {port}]"; + parse-hosts: true; + parse-known-hosts: true; + + /*---------- Drun settings ----------*/ + drun-categories: ""; + drun-match-fields: "name,generic,exec,categories,keywords"; + drun-display-format: "{name} [({generic})]"; + drun-show-actions: false; + drun-url-launcher: "xdg-open"; + drun-use-desktop-cache: false; + drun-reload-desktop-cache: false; + drun { + /** Parse user desktop files. */ + parse-user: true; + /** Parse system desktop files. */ + parse-system: true; + } + + /*---------- Run settings ----------*/ + run-command: "{cmd}"; + run-list-command: ""; + run-shell-command: "{terminal} -e {cmd}"; + + /*---------- Fallback Icon ----------*/ + run,drun { + fallback-icon: "application-x-addon"; + } + + /*---------- Window switcher settings ----------*/ + window-match-fields: "title,class"; + /*-- ,role,name,desktop --*/ + window-command: "wmctrl -i -R {window}"; + window-format: "{w} - {c} - {t:0}"; + window-thumbnail: false; + + /*---------- Combi settings ----------*/ +/* combi-modi: "window,run";*/ +/* combi-hide-mode-prefix: false;*/ +/* combi-display-format: "{mode} {text}";*/ + + /*---------- History and Sorting ----------*/ + disable-history: false; + sorting-method: "normal"; + max-history-size: 25; + + /*---------- Display setting ----------*/ + display-window: "Windows"; + display-windowcd: "Window CD"; + display-run: "Run"; + display-ssh: "SSH"; + display-drun: "Apps"; + display-combi: "Combi"; + display-keys: "Keys"; + display-filebrowser: "Files"; + + /*---------- Misc setting ----------*/ + terminal: "rofi-sensible-terminal"; + font: "Mono 12"; + sort: false; + threads: 0; + click-to-exit: true; +/* ignored-prefixes: "";*/ +/* pid: "/run/user/1000/rofi.pid";*/ + + /*---------- File browser settings ----------*/ + filebrowser { +/* directory: "/home";*/ + directories-first: true; + sorting-method: "name"; + } + + /*---------- Other settings ----------*/ + timeout { + action: "kb-cancel"; + delay: 0; + } + + /*---------- Keybindings ----------*/ +/* + kb-primary-paste: "Control+V,Shift+Insert"; + kb-secondary-paste: "Control+v,Insert"; + kb-clear-line: "Control+w"; + kb-move-front: "Control+a"; + kb-move-end: "Control+e"; + kb-move-word-back: "Alt+b,Control+Left"; + kb-move-word-forward: "Alt+f,Control+Right"; + kb-move-char-back: "Left,Control+b"; + kb-move-char-forward: "Right,Control+f"; + kb-remove-word-back: "Control+Alt+h,Control+BackSpace"; + kb-remove-word-forward: "Control+Alt+d"; + kb-remove-char-forward: "Delete,Control+d"; + kb-remove-char-back: "BackSpace,Shift+BackSpace,Control+h"; + kb-remove-to-eol: "Control+k"; + kb-remove-to-sol: "Control+u"; + kb-accept-entry: "Control+j,Control+m,Return,KP_Enter"; + kb-accept-custom: "Control+Return"; + kb-accept-custom-alt: "Control+Shift+Return"; + kb-accept-alt: "Shift+Return"; + kb-delete-entry: "Shift+Delete"; + kb-mode-next: "Shift+Right,Control+Tab"; + kb-mode-previous: "Shift+Left,Control+ISO_Left_Tab"; + kb-mode-complete: "Control+l"; + kb-row-left: "Control+Page_Up"; + kb-row-right: "Control+Page_Down"; + kb-row-down: "Down,Control+n"; + kb-page-prev: "Page_Up"; + kb-page-next: "Page_Down"; + kb-row-first: "Home,KP_Home"; + kb-row-last: "End,KP_End"; + kb-row-select: "Control+space"; + kb-screenshot: "Alt+S"; + kb-ellipsize: "Alt+period"; + kb-toggle-case-sensitivity: "grave,dead_grave"; + kb-toggle-sort: "Alt+grave"; + kb-cancel: "Escape,Control+g,Control+bracketleft"; + kb-custom-1: "Alt+1"; + kb-custom-2: "Alt+2"; + kb-custom-3: "Alt+3"; + kb-custom-4: "Alt+4"; + kb-custom-5: "Alt+5"; + kb-custom-6: "Alt+6"; + kb-custom-7: "Alt+7"; + kb-custom-8: "Alt+8"; + kb-custom-9: "Alt+9"; + kb-custom-10: "Alt+0"; + kb-custom-11: "Alt+exclam"; + kb-custom-12: "Alt+at"; + kb-custom-13: "Alt+numbersign"; + kb-custom-14: "Alt+dollar"; + kb-custom-15: "Alt+percent"; + kb-custom-16: "Alt+dead_circumflex"; + kb-custom-17: "Alt+ampersand"; + kb-custom-18: "Alt+asterisk"; + kb-custom-19: "Alt+parenleft"; + kb-select-1: "Super+1"; + kb-select-2: "Super+2"; + kb-select-3: "Super+3"; + kb-select-4: "Super+4"; + kb-select-5: "Super+5"; + kb-select-6: "Super+6"; + kb-select-7: "Super+7"; + kb-select-8: "Super+8"; + kb-select-9: "Super+9"; + kb-select-10: "Super+0"; + ml-row-left: "ScrollLeft"; + ml-row-right: "ScrollRight"; + ml-row-up: "ScrollUp"; + ml-row-down: "ScrollDown"; + me-select-entry: "MousePrimary"; + me-accept-entry: "MouseDPrimary"; + me-accept-custom: "Control+MouseDPrimary"; +*/ +} diff --git a/rofi/launcher b/rofi/launcher new file mode 100755 index 0000000..e82abe5 --- /dev/null +++ b/rofi/launcher @@ -0,0 +1,2 @@ +#!/usr/bin/env bash +rofi -show drun -theme launcher.rasi diff --git a/rofi/launcher.rasi b/rofi/launcher.rasi new file mode 100644 index 0000000..1291215 --- /dev/null +++ b/rofi/launcher.rasi @@ -0,0 +1,311 @@ +/** + * + * Author : Aditya Shakya (adi1090x) + * Github : @adi1090x + * + * Rofi Theme File + * Rofi Version: 1.7.3 + **/ + + +/*****----- Configuration -----*****/ +configuration { + modi: "drun,run,filebrowser,ssh,window"; + show-icons: true; + display-drun: ""; + display-run: ""; + display-filebrowser: ""; + display-window: ""; + display-ssh: ""; + drun-display-format: "{name}"; + window-format: "{w} · {c} · {t}"; +} + +/*****----- Global Properties -----*****/ +@import "~/.config/rofi/onedark.rasi" + +* { + font: "JetBrains Mono Nerd Font 11"; + border-colour: var(selected); + handle-colour: var(selected); + background-colour: var(background); + foreground-colour: var(foreground); + alternate-background: var(background-alt); + normal-background: var(background); + normal-foreground: var(foreground); + urgent-background: var(urgent); + urgent-foreground: var(background); + active-background: var(active); + active-foreground: var(background); + selected-normal-background: var(selected); + selected-normal-foreground: var(background); + selected-urgent-background: var(active); + selected-urgent-foreground: var(background); + selected-active-background: var(urgent); + selected-active-foreground: var(background); + alternate-normal-background: var(background); + alternate-normal-foreground: var(foreground); + alternate-urgent-background: var(urgent); + alternate-urgent-foreground: var(background); + alternate-active-background: var(active); + alternate-active-foreground: var(background); +} + +/*****----- Main Window -----*****/ +window { + /* properties for window widget */ + transparency: "real"; + location: center; + anchor: center; + fullscreen: false; + width: 600px; + x-offset: 0px; + y-offset: 0px; + + /* properties for all widgets */ + enabled: true; + margin: 0px; + padding: 0px; + border: 0px solid; + border-radius: 10px; + border-color: @border-colour; + cursor: "default"; + /* Background Colors */ + background-color: @background-colour; + /* Background Image */ + //background-image: url("/path/to/image.png", none); + /* Simple Linear Gradient */ + //background-image: linear-gradient(red, orange, pink, purple); + /* Directional Linear Gradient */ + //background-image: linear-gradient(to bottom, pink, yellow, magenta); + /* Angle Linear Gradient */ + //background-image: linear-gradient(45, cyan, purple, indigo); +} + +/*****----- Main Box -----*****/ +mainbox { + enabled: true; + spacing: 10px; + margin: 0px; + padding: 30px; + border: 0px solid; + border-radius: 0px 0px 0px 0px; + border-color: @border-colour; + background-color: transparent; + children: [ "inputbar", "message", "listview" ]; +} + +/*****----- Inputbar -----*****/ +inputbar { + enabled: true; + spacing: 10px; + margin: 0px; + padding: 0px; + border: 0px solid; + border-radius: 0px; + border-color: @border-colour; + background-color: transparent; + text-color: @foreground-colour; + children: [ "textbox-prompt-colon", "entry", "mode-switcher" ]; +} + +prompt { + enabled: true; + background-color: inherit; + text-color: inherit; +} +textbox-prompt-colon { + enabled: true; + padding: 5px 0px; + expand: false; + str: " "; + background-color: inherit; + text-color: inherit; +} +entry { + enabled: true; + padding: 5px 0px; + background-color: inherit; + text-color: inherit; + cursor: text; + placeholder: "Search..."; + placeholder-color: inherit; +} +num-filtered-rows { + enabled: true; + expand: false; + background-color: inherit; + text-color: inherit; +} +textbox-num-sep { + enabled: true; + expand: false; + str: "/"; + background-color: inherit; + text-color: inherit; +} +num-rows { + enabled: true; + expand: false; + background-color: inherit; + text-color: inherit; +} +case-indicator { + enabled: true; + background-color: inherit; + text-color: inherit; +} + +/*****----- Listview -----*****/ +listview { + enabled: true; + columns: 1; + lines: 8; + cycle: true; + dynamic: true; + scrollbar: true; + layout: vertical; + reverse: false; + fixed-height: true; + fixed-columns: true; + + spacing: 5px; + margin: 0px; + padding: 0px; + border: 0px solid; + border-radius: 0px; + border-color: @border-colour; + background-color: transparent; + text-color: @foreground-colour; + cursor: "default"; +} +scrollbar { + handle-width: 5px ; + handle-color: @handle-colour; + border-radius: 10px; + background-color: @alternate-background; +} + +/*****----- Elements -----*****/ +element { + enabled: true; + spacing: 10px; + margin: 0px; + padding: 5px 10px; + border: 0px solid; + border-radius: 10px; + border-color: @border-colour; + background-color: transparent; + text-color: @foreground-colour; + cursor: pointer; +} +element normal.normal { + background-color: var(normal-background); + text-color: var(normal-foreground); +} +element normal.urgent { + background-color: var(urgent-background); + text-color: var(urgent-foreground); +} +element normal.active { + background-color: var(active-background); + text-color: var(active-foreground); +} +element selected.normal { + background-color: var(selected-normal-background); + text-color: var(selected-normal-foreground); +} +element selected.urgent { + background-color: var(selected-urgent-background); + text-color: var(selected-urgent-foreground); +} +element selected.active { + background-color: var(selected-active-background); + text-color: var(selected-active-foreground); +} +element alternate.normal { + background-color: var(alternate-normal-background); + text-color: var(alternate-normal-foreground); +} +element alternate.urgent { + background-color: var(alternate-urgent-background); + text-color: var(alternate-urgent-foreground); +} +element alternate.active { + background-color: var(alternate-active-background); + text-color: var(alternate-active-foreground); +} +element-icon { + background-color: transparent; + text-color: inherit; + size: 24px; + cursor: inherit; +} +element-text { + background-color: transparent; + text-color: inherit; + highlight: inherit; + cursor: inherit; + vertical-align: 0.5; + horizontal-align: 0.0; +} + +/*****----- Mode Switcher -----*****/ +mode-switcher{ + enabled: true; + spacing: 10px; + margin: 0px; + padding: 0px; + border: 0px solid; + border-radius: 0px; + border-color: @border-colour; + background-color: transparent; + text-color: @foreground-colour; +} +button { + padding: 4px 11px 4px 7px; + border: 0px solid; + border-radius: 10px; + border-color: @border-colour; + background-color: @alternate-background; + text-color: inherit; + cursor: pointer; +} +button selected { + background-color: var(selected-normal-background); + text-color: var(selected-normal-foreground); +} + +/*****----- Message -----*****/ +message { + enabled: true; + margin: 0px; + padding: 0px; + border: 0px solid; + border-radius: 0px 0px 0px 0px; + border-color: @border-colour; + background-color: transparent; + text-color: @foreground-colour; +} +textbox { + padding: 8px 10px; + border: 0px solid; + border-radius: 10px; + border-color: @border-colour; + background-color: @alternate-background; + text-color: @foreground-colour; + vertical-align: 0.5; + horizontal-align: 0.0; + highlight: none; + placeholder-color: @foreground-colour; + blink: true; + markup: true; +} +error-message { + padding: 10px; + border: 2px solid; + border-radius: 10px; + border-color: @border-colour; + background-color: @background-colour; + text-color: @foreground-colour; +} diff --git a/rofi/onedark.rasi b/rofi/onedark.rasi new file mode 100644 index 0000000..7c76108 --- /dev/null +++ b/rofi/onedark.rasi @@ -0,0 +1,16 @@ +/** + * + * Author : Aditya Shakya (adi1090x) + * Github : @adi1090x + * + * Colors + **/ + +* { + background: #1E2127FF; + background-alt: #282B31FF; + foreground: #FFFFFFFF; + selected: #61AFEFFF; + active: #98C379FF; + urgent: #E06C75FF; +} diff --git a/rofi/powermenu b/rofi/powermenu new file mode 100755 index 0000000..8919863 --- /dev/null +++ b/rofi/powermenu @@ -0,0 +1,111 @@ +#!/usr/bin/env bash + +## Author : Aditya Shakya (adi1090x) +## Github : @adi1090x +# +## Rofi : Power Menu +# +## Available Styles +# +## style-1 style-2 style-3 style-4 style-5 + +# Current Theme + +# CMDs +uptime="`uptime -p | sed -e 's/up //g'`" +host=`hostname` + +# Options +shutdown='' +reboot='' +lock='' +suspend='󰤄' +logout='󰍃' +yes='' +no='' + +# Rofi CMD +rofi_cmd() { + rofi -dmenu \ + -p "$host" \ + -mesg "Uptime: $uptime" \ + -theme powermenu.rasi +} + +# Confirmation CMD +confirm_cmd() { + rofi \ + -theme-str 'window {location: center; anchor: center; fullscreen: false; width: 250px;}' \ + -theme-str 'mainbox {children: [ "message", "listview" ];}' \ + -theme-str 'listview {columns: 2; lines: 1;}' \ + -theme-str 'element-text {horizontal-align: 0.5;}' \ + -theme-str 'textbox {horizontal-align: 0.5;}' \ + -dmenu \ + -p 'Confirmation' \ + -mesg 'Are you Sure?' \ + -theme powermenu.rasi +} + +# Ask for confirmation +confirm_exit() { + echo -e "$yes\n$no" | confirm_cmd +} + +# Pass variables to rofi dmenu +run_rofi() { + echo -e "$lock\n$suspend\n$logout\n$reboot\n$shutdown" | rofi_cmd +} + +# Execute Command +run_cmd() { + selected="$(confirm_exit)" + if [[ "$selected" == "$yes" ]]; then + if [[ $1 == '--shutdown' ]]; then + shutdown -p now + elif [[ $1 == '--reboot' ]]; then + shutdown -r now + elif [[ $1 == '--suspend' ]]; then + systemctl suspend + elif [[ $1 == '--logout' ]]; then + if [[ "$XDG_SESSION_DESKTOP" == 'openbox' ]]; then + openbox --exit + elif [[ "$XDG_SESSION_DESKTOP" == 'bspwm' ]]; then + bspc quit + elif [[ "$XDG_SESSION_DESKTOP" == 'sway' ]]; then + sway exit + elif [[ "$XDG_SESSION_DESKTOP" == 'i3' ]]; then + i3-msg exit + elif [[ "$XDG_SESSION_DESKTOP" == 'plasma' ]]; then + qdbus org.kde.ksmserver /KSMServer logout 0 0 0 + fi + fi + else + exit 0 + fi +} + +# Actions +chosen="$(run_rofi)" +case ${chosen} in + $shutdown) + run_cmd --shutdown + ;; + $reboot) + run_cmd --reboot + ;; + $lock) + if command -v swaylock 2>&1 >/dev/null; then + swaylock -f -c 000000 --clock + elif command -v betterlockscreen 2>&1 >/dev/null; then + betterlockscreen -l + elif command -v i3lock 2>&1 >/dev/null; then + i3lock + fi + ;; + $suspend) + run_cmd --suspend + ;; + $logout) + run_cmd --logout + ;; +esac diff --git a/rofi/powermenu.rasi b/rofi/powermenu.rasi new file mode 100644 index 0000000..211c688 --- /dev/null +++ b/rofi/powermenu.rasi @@ -0,0 +1,170 @@ +/** + * + * Author : Aditya Shakya (adi1090x) + * Github : @adi1090x + * + * Rofi Theme File + * Rofi Version: 1.7.3 + **/ + +/*****----- Configuration -----*****/ +configuration { + show-icons: false; +} + +/*****----- Global Properties -----*****/ +@import "~/.config/rofi/onedark.rasi" + +/* +USE_BUTTONS=YES +*/ + +/*****----- Main Window -----*****/ +window { + /* properties for window widget */ + transparency: "real"; + location: center; + anchor: center; + fullscreen: false; + width: 1200px; + x-offset: 0px; + y-offset: 0px; + + /* properties for all widgets */ + enabled: true; + margin: 0px; + padding: 0px; + border: 0px solid; + border-radius: 0px; + border-color: @selected; + cursor: "default"; + background-color: transparent; +} + +/*****----- Main Box -----*****/ +mainbox { + enabled: true; + spacing: 25px; + margin: 0px; + padding: 0px; + border: 0px solid; + border-radius: 0px; + border-color: @selected; + background-color: transparent; + children: [ "inputbar", "listview" ]; +} + +/*****----- Inputbar -----*****/ +inputbar { + enabled: true; + spacing: 0px; + margin: 0px; + padding: 0px; + border: 0px; + border-radius: 0px; + border-color: @selected; + background-color: transparent; + text-color: @foreground; + children: [ "textbox-prompt-colon", "prompt"]; +} + +dummy { + background-color: transparent; +} + +textbox-prompt-colon { + enabled: true; + expand: false; + str: ""; + padding: 20px 24px; + border-radius: 100% 0px 0px 100%; + background-color: @urgent; + text-color: @background; +} +prompt { + enabled: true; + padding: 20px; + border-radius: 0px 100% 100% 0px; + background-color: @background; + text-color: @active; +} + +/*****----- Message -----*****/ +message { + enabled: true; + margin: 0px 50px; + padding: 15px; + border: 0px solid; + border-radius: 100%; + border-color: @selected; + background-color: @background-alt; + text-color: @foreground; +} +textbox { + background-color: inherit; + text-color: inherit; + vertical-align: 0.5; + horizontal-align: 0.5; + placeholder-color: @foreground; + blink: true; + markup: true; +} +error-message { + padding: 12px; + border: 0px solid; + border-radius: 0px; + border-color: @selected; + background-color: @background; + text-color: @foreground; +} + +/*****----- Listview -----*****/ +listview { + enabled: true; + columns: 5; + lines: 1; + cycle: true; + dynamic: true; + scrollbar: false; + layout: vertical; + reverse: false; + fixed-height: true; + fixed-columns: true; + + spacing: 15px; + margin: 0px; + padding: 0px; + border: 0px solid; + border-radius: 0px; + border-color: @selected; + background-color: transparent; + text-color: @foreground; + cursor: "default"; +} + +/*****----- Elements -----*****/ +element { + enabled: true; + spacing: 0px; + margin: 0px; + padding: 70px 10px; + border: 0px solid; + border-radius: 100%; + border-color: @selected; + background-color: @background-alt; + text-color: @foreground; + cursor: pointer; +} +element-text { + font: "JetBrains Mono Nerd Font 55"; + padding: 0px 0px 0px -18px; + background-color: transparent; + text-color: inherit; + cursor: inherit; + vertical-align: 0.5; + horizontal-align: 0.5; +} +element selected.normal { + background-color: var(selected); + text-color: var(background); +} diff --git a/sway/config b/sway/config new file mode 100644 index 0000000..472068d --- /dev/null +++ b/sway/config @@ -0,0 +1,224 @@ +# 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 ~/.config/rofi/launcher + +### 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 + xkb_layout "be" + xkb_numlock enabled +} + +### 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+x exec ~/.config/rofi/powermenu + + # Shortcuts + bindsym $mod+w exec firefox + bindsym $mod+i exec $term -e "nvim" + bindsym $mod+Shift+p exec hyprpicker -a + bindsym $mod+s exec watershot -c directory ~/Pictures/ + bindsym Print exec GRIM_DEFAULT_DIR=~/Pictures/ grim + + # Media keys + bindsym XF86AudioLowerVolume exec mixer vol=-5% + bindsym XF86AudioRaiseVolume exec mixer vol=+5% + bindsym XF86AudioMute exec mixer vol.mute=toggle + bindsym XF86AudioPrev exec playerctl previous + bindsym XF86AudioNext exec playerctl next + bindsym XF86AudioPlay exec playerctl play-pause + + # 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: +# +bindsym $mod+r mode "resize" +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 250px + bindsym $down resize grow height 250px + bindsym $up resize shrink height 250px + bindsym $right resize grow width 250px + + # Ditto, with arrow keys + bindsym Left resize shrink width 250px + bindsym Down resize grow height 250px + bindsym Up resize shrink height 250px + bindsym Right resize grow width 250px + + # Return to default mode + bindsym Return mode "default" + bindsym Escape mode "default" +} + +# +# 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/to_install.txt b/to_install.txt index 942ec39..0c7fc11 100644 --- a/to_install.txt +++ b/to_install.txt @@ -1,6 +1,8 @@ Installer : -- exa +- eza - bat - fd - ripgrep - dust +- gitui +- dysk diff --git a/waybar/config b/waybar/config new file mode 100755 index 0000000..3747e65 --- /dev/null +++ b/waybar/config @@ -0,0 +1,256 @@ +{ + "layer": "top", + "output": ["DP-3"], + // "mode": "dock", + "gtk-layer-shell": "true", + //"exclusive": "false", + //"passthrough": "true", + "spacing": 0, + "margin-top": 0, + "margin-bottom": 2, + "height": 32, + "modules-left": ["custom/launcher","sway/workspaces","cpu","memory","disk","sway/window"], + "modules-center": ["custom/media"], + "modules-right": ["custom/update_audio","sway/mode","custom/kernel","custom/network","pulseaudio","tray","clock","custom/power"], + +"custom/media": { + "format": " {} {icon}", + "return-type": "json", + "format-icons": { + "Playing": " ", + "Paused": " ", + "Stopped": " ", + }, + "max-length":70, + "exec": "playerctl -a metadata --format '{\"text\": \"{{artist}} - {{markup_escape(title)}}\", \"tooltip\": \"{{playerName}} : {{markup_escape(title)}}\", \"alt\": \"{{status}}\", \"class\": \"{{status}}\"}'", + "on-click": "playerctl play-pause", + "interval": 1, +}, + "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", + "window-rewrite": {} + // "sort-by-coordinates": true + }, + "sway/window": { + "format": "{}", + "max-length": 45, + // "icon":true, + "rewrite": { + "(.*) — Mozilla Firefox": "󰈹 $1", + "(.*)gitui(.*)": "󰊢 Gitui", + "(jika@.+)": ">_ $1", + "nvim (.*)": " $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-scroll-up": "mixer vol=+5%", + "on-scroll-down": "mixer vol=-5%", + "on-click": "pactl set-sink-mute @DEFAULT_SINK@ toggle && mixer vol.mute=toggle", + "on-click-right": "pactl set-source-mute @DEFAULT_SOURCE@ toggle", + "on-click-middle": "pavucontrol" + }, + "custom/update_audio": { + "format":"", + "exec": "pactl get-sink-volume @DEFAULT_SINK@", + "restart-interval": 1, + }, + "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": "~/.config/rofi/powermenu", + "on-click-right": "killall -9 rofi", + "tooltip": false + }, + "custom/launcher": { + "format": "", + "on-click": "~/.config/rofi/launcher", + "on-click-right": "killall -9 rofi", + "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": "󰈀 {} Mb/s", + "exec": "netstat -w 1 -q 1 -I re0 | tail -n 1 | awk -F ' ' '{mb =0 $4/1048576; printf \"%.2f\", mb}'", + "interval": 1, + "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..04f2061 --- /dev/null +++ b/waybar/style.css @@ -0,0 +1,201 @@ +* { + 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, +#custom-media, +#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; +} + +#custom-media, +#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: #34bfd0; +} + +#window { + color: #abb2bf; +} + +#custom-power { + color: #e06c75; +} + +#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; + } +} + + diff --git a/zshrc b/zshrc index e00e70d..c469ab0 100644 --- a/zshrc +++ b/zshrc @@ -6,7 +6,7 @@ export ZSH=$HOME/.oh-my-zsh export PATH="/home/jika/Scripts/:/home/jika/.cargo/bin:$PATH" export PATH="/home/jika/.local/bin:/home/jika/.deno/bin:$PATH" export RR_STATION="teo" -export RUSTC_WRAPPER=~/.cargo/bin/sccache +export RUSTC_WRAPPER=sccache export DOCKER_HOST=unix://$XDG_RUNTIME_DIR/podman/podman.sock export EDITOR="/usr/bin/nvim" # Set name of the theme to load --- if set to "random", it will