From f4d04736524250537fef4398315621120c27bc64 Mon Sep 17 00:00:00 2001 From: Jika Date: Sat, 8 Feb 2025 12:16:37 +0100 Subject: [PATCH 1/6] Add sway and waybar config --- alacritty/alacritty.toml | 2 +- install.conf.yaml | 6 + sway/config | 220 ++++++++++++++++++++++++++++++++++++ sway/od_freebsd.png | Bin 0 -> 40929 bytes waybar/config | 234 +++++++++++++++++++++++++++++++++++++++ waybar/style.css | 199 +++++++++++++++++++++++++++++++++ 6 files changed, 660 insertions(+), 1 deletion(-) create mode 100644 sway/config create mode 100644 sway/od_freebsd.png create mode 100755 waybar/config create mode 100755 waybar/style.css 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 0000000000000000000000000000000000000000..00a550b0649289196af315c99c217c7652911948 GIT binary patch literal 40929 zcmeIb2UJwc(kR>n5oAEjfQSSYQNjR2lrSU#C7BS6Ll}aRBnV1yBOU<(1tTITD3~yy zqGH}=6jaQJsAB{X5fv4c@H*^4&-(f9`CQ+<|9fve_FCsMySlo%x>8qH_x7f_yE@49 zQ|t!-ka2Rfn+iaG_){`mQWX9fSvO}i0DYa7PWOzO>K&sJ9uejr6wFtNS`yAz;l~E~ z0}xyLBxlOn*JEYvyUwigTAnRe@ER;neRN)HnQWr&k&?rQt@fTeSGzhOPhP$H%*nN% zXLbGjaJKWJ>fZO)J!XHL8oIjaQE}wm=7+bpEj;--vcu%-sc*YFOA=3yiPGGER=Moc zg1Zh~SM5F+MK?F4q}9e-$y-^qv@a-5*z7njbL)`&pRsPQKBP^b*Z)r3^3K`^b5GwN zd7S;ABy&yXv4MNa=ILQ8M-1`GZGE$M+`&E#-`^JJZ>cg2;`4mC^9EeP{KlvmULNf7Tz5DeGw3JhydDc=VF6M&I;XBVJ03S^akLp|T5kePj)5Bh3Pm z?++Sx$>PI#({&mm2l69U-Mj1hE+`;ZORw^z_&z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{TgMi9I}<_i`jW*(1u~*uO?t*L#T)~7n~R-Mw~*{;Rc6rX>#JLWNmqd< z>B@7R6d0>T7-2KIU|Z>N>Kt0JoP?!kEjuZhzM0t4LQvG6yQn__YqBxeGpoF!$KusaoyEEdo%v-Xtj!yujqA%+J7Dok=l-T?U` zhI#3|cOk3_GXm+U#LYA@)hp)h&rc;$$N%Ec3N`g!U+KLC)N3Hn5qkYhSP4U60cM8( zhhI=aJof6WS7-45%YdYb$RK*xGbn=I?CSregr{ZLsl{AWGE!;idbe2oq%HCS@)(KZ z$|QN=*-|*Y?`=X7=#@sVZS=YWi3Ppx06=f3>|GtYy`gt?=yiu)clc9xxZZqH3tp6~ zce1md4*T|+P_GI7sR{L(P4Cjv8#j96MsM8cmO!sN{Qv6?1&iNP=$a6b3;Q*A*2Cwo`B12(+n{|gE;O|1X` literal 0 HcmV?d00001 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; + } +} + + From b29fbdf615d122a2fa2763926677f2d8c4f9d5c2 Mon Sep 17 00:00:00 2001 From: Jika Date: Sat, 8 Feb 2025 15:15:37 +0100 Subject: [PATCH 2/6] clean config --- sway/config | 38 +++++++++++++++----------------------- to_install.txt | 4 +++- zshrc | 2 +- 3 files changed, 19 insertions(+), 25 deletions(-) diff --git a/sway/config b/sway/config index ba21573..1d57578 100644 --- a/sway/config +++ b/sway/config @@ -48,20 +48,11 @@ exec swayidle -w \ ### 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. +input * { + xkb_rules evdev + xkb_layout "be" + xkb_numlock enabled +} ### Key bindings # @@ -78,6 +69,7 @@ input * xkb_layout "be" bindsym $mod+w exec firefox bindsym $mod+i exec $term -e "nvim" + bindsym $mod+Shift+p exec hyprpicker -a # Drag floating windows by holding down $mod and left mouse button. # Resize them with right mouse button + $mod. @@ -188,27 +180,27 @@ input * xkb_layout "be" # # 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 10px - bindsym $down resize grow height 10px - bindsym $up resize shrink height 10px - bindsym $right resize grow width 10px + 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 10px - bindsym Down resize grow height 10px - bindsym Up resize shrink height 10px - bindsym Right resize grow width 10px + 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" } -bindsym $mod+r mode "resize" # # Status Bar: 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/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 From 77488ab995eab5893a0099c950d006ec81887adc Mon Sep 17 00:00:00 2001 From: Jika Date: Sat, 8 Feb 2025 15:15:54 +0100 Subject: [PATCH 3/6] correct audio and network for waybar freebsd --- waybar/config | 37 +++++++++++++++++++++++-------------- waybar/style.css | 4 ++-- 2 files changed, 25 insertions(+), 16 deletions(-) diff --git a/waybar/config b/waybar/config index 8a07333..b6c3bde 100755 --- a/waybar/config +++ b/waybar/config @@ -5,15 +5,14 @@ "gtk-layer-shell": "true", //"exclusive": "false", //"passthrough": "true", - // "spacing": 0, - // "margin-top": 0, - // "margin-left": 16, - // "margin-right": 16, - // "margin-bottom": -7, + "spacing": 0, + "margin-top": 0, + "margin-bottom": 2, "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"], + "modules-right": ["custom/update_audio","sway/mode","custom/kernel","custom/network","pulseaudio","tray","clock","custom/power"], + "keyboard-state": { "numlock": true, "capslock": true, @@ -56,16 +55,19 @@ "active": "", "focused": "" }, - "on-click": "activate" + "on-click": "activate", + "window-rewrite": {} // "sort-by-coordinates": true }, "sway/window": { "format": "{}", "max-length": 45, + // "icon":true, "rewrite": { - "(.*) - Mozilla Firefox": "🌎 $1", - "(.*) - zsh": "> [$1]", - "nvim(.*)": "Editing $1" + "(.*) — Mozilla Firefox": "󰈹 $1", + "(.*)gitui(.*)": "󰊢 Gitui", + "(jika@.+)": ">_ $1", + "nvim (.*)": " $1" }, "tooltip": false }, @@ -152,10 +154,17 @@ "default": ["", "", ""] }, "tooltip-format": "{desc}, {volume}%", - "on-click": "pactl set-sink-mute @DEFAULT_SINK@ toggle", + "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", @@ -171,7 +180,6 @@ }, "custom/launcher": { "format": "", - //"format": "異", "on-click": "wofi --show drun", "on-click-right": "killall -9 wofi", "tooltip": false @@ -201,8 +209,9 @@ "on-click" : "", }, "custom/network": { - "format": "{}", - "exec": "$HOME/.local/bin/network-traffic.sh", + "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": { diff --git a/waybar/style.css b/waybar/style.css index 9879f63..58209c0 100755 --- a/waybar/style.css +++ b/waybar/style.css @@ -149,11 +149,11 @@ tooltip { } #window { - color: #DDDAEC; + color: #abb2bf; } #custom-power { - color: #f65866; + color: #e06c75; } #custom-launcher { From 28bb9393252483f64bdbcff9fdd2cf7299f18b96 Mon Sep 17 00:00:00 2001 From: Jika Date: Sun, 9 Feb 2025 18:05:56 +0100 Subject: [PATCH 4/6] Add media playerctl in waybar --- waybar/config | 15 ++++++++++++++- waybar/style.css | 4 +++- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/waybar/config b/waybar/config index b6c3bde..a6bb27c 100755 --- a/waybar/config +++ b/waybar/config @@ -10,9 +10,22 @@ "margin-bottom": 2, "height": 32, "modules-left": ["custom/launcher","sway/workspaces","cpu","memory","disk","sway/window"], - "modules-center": [], + "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, diff --git a/waybar/style.css b/waybar/style.css index 58209c0..04f2061 100755 --- a/waybar/style.css +++ b/waybar/style.css @@ -51,6 +51,7 @@ tooltip { #custom-window, #custom-eix, #custom-update, +#custom-media, #disk, #tray { background-color: #1e222a; @@ -106,6 +107,7 @@ tooltip { color: #34bfd0; } +#custom-media, #disk { color: #34bfd0; } @@ -145,7 +147,7 @@ tooltip { } #mode { - color: #0fa4bf; + color: #34bfd0; } #window { From eabd8aa8952560ae45760643cca26f6678ae581e Mon Sep 17 00:00:00 2001 From: Jika Date: Sun, 9 Feb 2025 18:06:22 +0100 Subject: [PATCH 5/6] Add media shortcut and screenshot to sway --- sway/config | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sway/config b/sway/config index 1d57578..c1bced5 100644 --- a/sway/config +++ b/sway/config @@ -67,9 +67,20 @@ input * { # Start your launcher bindsym $mod+p exec $menu + # 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. From 4c4a5664414f5801508612068b7ae8142362e6a3 Mon Sep 17 00:00:00 2001 From: Jika Date: Sun, 9 Feb 2025 18:40:00 +0100 Subject: [PATCH 6/6] Add rofi config --- install.conf.yaml | 3 + rofi/config.rasi | 182 ++++++++++++++++++++++++++ rofi/launcher | 2 + rofi/launcher.rasi | 311 ++++++++++++++++++++++++++++++++++++++++++++ rofi/onedark.rasi | 16 +++ rofi/powermenu | 111 ++++++++++++++++ rofi/powermenu.rasi | 170 ++++++++++++++++++++++++ sway/config | 7 +- waybar/config | 8 +- 9 files changed, 803 insertions(+), 7 deletions(-) create mode 100644 rofi/config.rasi create mode 100755 rofi/launcher create mode 100644 rofi/launcher.rasi create mode 100644 rofi/onedark.rasi create mode 100755 rofi/powermenu create mode 100644 rofi/powermenu.rasi diff --git a/install.conf.yaml b/install.conf.yaml index f134af3..116e0d5 100644 --- a/install.conf.yaml +++ b/install.conf.yaml @@ -14,6 +14,9 @@ ~/.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 index c1bced5..472068d 100644 --- a/sway/config +++ b/sway/config @@ -23,7 +23,7 @@ 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 +set $menu ~/.config/rofi/launcher ### Output configuration # @@ -42,9 +42,9 @@ set $lock swaylock -f -c 000000 --clock # 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 300 'swaylock -f -c 000000 --clock' \ timeout 600 'swaymsg "output * power off"' resume 'swaymsg "output * power on"' \ - before-sleep 'swaylock -f -c 000000' --clock + before-sleep 'swaylock -f -c 000000 --clock' ### Input configuration @@ -66,6 +66,7 @@ input * { # Start your launcher bindsym $mod+p exec $menu + bindsym $mod+x exec ~/.config/rofi/powermenu # Shortcuts bindsym $mod+w exec firefox diff --git a/waybar/config b/waybar/config index a6bb27c..3747e65 100755 --- a/waybar/config +++ b/waybar/config @@ -187,14 +187,14 @@ }, "custom/power": { "format": "", - "on-click": "wofi-power", - "on-click-right": "killall -9 wofi", + "on-click": "~/.config/rofi/powermenu", + "on-click-right": "killall -9 rofi", "tooltip": false }, "custom/launcher": { "format": "", - "on-click": "wofi --show drun", - "on-click-right": "killall -9 wofi", + "on-click": "~/.config/rofi/launcher", + "on-click-right": "killall -9 rofi", "tooltip": false }, "custom/dunst": {