├── .autostart ├── .config ├── dunst │ └── dunstrc ├── hypr │ ├── hyprland.conf │ └── hyprpaper.conf ├── pipewire │ └── pipewire.conf.d │ │ └── 99-input-denoising.conf ├── rofi │ ├── global │ │ ├── emoji.rasi │ │ ├── history.txt │ │ ├── icons │ │ │ ├── ddg.svg │ │ │ ├── google.svg │ │ │ ├── history.svg │ │ │ ├── result.svg │ │ │ └── suggestion.svg │ │ ├── rofi-spotlight.sh │ │ ├── rofi.rasi │ │ └── web-search.py │ ├── powermenu │ │ └── powermenu.rasi │ └── scripts │ │ ├── emoji │ │ ├── powermenu.sh │ │ ├── screenshot-wl.sh │ │ └── screenshot.sh ├── starship │ └── starship.toml ├── swaylock │ └── config ├── waybar │ ├── config.jsonc │ ├── scripts │ │ └── waybar-wttr.py │ └── style.css ├── wezterm │ ├── colors │ │ ├── rose-pine-dawn.toml │ │ ├── rose-pine-moon.toml │ │ └── rose-pine.toml │ ├── lua │ │ ├── rose-pine-dawn.lua │ │ ├── rose-pine-moon.lua │ │ └── rose-pine.lua │ └── wezterm.lua └── wlogout │ ├── layout │ ├── lock.png │ ├── logout.png │ ├── power.png │ ├── restart.png │ ├── sleep.png │ └── style.css ├── .local └── bin │ └── wrappedhl ├── .profile ├── .scripts ├── colorpicker.sh └── screensht ├── .wallpapers └── linux.jpg ├── LICENSE ├── README.md └── hyprinstall.sh /.autostart: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | sleep 1 3 | killall xdg-desktop-portal-hyprland 4 | killall xdg-desktop-portal-wlr 5 | killall xdg-desktop-portal 6 | /usr/libexec/xdg-desktop-portal-hyprland & 7 | sleep 2 8 | /usr/lib/xdg-desktop-portal & 9 | -------------------------------------------------------------------------------- /.config/dunst/dunstrc: -------------------------------------------------------------------------------- 1 | [global] 2 | follow = mouse 3 | indicate_hidden = yes 4 | 5 | origin = top-center 6 | offset = 15x15 7 | 8 | notification_height = 0 9 | 10 | separator_height = 2 11 | 12 | padding = 8 13 | horizontal_padding = 8 14 | text_icon_padding = 0 15 | frame_width = 2 16 | 17 | frame_color = "#2F3136" 18 | separator_color = frame 19 | 20 | sort = yes 21 | idle_threshold = 120 22 | font = monospace 10 23 | line_height = 0 24 | markup = full 25 | alignment = left 26 | vertical_alignment = center 27 | show_age_threshold = 60 28 | word_wrap = yes 29 | stack_duplicates = true 30 | hide_duplicate_count = false 31 | 32 | show_indicators = yes 33 | 34 | min_icon_size = 0 35 | max_icon_size = 64 36 | 37 | icon_path = /usr/share/icons/Papirus-Dark/16x16/status/:/usr/share/icons/Papirus-Dark/16x16/devices/:/usr/share/icons/Papirus-Dark/16x16/actions/:/usr/share/icons/Papirus-Dark/16x16/animations/:/usr/share/icons/Papirus-Dark/16x16/apps/:/usr/share/icons/Papirus-Dark/16x16/categories/:/usr/share/icons/Papirus-Dark/16x16/emblems/:/usr/share/icons/Papirus-Dark/16x16/emotes/:/usr/share/icons/Papirus-Dark/16x16/devices/mimetypes:/usr/share/icons/Papirus-Dark/16x16/panel/:/usr/share/icons/Papirus-Dark/16x16/places/ 38 | 39 | rofi = /usr/bin/rofi -p dunst: 40 | browser = /usr/bin/firefox --new-tab 41 | 42 | title = Dunst 43 | class = Dunst 44 | 45 | corner_radius = 10 46 | timeout = 5 47 | 48 | [urgency_low] 49 | background = "#2F3136" 50 | foreground = "#ffffffb3" 51 | 52 | [urgency_normal] 53 | background = "#2F3136" 54 | foreground = "#ffffffb3" 55 | 56 | [urgency_critical] 57 | background = "#2F3136" 58 | foreground = "#ffffffb3" 59 | frame_color = "#ffffffb3" 60 | -------------------------------------------------------------------------------- /.config/hypr/hyprland.conf: -------------------------------------------------------------------------------- 1 | # █▀▀ ▀▄▀ █▀▀ █▀▀ 2 | # ██▄ █░█ ██▄ █▄▄ 3 | exec-once = wl-clipboard-history -t 4 | exec-once = ~/.autostart 5 | exec-once = dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP 6 | exec-once = systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP 7 | exec-once=/usr/lib/polkit-kde-authentication-agent-1 8 | exec-once = echo se > /tmp/kb_layout 9 | exec = hyprpaper 10 | exec-once = waybar 11 | 12 | # █▀▄▀█ █▀█ █▄░█ █ ▀█▀ █▀█ █▀█ 13 | # █░▀░█ █▄█ █░▀█ █ ░█░ █▄█ █▀▄ 14 | monitor=,preferred,auto,1 15 | 16 | # █ █▄░█ █▀█ █░█ ▀█▀ 17 | # █ █░▀█ █▀▀ █▄█ ░█░ 18 | input { 19 | kb_layout = se 20 | follow_mouse = 1 21 | sensitivity = 0 # -1.0 - 1.0, 0 means no modification. 22 | } 23 | 24 | # █▀▀ █▀▀ █▄░█ █▀▀ █▀█ ▄▀█ █░░ 25 | # █▄█ ██▄ █░▀█ ██▄ █▀▄ █▀█ █▄▄ 26 | general { 27 | gaps_in=5 28 | gaps_out=5 29 | border_size=5 30 | col.active_border=0xff2F3136 31 | col.inactive_border=0xff2F3136 32 | no_border_on_floating = true 33 | layout = dwindle 34 | } 35 | 36 | # █▀▄▀█ █ █▀ █▀▀ 37 | # █░▀░█ █ ▄█ █▄▄ 38 | misc { 39 | disable_hyprland_logo = true 40 | disable_splash_rendering = true 41 | mouse_move_enables_dpms = true 42 | no_vfr = false 43 | enable_swallow = true 44 | swallow_regex = ^(wezterm)$ 45 | } 46 | 47 | # █▀▄ █▀▀ █▀▀ █▀█ █▀█ ▄▀█ ▀█▀ █ █▀█ █▄░█ 48 | # █▄▀ ██▄ █▄▄ █▄█ █▀▄ █▀█ ░█░ █ █▄█ █░▀█ 49 | 50 | decoration { 51 | # █▀█ █▀█ █░█ █▄░█ █▀▄ █▀▀ █▀█ █▀█ █▄░█ █▀▀ █▀█ 52 | # █▀▄ █▄█ █▄█ █░▀█ █▄▀ █▄▄ █▄█ █▀▄ █░▀█ ██▄ █▀▄ 53 | rounding = 8 54 | multisample_edges = true 55 | 56 | # █▀█ █▀█ ▄▀█ █▀▀ █ ▀█▀ █▄█ 57 | # █▄█ █▀▀ █▀█ █▄▄ █ ░█░ ░█░ 58 | active_opacity = 1.0 59 | inactive_opacity = 0.8 60 | 61 | # █▄▄ █░░ █░█ █▀█ 62 | # █▄█ █▄▄ █▄█ █▀▄ 63 | blur = true 64 | blur_size = 3 65 | blur_passes = 3 66 | blur_new_optimizations = true 67 | 68 | 69 | # █▀ █░█ ▄▀█ █▀▄ █▀█ █░█░█ 70 | # ▄█ █▀█ █▀█ █▄▀ █▄█ ▀▄▀▄▀ 71 | drop_shadow = true 72 | shadow_ignore_window = true 73 | shadow_offset = 2 2 74 | shadow_range = 4 75 | shadow_render_power = 2 76 | col.shadow = 0x66000000 77 | 78 | blurls = gtk-layer-shell 79 | #blurls = waybar 80 | blurls = lockscreen 81 | } 82 | 83 | # ▄▀█ █▄░█ █ █▀▄▀█ ▄▀█ ▀█▀ █ █▀█ █▄░█ 84 | # █▀█ █░▀█ █ █░▀░█ █▀█ ░█░ █ █▄█ █░▀█ 85 | animations { 86 | enabled = true 87 | # █▄▄ █▀▀ ▀█ █ █▀▀ █▀█ █▀▀ █░█ █▀█ █░█ █▀▀ 88 | # █▄█ ██▄ █▄ █ ██▄ █▀▄ █▄▄ █▄█ █▀▄ ▀▄▀ ██▄ 89 | bezier = overshot, 0.05, 0.9, 0.1, 1.05 90 | bezier = smoothOut, 0.36, 0, 0.66, -0.56 91 | bezier = smoothIn, 0.25, 1, 0.5, 1 92 | 93 | animation = windows, 1, 5, overshot, slide 94 | animation = windowsOut, 1, 4, smoothOut, slide 95 | animation = windowsMove, 1, 4, default 96 | animation = border, 1, 10, default 97 | animation = fade, 1, 10, smoothIn 98 | animation = fadeDim, 1, 10, smoothIn 99 | animation = workspaces, 1, 6, default 100 | 101 | } 102 | 103 | # █░░ ▄▀█ █▄█ █▀█ █░█ ▀█▀ █▀ 104 | # █▄▄ █▀█ ░█░ █▄█ █▄█ ░█░ ▄█ 105 | 106 | dwindle { 107 | no_gaps_when_only = false 108 | pseudotile = true # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below 109 | preserve_split = true # you probably want this 110 | } 111 | 112 | # █░█░█ █ █▄░█ █▀▄ █▀█ █░█░█ █▀█ █░█ █░░ █▀▀ █▀ 113 | # ▀▄▀▄▀ █ █░▀█ █▄▀ █▄█ ▀▄▀▄▀ █▀▄ █▄█ █▄▄ ██▄ ▄█ 114 | windowrule = float, file_progress 115 | windowrule = float, confirm 116 | windowrule = float, dialog 117 | windowrule = float, download 118 | windowrule = float, notification 119 | windowrule = float, error 120 | windowrule = float, splash 121 | windowrule = float, confirmreset 122 | windowrule = float, title:Open File 123 | windowrule = float, title:branchdialog 124 | windowrule = float, Lxappearance 125 | windowrule = float, Rofi 126 | windowrule = animation none,Rofi 127 | windowrule = float, viewnior 128 | windowrule = float, Viewnior 129 | windowrule = float, feh 130 | windowrule = float, pavucontrol-qt 131 | windowrule = float, pavucontrol 132 | windowrule = float, file-roller 133 | windowrule = fullscreen, wlogout 134 | windowrule = float, title:wlogout 135 | windowrule = fullscreen, title:wlogout 136 | windowrule = idleinhibit focus, mpv 137 | windowrule = idleinhibit fullscreen, firefox 138 | windowrule = float, title:^(Media viewer)$ 139 | windowrule = float, title:^(Volume Control)$ 140 | windowrule = float, title:^(Picture-in-Picture)$ 141 | windowrule = size 800 600, title:^(Volume Control)$ 142 | windowrule = move 75 44%, title:^(Volume Control)$ 143 | 144 | # █▄▀ █▀▀ █▄█ █▄▄ █ █▄░█ █▀▄ 145 | # █░█ ██▄ ░█░ █▄█ █ █░▀█ █▄▀ 146 | 147 | # ▄▀█ █░█ █▀▄ █ █▀█ 148 | # █▀█ █▄█ █▄▀ █ █▄█ 149 | binde=, XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+ 150 | binde=, XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%- 151 | binde=, XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle 152 | bind=, XF86AudioPlay, exec, playerctl play-pause 153 | bind=, XF86AudioPause, exec, playerctl play-pause 154 | bind=, XF86AudioNext, exec, playerctl next 155 | bind=, XF86AudioPrev, exec, playerctl previous 156 | 157 | # █▀ █▀▀ █▀█ █▀▀ █▀▀ █▄░█ █▀ █░█ █▀█ ▀█▀ 158 | # ▄█ █▄▄ █▀▄ ██▄ ██▄ █░▀█ ▄█ █▀█ █▄█ ░█░ 159 | bind = SUPERSHIFT, S, exec, ~/.scripts/screensht full 160 | bind = SUPERSHIFT, S, exec, ~/.scripts/screensht area 161 | 162 | # █▀▄▀█ █ █▀ █▀▀ 163 | # █░▀░█ █ ▄█ █▄▄ 164 | bind = SUPERSHIFT, X, exec, ~/.scripts/colorpicker.sh 165 | bind = SUPER, L, exec, swaylock 166 | bind = SUPER, T, exec, wezterm 167 | bind = SUPER, E, exec, thunar 168 | bind = SUPER, W, exec, firefox 169 | bind = SUPER, M, exec, spotify 170 | bindr = SUPER, SUPER_L, exec, killall rofi || rofi -show drun -theme ~/.config/rofi/global/rofi.rasi 171 | bind = SUPER, period, exec, killall rofi || rofi -show emoji -emoji-format "{emoji}" -modi emoji -theme ~/.config/rofi/global/emoji 172 | bind = SUPER, X, exec, wlogout --protocol layer-shell -b 5 -T 400 -B 400 173 | 174 | # █░█░█ █ █▄░█ █▀▄ █▀█ █░█░█ █▀▄▀█ ▄▀█ █▄░█ ▄▀█ █▀▀ █▀▄▀█ █▀▀ █▄░█ ▀█▀ 175 | # ▀▄▀▄▀ █ █░▀█ █▄▀ █▄█ ▀▄▀▄▀ █░▀░█ █▀█ █░▀█ █▀█ █▄█ █░▀░█ ██▄ █░▀█ ░█░ 176 | bind = SUPER, Q, killactive, 177 | bind = SUPER SHIFT, Q, exit, 178 | bind = SUPER, F, fullscreen, 179 | bind = SUPER, Space, togglefloating, 180 | bind = SUPER, P, pseudo, # dwindle 181 | bind = SUPER, S, togglesplit, # dwindle 182 | 183 | # █▀▀ █▀█ █▀▀ █░█ █▀ 184 | # █▀░ █▄█ █▄▄ █▄█ ▄█ 185 | bind = SUPER, left, movefocus, l 186 | bind = SUPER, right, movefocus, r 187 | bind = SUPER, up, movefocus, u 188 | bind = SUPER, down, movefocus, d 189 | 190 | #Vim bindings 191 | bind = SUPER, H, movefocus, l 192 | bind = SUPER, L, movefocus, r 193 | bind = SUPER, K, movefocus, u 194 | bind = SUPER, J, movefocus, d 195 | 196 | # █▀▄▀█ █▀█ █░█ █▀▀ 197 | # █░▀░█ █▄█ ▀▄▀ ██▄ 198 | bind = SUPER SHIFT, left, movewindow, l 199 | bind = SUPER SHIFT, right, movewindow, r 200 | bind = SUPER SHIFT, up, movewindow, u 201 | bind = SUPER SHIFT, down, movewindow, d 202 | 203 | #Vim bindings 204 | bind = SUPER SHIFT, H, movewindow, l 205 | bind = SUPER SHIFT, L, movewindow, r 206 | bind = SUPER SHIFT, K, movewindow, u 207 | bind = SUPER SHIFT, J, movewindow, d 208 | 209 | # █▀█ █▀▀ █▀ █ ▀█ █▀▀ 210 | # █▀▄ ██▄ ▄█ █ █▄ ██▄ 211 | bind = SUPER CTRL, left, resizeactive, -20 0 212 | bind = SUPER CTRL, right, resizeactive, 20 0 213 | bind = SUPER CTRL, up, resizeactive, 0 -20 214 | bind = SUPER CTRL, down, resizeactive, 0 20 215 | 216 | # ▀█▀ ▄▀█ █▄▄ █▄▄ █▀▀ █▀▄ 217 | # ░█░ █▀█ █▄█ █▄█ ██▄ █▄▀ 218 | bind= SUPER, g, togglegroup 219 | bind= SUPER, tab, changegroupactive 220 | 221 | # █▀ █▀█ █▀▀ █▀▀ █ ▄▀█ █░░ 222 | # ▄█ █▀▀ ██▄ █▄▄ █ █▀█ █▄▄ 223 | bind = SUPER, c, togglespecialworkspace 224 | bind = SUPERSHIFT, c, movetoworkspace, special 225 | 226 | # █▀ █░█░█ █ ▀█▀ █▀▀ █░█ 227 | # ▄█ ▀▄▀▄▀ █ ░█░ █▄▄ █▀█ 228 | bind = SUPER, 1, workspace, 1 229 | bind = SUPER, 2, workspace, 2 230 | bind = SUPER, 3, workspace, 3 231 | bind = SUPER, 4, workspace, 4 232 | bind = SUPER, 5, workspace, 5 233 | bind = SUPER, 6, workspace, 6 234 | bind = SUPER, 7, workspace, 7 235 | bind = SUPER, 8, workspace, 8 236 | bind = SUPER, 9, workspace, 9 237 | bind = SUPER, 0, workspace, 10 238 | bind = SUPER ALT, up, workspace, e+1 239 | bind = SUPER ALT, down, workspace, e-1 240 | 241 | # █▀▄▀█ █▀█ █░█ █▀▀ 242 | # █░▀░█ █▄█ ▀▄▀ ██▄ 243 | bind = SUPER SHIFT, 1, movetoworkspace, 1 244 | bind = SUPER SHIFT, 2, movetoworkspace, 2 245 | bind = SUPER SHIFT, 3, movetoworkspace, 3 246 | bind = SUPER SHIFT, 4, movetoworkspace, 4 247 | bind = SUPER SHIFT, 5, movetoworkspace, 5 248 | bind = SUPER SHIFT, 6, movetoworkspace, 6 249 | bind = SUPER SHIFT, 7, movetoworkspace, 7 250 | bind = SUPER SHIFT, 8, movetoworkspace, 8 251 | bind = SUPER SHIFT, 9, movetoworkspace, 9 252 | bind = SUPER SHIFT, 0, movetoworkspace, 10 253 | 254 | # █▀▄▀█ █▀█ █░█ █▀ █▀▀ █▄▄ █ █▄░█ █▀▄ █ █▄░█ █▀▀ 255 | # █░▀░█ █▄█ █▄█ ▄█ ██▄ █▄█ █ █░▀█ █▄▀ █ █░▀█ █▄█ 256 | bindm = SUPER, mouse:272, movewindow 257 | bindm = SUPER, mouse:273, resizewindow 258 | bind = SUPER, mouse_down, workspace, e+1 259 | bind = SUPER, mouse_up, workspace, e-1 260 | -------------------------------------------------------------------------------- /.config/hypr/hyprpaper.conf: -------------------------------------------------------------------------------- 1 | preload = ~/.wallpapers/linux.jpg 2 | wallpaper = ,~/.wallpapers/linux.jpg 3 | -------------------------------------------------------------------------------- /.config/pipewire/pipewire.conf.d/99-input-denoising.conf: -------------------------------------------------------------------------------- 1 | context.modules = [ 2 | { name = libpipewire-module-filter-chain 3 | args = { 4 | node.description = "Noise Canceling source" 5 | media.name = "Noise Canceling source" 6 | filter.graph = { 7 | nodes = [ 8 | { 9 | type = ladspa 10 | name = rnnoise 11 | plugin = /lib/ladspa/librnnoise_ladspa.so 12 | label = noise_suppressor_mono 13 | control = { 14 | "VAD Threshold (%)" = 90.0 15 | "VAD Grace Period (ms)" = 150 16 | "Retroactive VAD Grace (ms)" = 0 17 | } 18 | } 19 | ] 20 | } 21 | capture.props = { 22 | node.name = "capture.rnnoise_source" 23 | node.passive = true 24 | audio.rate = 48000 25 | } 26 | playback.props = { 27 | node.name = "rnnoise_source" 28 | media.class = Audio/Source 29 | audio.rate = 48000 30 | } 31 | } 32 | } 33 | ] 34 | -------------------------------------------------------------------------------- /.config/rofi/global/emoji.rasi: -------------------------------------------------------------------------------- 1 | configuration { 2 | show-icons: false; 3 | me-select-entry: ""; 4 | me-accept-entry: "MousePrimary"; 5 | } 6 | 7 | * { 8 | transparent: #00000000; 9 | foreground: #F2F2F2EE; 10 | background-selected: #F2F2F245; 11 | background-active: #F2F2F230; 12 | background-white: #F2F2F211; 13 | background-black: #00000000; 14 | urgent: #E91E6366; 15 | urgent-selected: #E91E6377; 16 | } 17 | 18 | window { 19 | transparency: "real"; 20 | background-color: #2F3136; 21 | text-color: #ffffffb3; 22 | location: center; 23 | anchor: center; 24 | height: 44%; 25 | width: 35%; 26 | orientation: vertical; 27 | } 28 | 29 | prompt { 30 | enabled: false; 31 | } 32 | 33 | button { 34 | action: "ok"; 35 | str: " "; 36 | font: "FantasqueSansMono Nerd Font 16"; 37 | expand: false; 38 | text-color: #ffffffb3; 39 | background-color: @transparent; 40 | vertical-align: 0.5; 41 | horizontal-align: 0.5; 42 | } 43 | 44 | entry { 45 | font: "Inter Regular 12"; 46 | background-color: @transparent; 47 | text-color: #ffffffb3; 48 | expand: true; 49 | vertical-align: 0.8; 50 | horizontal-align: 0; 51 | placeholder: ""; 52 | placeholder-color: #ffffffb3; 53 | blink: true; 54 | } 55 | 56 | entry-wrapper { 57 | orientation: horizontal; 58 | margin: 0px 12px 0px 12px; 59 | spacing: 24px; 60 | vertical-align: 0.5; 61 | background-color: @transparent; 62 | children: [ button, entry ]; 63 | } 64 | 65 | inputbar { 66 | padding: 14px; 67 | margin: 10px 10px 14px 10px; 68 | background-color: #202225; 69 | text-color: @foreground; 70 | expand: false; 71 | border-radius: 9px; 72 | position: north; 73 | children: [ entry-wrapper ]; 74 | } 75 | 76 | 77 | listview { 78 | background-color: @transparent; 79 | spacing: 0px; 80 | cycle: true; 81 | columns: 5; 82 | dynamic: true; 83 | scrollbar: true; 84 | } 85 | 86 | mainbox { 87 | width: 200px; 88 | expand: true; 89 | spacing: 12px; 90 | padding: 5px; 91 | background-color: @background-black; 92 | children: [ inputbar, listview ]; 93 | } 94 | 95 | scrollbar { 96 | background-color: @transparent; 97 | handle-width: 0; 98 | margin: 0 0 5px 0; 99 | border-radius: 9px; 100 | } 101 | 102 | element { 103 | background-color: @transparent; 104 | text-color: @foreground; 105 | orientation: vertical; 106 | border: 0px; 107 | border-color: @background-white; 108 | border-radius: 6px; 109 | spacing: 24px; 110 | margin: 0px 12px 0px 12px; 111 | padding: 10px 24px 10px 24px; 112 | } 113 | 114 | element-icon { 115 | size: 24px; 116 | border: 0px; 117 | border-color: @transparent; 118 | background-color: @transparent; 119 | } 120 | 121 | element-text { 122 | font: "Noto Color Emoji 27"; 123 | expand: true; 124 | horizontal-align: 0.5; 125 | vertical-align: 0.5; 126 | color: #ffffffb3; 127 | background-color: @transparent; 128 | } 129 | 130 | element normal.urgent, 131 | element alternate.urgent { 132 | background-color: @urgent; 133 | text-color: @foreground; 134 | border-radius: 9px; 135 | } 136 | 137 | element normal.active, 138 | element alternate.active { 139 | background-color: @background-active; 140 | text-color: @foreground; 141 | } 142 | 143 | element selected { 144 | background-color: #42464D; 145 | text-color: @foreground; 146 | } 147 | 148 | element selected.urgent { 149 | background-color: @urgent-selected; 150 | text-color: @foreground; 151 | } 152 | 153 | element selected.active { 154 | background-color: #403d5220; 155 | color: @foreground-selected; 156 | } 157 | -------------------------------------------------------------------------------- /.config/rofi/global/history.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mainmast-git/hyprinstall/b3f0ed6428b93d25b0225dd23638b91f438bb5d0/.config/rofi/global/history.txt -------------------------------------------------------------------------------- /.config/rofi/global/icons/ddg.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 20 | 22 | 23 | 25 | image/svg+xml 26 | 28 | 29 | 30 | 31 | 32 | 34 | 55 | 615 | 616 | -------------------------------------------------------------------------------- /.config/rofi/global/icons/google.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 20 | 22 | 23 | 25 | image/svg+xml 26 | 28 | 29 | 30 | 31 | 32 | 34 | 55 | 365 | 366 | -------------------------------------------------------------------------------- /.config/rofi/global/icons/history.svg: -------------------------------------------------------------------------------- 1 | 2 | 19 | 21 | 22 | 24 | image/svg+xml 25 | 27 | 28 | 29 | 30 | 31 | 33 | 54 | 58 | 66 | 74 | 75 | 76 | -------------------------------------------------------------------------------- /.config/rofi/global/icons/result.svg: -------------------------------------------------------------------------------- 1 | 2 | 17 | 19 | 20 | 22 | image/svg+xml 23 | 25 | 26 | 27 | 28 | 29 | 31 | 52 | 57 | 58 | -------------------------------------------------------------------------------- /.config/rofi/global/icons/suggestion.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.config/rofi/global/rofi-spotlight.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | TMP_DIR="/tmp/rofi/${USER}/" 4 | 5 | PREV_LOC_FILE="${TMP_DIR}rofi_fb_prevloc" 6 | CURRENT_FILE="${TMP_DIR}rofi_fb_current_file" 7 | 8 | MY_PATH="$(realpath "$0" | xargs dirname)" 9 | HIST_FILE="${MY_PATH}/history.txt" 10 | 11 | OPENER=xdg-open 12 | TERM_EMU=wezterm 13 | TEXT_EDITOR=$EDITOR 14 | FILE_MANAGER=xdg-open 15 | BLUETOOTH_SEND=blueman-sendto 16 | 17 | CUR_DIR=$PWD 18 | NEXT_DIR="" 19 | FD_INSTALLED=$(command -v fd) 20 | 21 | SHOW_HIDDEN=false 22 | 23 | # Setup menu options 24 | declare -a OPEN_FILE_LOCATION=( 25 | "Open file location in ${TERM_EMU}" 26 | "Open file location in ${FILE_MANAGER}" 27 | ) 28 | declare -a RUN_COMMANDS=( 29 | "Run" 30 | "Execute in ${TERM_EMU}" 31 | ) 32 | declare -a STANDARD_CONTROLS=( 33 | "Move to trash" 34 | "Delete" 35 | "Back" 36 | ) 37 | declare -a SHELL_NO_X_OPTIONS=( 38 | "Edit" 39 | "${OPEN_FILE_LOCATION[@]}" 40 | "${STANDARD_CONTROLS[@]}" 41 | ) 42 | declare -a SHELL_OPTIONS=( 43 | "${RUN_COMMANDS[@]}" 44 | "${SHELL_NO_X_OPTIONS[@]}" 45 | ) 46 | declare -a BIN_NO_X_OPTIONS=( 47 | "${OPEN_FILE_LOCATION[@]}" 48 | "Back" 49 | ) 50 | declare -a BIN_OPTIONS=( 51 | "${RUN_COMMANDS[@]}" 52 | "${BIN_NO_X_OPTIONS[@]}" 53 | ) 54 | declare -a TEXT_OPTIONS=("${SHELL_NO_X_OPTIONS[@]}") 55 | declare -a HTML_OPTIONS=( 56 | "Open" 57 | "Edit" 58 | "${OPEN_FILE_LOCATION[@]}" 59 | "${STANDARD_CONTROLS[@]}" 60 | ) 61 | declare -a XCF_SVG_OPTIONS=( 62 | "Open" 63 | "${OPEN_FILE_LOCATION[@]}" 64 | "${STANDARD_CONTROLS[@]}" 65 | ) 66 | declare -a IMAGE_OPTIONS=( 67 | "Open" 68 | "Send via Bluetooth" 69 | "${OPEN_FILE_LOCATION[@]}" 70 | "${STANDARD_CONTROLS[@]}" 71 | ) 72 | 73 | declare -a ALL_OPTIONS=() 74 | 75 | # Combine all context menu 76 | COMBINED_OPTIONS=( 77 | "${SHELL_OPTIONS[@]}" 78 | "${IMAGE_OPTIONS[@]}" 79 | ) 80 | 81 | # Remove duplicates 82 | ALL_OPTIONS=("$(printf '%s\n' "${COMBINED_OPTIONS[@]}" | sort -u)") 83 | 84 | # Create tmp dir for rofi 85 | [ ! -d "${TMP_DIR}" ] && mkdir -p "${TMP_DIR}"; 86 | 87 | # Create hist file if it doesn't exist 88 | [ ! -f "${HIST_FILE}" ] && touch "${HIST_FILE}" 89 | 90 | # Help message 91 | if [ -n "$*" ] && [[ "$*" = ":help" ]] 92 | then 93 | echo -en "Rofi Spotlight 94 | A Rofi with file and web searching functionality 95 | 96 | Commands: 97 | :help to print this help message 98 | :h or :hidden to show hidden files/dirs 99 | :sh or :show_hist to show search history 100 | :ch or :clear_hist to clear search history 101 | :xdg to jump to an xdg directory 102 | Examples: 103 | :xdg DOCUMENTS 104 | :xdg DOWNLOADS 105 | Also supports incomplete path: 106 | Examples: 107 | :xdg doc 108 | :xdg down 109 | For more info about XDG dirs, see: 110 | \`man xdg-user-dir\` 111 | 112 | File search syntaxes: 113 | ! to search for a file and web suggestions 114 | ? to search parent directories 115 | Examples: 116 | !half-life 3 117 | ?portal 3 118 | 119 | Web search syntaxes: 120 | ! to gets search suggestions 121 | :web/:w to also to gets search suggestions 122 | :webbro/:wb to search directly from your browser 123 | Examples: 124 | !how to install archlinux 125 | :web how to install gentoo 126 | :w how to make a nuclear fission 127 | :webbro how to install wine in windowsxp 128 | Back\0icon\x1fdraw-arrow-back\n" 129 | 130 | exit 131 | fi 132 | 133 | # Return the icon string 134 | function icon_file_type(){ 135 | icon_name="" 136 | mime_type=$(file --mime-type -b "${1}") 137 | 138 | case "${mime_type}" in 139 | "inode/directory") 140 | case "${1}" in 141 | "Desktop/" ) 142 | icon_name='folder-blue-desktop' 143 | ;; 144 | "Documents/" ) 145 | icon_name='folder-blue-documents' 146 | ;; 147 | "Downloads/" ) 148 | icon_name='folder-blue-downloads' 149 | ;; 150 | "Music/" ) 151 | icon_name='folder-blue-music' 152 | ;; 153 | "Pictures/" ) 154 | icon_name='folder-blue-pictures' 155 | ;; 156 | "Public/" ) 157 | icon_name='folder-blue-public' 158 | ;; 159 | "Templates/" ) 160 | icon_name='folder-blue-templates' 161 | ;; 162 | "Videos/" ) 163 | icon_name='folder-blue-videos' 164 | ;; 165 | "root/" ) 166 | icon_name='folder-root' 167 | ;; 168 | "home/" | "${USER}/") 169 | icon_name='folder-home' 170 | ;; 171 | *"$" ) 172 | icon_name='folder-blue' 173 | ;; 174 | *) 175 | icon_name='folder-blue' 176 | ;; 177 | esac 178 | ;; 179 | "inode/symlink" ) 180 | icon_name='inode-symlink' 181 | ;; 182 | "audio/flac" | "audio/mpeg" ) 183 | icon_name='music' 184 | ;; 185 | "video/mp4" ) 186 | icon_name='video-mp4' 187 | ;; 188 | "video/x-matroska" ) 189 | icon_name=video-x-matroska 190 | ;; 191 | "image/x-xcf" ) 192 | # notify-send '123' 193 | icon_name='image-x-xcf' 194 | ;; 195 | "image/jpeg" | "image/png" | "image/svg+xml") 196 | icon_name="${CUR_DIR}/${1}" 197 | ;; 198 | "image/gif" ) 199 | icon_name='gif' 200 | ;; 201 | "image/vnd.adobe.photoshop" ) 202 | icon_name='image-vnd.adobe.photoshop' 203 | ;; 204 | "image/webp" ) 205 | icon_name='gif' 206 | ;; 207 | "application/x-pie-executable" ) 208 | icon_name='binary' 209 | ;; 210 | "application/pdf" ) 211 | icon_name='pdf' 212 | ;; 213 | "application/zip" ) 214 | icon_name='application-zip' 215 | ;; 216 | "application/x-xz" ) 217 | icon_name='application-x-xz-compressed-tar' 218 | ;; 219 | "application/x-7z-compressed" ) 220 | icon_name='application-x-7zip' 221 | ;; 222 | "application/x-rar" ) 223 | icon_name='application-x-rar' 224 | ;; 225 | "application/octet-stream" | "application/x-iso9660-image" ) 226 | icon_name='application-x-iso' 227 | ;; 228 | "application/x-dosexec" ) 229 | icon_name='application-x-ms-dos-executable' 230 | ;; 231 | "text/plain" ) 232 | icon_name='application-text' 233 | ;; 234 | "text/x-shellscript" ) 235 | icon_name='application-x-shellscript' 236 | ;; 237 | "text/html" ) 238 | icon_name='text-html' 239 | ;; 240 | "font/sfnt" | "application/vnd.ms-opentype" ) 241 | icon_name='application-x-font-ttf' 242 | ;; 243 | * ) 244 | case "${1}" in 245 | *."docx" | *".doc" ) 246 | icon_name='application-msword' 247 | ;; 248 | *."apk" ) 249 | icon_name='android-package-archive' 250 | ;; 251 | * ) 252 | icon_name='unknown' 253 | ;; 254 | esac 255 | ;; 256 | esac 257 | 258 | echo -en "$1\0icon\x1f$icon_name\n" 259 | } 260 | 261 | export -f icon_file_type 262 | 263 | # Pass the argument to python script 264 | function web_search() { 265 | # Pass the search query to web-search script 266 | "${MY_PATH}/web-search.py" "${1}" 267 | exit; 268 | } 269 | 270 | # Handles the web search method 271 | if [ ! -z "$@" ] && ([[ "$@" == ":webbro"* ]] || [[ "$@" == ":wb"* ]]) 272 | then 273 | remove='' 274 | [[ "$*" = ":webbro"* ]] && remove=":webbro" || remove=":wb" 275 | 276 | # Search directly from your web browser 277 | web_search "$(printf '%s\n' "${1//$remove/}")" 278 | exit; 279 | 280 | elif [ ! -z "$@" ] && ([[ "$@" == ":web"* ]] || [[ "$@" == ":w"* ]]) 281 | then 282 | remove='' 283 | [[ "$*" = ":web"* ]] && remove=":web" || remove=":w" 284 | 285 | # Get search suggestions 286 | web_search "!$(printf '%s\n' "${1//$remove/}")" 287 | exit; 288 | fi 289 | 290 | function find_query() { 291 | QUERY=${1} 292 | if [[ ! "${QUERY}" =~ ( |\') ]] 293 | then 294 | if [ -z "$FD_INSTALLED" ]; 295 | then 296 | find "${HOME}" -iname *"${QUERY}"* | sed "s/\/home\/$USER/\~/" | 297 | awk -v MY_PATH="${MY_PATH}" '{print $0"\0icon\x1f"MY_PATH"/icons/result.svg\n"}' 298 | else 299 | fd -H ${QUERY} ${HOME} | sed "s/\/home\/$USER/\~/" | 300 | awk -v MY_PATH="${MY_PATH}" '{print $0"\0icon\x1f"MY_PATH"/icons/result.svg\n"}' 301 | fi 302 | fi 303 | } 304 | 305 | # File and calls to the web search 306 | if [ ! -z "$@" ] && ([[ "$@" == ?(\~)/* ]] || [[ "$@" == \?* ]] || [[ "$@" == \!* ]]) 307 | then 308 | QUERY=$@ 309 | 310 | echo "${QUERY}" >> "${HIST_FILE}" 311 | 312 | if [[ "$@" == ?(\~)/* ]] 313 | then 314 | [[ "$*" = \~* ]] && QUERY="${QUERY//"~"/"$HOME"}" 315 | 316 | coproc ${OPENER} "${QUERY}" > /dev/null 2>&1 317 | exec 1>&- 318 | exit 319 | 320 | elif [[ "$@" == \?* ]] 321 | then 322 | find_query ${QUERY#\?} 323 | 324 | else 325 | # Find the file 326 | find_query ${QUERY#!} 327 | 328 | # Web search 329 | web_search "! ${QUERY#!}" 330 | fi 331 | exit; 332 | fi 333 | 334 | # Create notification if there's an error 335 | function create_notification() { 336 | case "${1}" in 337 | "denied" ) 338 | notify-send -a "Global Search" "Permission denied!" \ 339 | 'You have no permission to access '"${CUR_DIR}!" 340 | ;; 341 | "deleted" ) 342 | notify-send -a "Global Search" "Success!" \ 343 | 'File deleted!' 344 | ;; 345 | "trashed" ) 346 | notify-send -a "Global Search" "Success!" \ 347 | 'The file has been moved to trash!' 348 | ;; 349 | "cleared" ) 350 | notify-send -a "Global Search" "Success!" \ 351 | 'Search history has been successfully cleared!' 352 | ;; 353 | * ) 354 | notify-send -a "Global Search" "Somethings wrong I can feel it!" \ 355 | 'This incident will be reported!' 356 | ;; 357 | esac 358 | } 359 | 360 | # Show the files in the current directory 361 | function navigate_to() { 362 | # process current dir. 363 | if [ -n "${CUR_DIR}" ] 364 | then 365 | CUR_DIR=$(readlink -e "${CUR_DIR}") 366 | if [ ! -d "${CUR_DIR}" ] || [ ! -r "${CUR_DIR}" ] 367 | then 368 | create_notification "denied" 369 | CUR_DIR=$(realpath ${CUR_DIR} | xargs dirname) 370 | echo "${CUR_DIR}" > "${PREV_LOC_FILE}" 371 | else 372 | echo "${CUR_DIR}/" > "${PREV_LOC_FILE}" 373 | fi 374 | pushd "${CUR_DIR}" >/dev/null || exit 375 | fi 376 | 377 | printf "..\0icon\x1fup\n" 378 | 379 | if [[ -z "$FD_INSTALLED" ]] 380 | then 381 | #Group directories 382 | if [[ ${SHOW_HIDDEN} == true ]] 383 | then 384 | for i in .*/ 385 | do 386 | [[ -d "${i}" ]] && ([[ "${i}" != "./" ]] && [[ "${i}" != "../"* ]]) && icon_file_type "${i}" 387 | done 388 | fi 389 | for i in */ 390 | do 391 | [[ -d "${i}" ]] && icon_file_type "${i}" 392 | done 393 | #Group files 394 | if [[ ${SHOW_HIDDEN} = true ]] 395 | then 396 | for i in .* 397 | do 398 | [[ -f "${i}" ]] && icon_file_type "${i}" 399 | done 400 | fi 401 | for i in * 402 | do 403 | [[ -f "${i}" ]] && icon_file_type "${i}" 404 | done 405 | else 406 | THREADS=$(getconf _NPROCESSORS_ONLN) 407 | export CUR_DIR 408 | if [[ ${SHOW_HIDDEN} == true ]] 409 | then 410 | fd -Ht d -d 1 -x bash -c 'icon_file_type "$1/"' _ {} \ | sort -V --parallel=$THREADS 411 | fd -Ht f -d 1 -x bash -c 'icon_file_type "$1"' _ {} \ | sort -V --parallel=$THREADS 412 | else 413 | fd -t d -d 1 -x bash -c 'icon_file_type "$1/"' _ {} \ | sort -V --parallel=$THREADS 414 | fd -t f -d 1 -x bash -c 'icon_file_type "$1"' _ {} \ | sort -V --parallel=$THREADS 415 | fi 416 | fi 417 | } 418 | 419 | # Set XDG dir 420 | function return_xdg_dir() { 421 | target_dir=${1^^} 422 | 423 | if [[ "HOME" == *"${target_dir}"* ]] 424 | then 425 | CUR_DIR=$(xdg-user-dir) 426 | 427 | elif [[ "DESKTOP" == *"${target_dir}"* ]] 428 | then 429 | CUR_DIR=$(xdg-user-dir DESKTOP) 430 | 431 | elif [[ "DOCUMENTS" == *"${target_dir}"* ]] 432 | then 433 | CUR_DIR=$(xdg-user-dir DOCUMENTS) 434 | 435 | elif [[ "DOWNLOADS" == *"${target_dir}"* ]] 436 | then 437 | CUR_DIR=$(xdg-user-dir DOWNLOAD) 438 | 439 | elif [[ "MUSIC" == *"${target_dir}"* ]] 440 | then 441 | CUR_DIR=$(xdg-user-dir MUSIC) 442 | 443 | elif [[ "PICTURES" == *"${target_dir}"* ]] 444 | then 445 | CUR_DIR=$(xdg-user-dir PICTURES) 446 | 447 | elif [[ "PUBLICSHARE" == *"${target_dir}"* ]] 448 | then 449 | CUR_DIR=$(xdg-user-dir PUBLICSHARE) 450 | 451 | elif [[ "TEMPLATES" == *"${target_dir}"* ]] 452 | then 453 | CUR_DIR=$(xdg-user-dir TEMPLATES) 454 | 455 | elif [[ "VIDEOS" == *"${target_dir}"* ]] 456 | then 457 | CUR_DIR=$(xdg-user-dir VIDEOS) 458 | 459 | elif [[ "ROOT" == *"${target_dir}"* ]] 460 | then 461 | CUR_DIR="/" 462 | 463 | else 464 | CUR_DIR="${HOME}" 465 | fi 466 | navigate_to 467 | exit; 468 | } 469 | 470 | # Show and Clear History 471 | if [ ! -z "$@" ] && ([[ "$@" == ":sh" ]] || [[ "$@" == ":show_hist" ]]) 472 | then 473 | hist=$(tac "${HIST_FILE}") 474 | 475 | echo -en "Back\0icon\x1fdraw-arrow-back\n" 476 | [ -z "${hist}" ] && echo -en "No History Yet\0icon\x1ftext-plain\n" 477 | 478 | while IFS= read -r line; 479 | do 480 | echo -en "${line}\0icon\x1f${MY_PATH}/icons/history.svg\n"; 481 | done <<< "${hist}" 482 | 483 | exit; 484 | elif [ ! -z "$@" ] && ([[ "$@" == ":ch" ]] || [[ "$@" == ":clear_hist" ]]) 485 | then 486 | :> "${HIST_FILE}" 487 | create_notification "cleared" 488 | 489 | CUR_DIR="${HOME}" 490 | navigate_to 491 | exit; 492 | fi 493 | 494 | # Accepts XDG command 495 | if [[ ! -z "$@" ]] && [[ "$@" == ":xdg"* ]] 496 | then 497 | NEXT_DIR=${*//":xdg "/} 498 | 499 | [[ -n "$NEXT_DIR" ]] && return_xdg_dir "${NEXT_DIR}" || return_xdg_dir "${HOME}" 500 | fi 501 | 502 | # Read last location, otherwise we default to PWD. 503 | [ -f "${PREV_LOC_FILE}" ] && CUR_DIR=$(< "${PREV_LOC_FILE}") 504 | 505 | if [[ ! -z "$@" ]] && ([[ "$@" == ":h" ]] || [[ "$@" == ":hidden" ]]) 506 | then 507 | SHOW_HIDDEN=true 508 | navigate_to 509 | exit; 510 | fi 511 | 512 | # Handle argument. 513 | [ -n "$*" ] && CUR_DIR="${CUR_DIR}/$*" 514 | 515 | # Context Menu 516 | if [ -n "$*" ] && [[ "${ALL_OPTIONS[*]} " = *"$*"* ]] 517 | then 518 | case "${1}" in 519 | "Run" ) 520 | coproc ( eval "$(< ${CURRENT_FILE})" & > /dev/null 2>&1 ) 521 | kill -9 $(pgrep rofi) 522 | ;; 523 | "Execute in ${TERM_EMU}" ) 524 | coproc ( eval "${TERM_EMU} \"$(< ${CURRENT_FILE})\"" & > /dev/null 2>&1 ) 525 | kill -9 $(pgrep rofi) 526 | ;; 527 | "Open" ) 528 | coproc ( eval "${OPENER} \"$(< ${CURRENT_FILE})\"" & > /dev/null 2>&1 ) 529 | kill -9 $(pgrep rofi) 530 | ;; 531 | "Open file location in ${TERM_EMU}" ) 532 | file_path="$(< ${CURRENT_FILE})" 533 | coproc ( ${TERM_EMU} bash -c "cd ${file_path%/*} ; ${SHELL}" & > /dev/null 2>&1 ) 534 | kill -9 $(pgrep rofi) 535 | ;; 536 | "Open file location in ${FILE_MANAGER}" ) 537 | file_path="$(< "${CURRENT_FILE}")" 538 | coproc ( eval "${FILE_MANAGER} "${file_path%/*}"" & > /dev/null 2>&1 ) 539 | kill -9 $(pgrep rofi) 540 | ;; 541 | "Edit" ) 542 | coproc ( eval "${TERM_EMU} ${TEXT_EDITOR} \"$(< ${CURRENT_FILE})\"" & > /dev/null 2>&1 ) 543 | kill -9 $(pgrep rofi) 544 | ;; 545 | "Move to trash" ) 546 | coproc( gio trash "$(< ${CURRENT_FILE})" & > /dev/null 2>&1 ) 547 | create_notification "trashed" 548 | CUR_DIR="$(dirname "$(< ${CURRENT_FILE})")" 549 | navigate_to 550 | ;; 551 | "Delete" ) 552 | shred "$(< ${CURRENT_FILE})" 553 | rm "$(< ${CURRENT_FILE})" 554 | create_notification "deleted" 555 | CUR_DIR="$(dirname "$(< ${CURRENT_FILE})")" 556 | navigate_to 557 | ;; 558 | "Send via Bluetooth" ) 559 | rfkill unblock bluetooth && bluetoothctl power on 560 | sleep 1 561 | blueman-sendto "$(< ${CURRENT_FILE})" & > /dev/null 2>&1 562 | kill -9 $(pgrep rofi) 563 | ;; 564 | "Back" ) 565 | CUR_DIR="$(< ${PREV_LOC_FILE})" 566 | navigate_to 567 | ;; 568 | esac 569 | exit; 570 | fi 571 | 572 | function context_menu_icons() { 573 | 574 | if [[ "${1}" == "Run" ]] 575 | then 576 | echo '\0icon\x1fsystem-run\n' 577 | 578 | elif [[ "${1}" == "Execute in ${TERM_EMU}" ]] 579 | then 580 | echo "\0icon\x1f${TERM_EMU}\n" 581 | 582 | elif [[ "${1}" == "Open" ]] 583 | then 584 | echo "\0icon\x1futilities-x-terminal\n" 585 | 586 | elif [[ "${1}" == "Open file location in ${TERM_EMU}" ]] 587 | then 588 | echo "\0icon\x1f${TERM_EMU}\n" 589 | 590 | elif [[ "${1}" == "Open file location in ${FILE_MANAGER}" ]] 591 | then 592 | echo "\0icon\x1fblue-folder-open\n" 593 | 594 | elif [[ "${1}" == "Edit" ]] 595 | then 596 | echo "\0icon\x1faccessories-text-editor\n" 597 | 598 | elif [[ "${1}" == "Move to trash" ]] 599 | then 600 | echo "\0icon\x1fapplication-x-trash\n" 601 | 602 | elif [[ "${1}" == "Delete" ]] 603 | then 604 | echo "\0icon\x1findicator-trashindicator\n" 605 | 606 | elif [[ "${1}" == "Send via Bluetooth" ]] 607 | then 608 | echo "\0icon\x1fbluetooth\n" 609 | 610 | elif [[ "${1}" == "Back" ]] 611 | then 612 | echo "\0icon\x1fback\n" 613 | fi 614 | } 615 | 616 | function print_context_menu() { 617 | declare -a arg_arr=("${!1}") 618 | 619 | for menu in "${arg_arr[@]}" 620 | do 621 | printf "$menu$(context_menu_icons "${menu}")\n" 622 | done 623 | } 624 | 625 | function context_menu() { 626 | 627 | type="$(file --mime-type -b "${CUR_DIR}")" 628 | 629 | if [ -w "${CUR_DIR}" ] && [[ "${type}" == "text/x-shellscript" ]] 630 | then 631 | if [ -x "${CUR_DIR}" ]; 632 | then 633 | print_context_menu SHELL_OPTIONS[@] 634 | else 635 | print_context_menu SHELL_NO_X_OPTIONS[@] 636 | fi 637 | 638 | elif [[ "${type}" == "application/x-executable" ]] || [[ "${type}" == "application/x-pie-executable" ]] 639 | then 640 | if [ -x "${CUR_DIR}" ] 641 | then 642 | print_context_menu BIN_OPTIONS[@] 643 | else 644 | print_context_menu BIN_NO_X_OPTIONS[@] 645 | fi 646 | 647 | elif [[ "${type}" == "text/plain" ]] 648 | then 649 | print_context_menu TEXT_OPTIONS[@] 650 | 651 | elif [[ "${type}" == "text/html" ]] 652 | then 653 | print_context_menu HTML_OPTIONS[@] 654 | 655 | elif [[ "${type}" == "image/jpeg" ]] || [[ "${type}" == "image/png" ]] 656 | then 657 | print_context_menu IMAGE_OPTIONS[@] 658 | 659 | elif [[ "${type}" == "image/x-xcf" ]] || [[ "${type}" == "image/svg+xml" ]] 660 | then 661 | print_context_menu XCF_SVG_OPTIONS[@] 662 | 663 | elif [ ! -w "${CUR_DIR}" ] && [[ "${type}" == "text/x-shellscript" ]] 664 | then 665 | coproc ( exec "${CUR_DIR}" & > /dev/null 2>&1 ) 666 | 667 | else 668 | if [ ! -d "${CUR_DIR}" ] && [ ! -f "${CUR_DIR}" ] 669 | then 670 | QUERY="${CUR_DIR//*\/\//}" 671 | 672 | echo "${QUERY}" >> "${HIST_FILE}" 673 | 674 | find_query "${QUERY#!}" 675 | 676 | web_search "!${QUERY}" 677 | else 678 | coproc ( ${OPENER} "${CUR_DIR}" & > /dev/null 2>&1 ) 679 | fi 680 | fi 681 | exit; 682 | } 683 | 684 | # If argument is not a directory/folder 685 | if [ ! -d "${CUR_DIR}" ] 686 | then 687 | echo "${CUR_DIR}" > "${CURRENT_FILE}" 688 | context_menu 689 | exit; 690 | fi 691 | 692 | navigate_to 693 | -------------------------------------------------------------------------------- /.config/rofi/global/rofi.rasi: -------------------------------------------------------------------------------- 1 | configuration { 2 | font: "Inter Regular 10"; 3 | sidebar-mode: true; 4 | show-icons: true; 5 | icon-theme: "Nordzy"; 6 | fullscreen: false; 7 | threads: 0; 8 | matching: "fuzzy"; 9 | scroll-method: 0; 10 | monitor: "primary"; 11 | } 12 | 13 | * { 14 | transparent: #00000000; 15 | foreground: #F2F2F2EE; 16 | background-selected: #F2F2F245; 17 | background-active: #F2F2F230; 18 | background-white: #F2F2F211; 19 | background-black: #00000000; 20 | urgent: #E91E6366; 21 | urgent-selected: #E91E6377; 22 | } 23 | 24 | window { 25 | transparency: "real"; 26 | background-color: #2F3136; 27 | text-color: #ffffffb3; 28 | location: center; 29 | anchor: center; 30 | height: 44%; 31 | width: 35%; 32 | orientation: horizontal; 33 | } 34 | 35 | prompt { 36 | enabled: false; 37 | } 38 | 39 | button { 40 | action: "ok"; 41 | str: " "; 42 | font: "FantasqueSansMono Nerd Font 16"; 43 | expand: false; 44 | text-color: #ffffffb3; 45 | background-color: @transparent; 46 | vertical-align: 0.5; 47 | horizontal-align: 0.5; 48 | } 49 | 50 | entry { 51 | font: "Inter Regular 12"; 52 | background-color: @transparent; 53 | text-color: #ffffffb3; 54 | expand: true; 55 | vertical-align: 0.8; 56 | horizontal-align: 0; 57 | placeholder: ""; 58 | placeholder-color: #ffffffb3; 59 | blink: true; 60 | } 61 | 62 | entry-wrapper { 63 | orientation: horizontal; 64 | margin: 0 12px 0 12px; 65 | spacing: 24px; 66 | vertical-align: 0.5; 67 | background-color: @transparent; 68 | children: [ button, entry ]; 69 | } 70 | 71 | inputbar { 72 | padding: 14px; 73 | margin: 10px 10px 14px 10px; 74 | background-color: #202225; 75 | text-color: @foreground; 76 | expand: false; 77 | border-radius: 9px; 78 | position: north; 79 | children: [ entry-wrapper ]; 80 | } 81 | 82 | 83 | listview { 84 | background-color: @transparent; 85 | spacing: 0; 86 | cycle: true; 87 | dynamic: true; 88 | scrollbar: true; 89 | } 90 | 91 | mainbox { 92 | width: 200px; 93 | expand: true; 94 | spacing: 12px; 95 | padding: 5px; 96 | background-color: @background-black; 97 | children: [ inputbar, listview ]; 98 | } 99 | 100 | scrollbar { 101 | background-color: @transparent; 102 | handle-width: 0; 103 | margin: 0 0 5px 0; 104 | border-radius: 9px; 105 | } 106 | 107 | element { 108 | background-color: @transparent; 109 | text-color: @foreground; 110 | orientation: horizontal; 111 | border: 0; 112 | border-color: @background-white; 113 | border-radius: 6px; 114 | spacing: 24px; 115 | margin: 0px 12px 0px 12px; 116 | padding: 10px 24px 10px 24px; 117 | } 118 | 119 | element-icon { 120 | size: 24px; 121 | border: 0; 122 | border-color: @transparent; 123 | background-color: @transparent; 124 | } 125 | 126 | element-text { 127 | font: "Inter Regular 11"; 128 | expand: true; 129 | horizontal-align: 0; 130 | vertical-align: 0.5; 131 | color: #ffffffb3; 132 | background-color: @transparent; 133 | } 134 | 135 | element selected { 136 | background-color: #42464D; 137 | text-color: @foreground; 138 | } 139 | -------------------------------------------------------------------------------- /.config/rofi/global/web-search.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # MIT License 4 | 5 | # Copyright (c) 2019 Paolo Donadeo 6 | 7 | # Permission is hereby granted, free of charge, to any person obtaining a copy 8 | # of this software and associated documentation files (the "Software"), to deal 9 | # in the Software without restriction, including without limitation the rights 10 | # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | # copies of the Software, and to permit persons to whom the Software is 12 | # furnished to do so, subject to the following conditions: 13 | 14 | # The above copyright notice and this permission notice shall be included in all 15 | # copies or substantial portions of the Software. 16 | 17 | # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | 24 | import json 25 | import re 26 | import urllib.parse 27 | import urllib.request 28 | import sys 29 | import os 30 | import datetime 31 | import gzip 32 | 33 | import subprocess as sp 34 | 35 | import html 36 | 37 | 38 | ################################################################################ 39 | ##### C O N F I G U R A T I O N ###### 40 | ################################################################################ 41 | SEARCH_ENGINE = 'google' # or 'duckduckgo' 42 | BROWSER = 'firefox' # or 'firefox', 'chromium', 'brave', 'lynx' 43 | TERMINAL = ['kitty', '--'] # or ['st', '-e'] or something like that 44 | ################################################################################ 45 | 46 | CONFIG = { 47 | 'BROWSER_PATH' : { 48 | 'chrome' : ['google-chrome-stable'], 49 | 'firefox' : ['firefox'], 50 | 'chromium' : ['chromium-browser'], 51 | 'brave' : ['brave-browser'], 52 | 'lynx' : TERMINAL + ['lynx'] 53 | }, 54 | 'USER_AGENT' : { 55 | 'chrome' : 'Mozilla/5.0 (X11; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36', 56 | 'firefox' : 'Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0', 57 | 'chromium' : 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/76.0.3809.100 Chrome/76.0.3809.100 Safari/537.36', 58 | 'brave' : 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.120 Safari/537.36', 59 | 'lynx' : 'Lynx/2.8.9rel.1 libwww-FM/2.14 SSL-MM/1.4.1 OpenSSL/1.1.1d' 60 | }, 61 | 'SEARCH_ENGINE_NAME' : { 62 | 'google' : 'Google', 63 | 'duckduckgo' : 'DuckDuckGo' 64 | }, 65 | 'SEARCH_URL' : { 66 | 'google' : 'https://www.google.com/search?q=', 67 | 'duckduckgo' : 'https://duckduckgo.com/?q=' 68 | }, 69 | 'SUGGESTION_URL' : { 70 | 'google' : 'https://www.google.com/complete/search?', 71 | 'duckduckgo' : 'https://duckduckgo.com/ac/?' 72 | } 73 | } 74 | 75 | def cleanhtml(txt): 76 | return re.sub(r'<.*?>', '', txt) 77 | 78 | def fetch_suggestions(search_string): 79 | if SEARCH_ENGINE == 'google': 80 | r = { 81 | 'q' : search_string, 82 | 'cp' : '11', 83 | 'client' : 'psy-ab', 84 | 'xssi' : 't', 85 | 'gs_ri' : 'gws-wiz', 86 | 'hl' : 'en-IT', 87 | 'authuser' : '0' 88 | } 89 | url = CONFIG['SUGGESTION_URL'][SEARCH_ENGINE] + urllib.parse.urlencode(r) 90 | headers = { 91 | 'sec-fetch-mode' : 'cors', 92 | 'dnt' : '1', 93 | 'accept-encoding' : 'gzip', 94 | 'accept-language' : 'en-US;q=0.9,en;q=0.8', 95 | 'pragma' : 'no-cache', 96 | 'user-agent' : CONFIG['USER_AGENT'][BROWSER], 97 | 'accept' : '*/*', 98 | 'cache-control' : 'no-cache', 99 | 'authority' : 'www.google.com', 100 | 'referer' : 'https://www.google.com/', 101 | 'sec-fetch-site' : 'same-origin' 102 | } 103 | req = urllib.request.Request(url, headers=headers, method='GET') 104 | 105 | reply_data = gzip.decompress(urllib.request.urlopen(req).read()).split(b'\n')[1] 106 | reply_data = json.loads(reply_data) 107 | return [ cleanhtml(res[0]).strip() for res in reply_data[0] ] 108 | else: # 'duckduckgo' 109 | if search_string.startswith('!'): 110 | bang_search = True 111 | search_string = search_string.lstrip('!') 112 | else: 113 | bang_search = False 114 | r = { 115 | 'q' : search_string, 116 | 'callback' : 'autocompleteCallback', 117 | 'kl' : 'wt-wt', 118 | '_' : str(int((datetime.datetime.now().timestamp())*1000)) 119 | } 120 | url = CONFIG['SUGGESTION_URL'][SEARCH_ENGINE] + urllib.parse.urlencode(r) 121 | if bang_search: 122 | url = url.replace('?q=', '?q=!') 123 | headers = { 124 | 'pragma' : 'no-cache', 125 | 'dnt' : '1', 126 | 'accept-encoding' : 'gzip', 127 | 'accept-language' : 'en-US;q=0.9,en;q=0.8', 128 | 'user-agent' : CONFIG['USER_AGENT'][BROWSER], 129 | 'sec-fetch-mode' : 'no-cors', 130 | 'accept' : '*/*', 131 | 'cache-control' : 'no-cache', 132 | 'authority' : 'duckduckgo.com', 133 | 'referer' : 'https://duckduckgo.com/', 134 | 'sec-fetch-site' : 'same-origin', 135 | } 136 | req = urllib.request.Request(url, headers=headers, method='GET') 137 | reply_data = gzip.decompress(urllib.request.urlopen(req).read()).decode('utf8') 138 | reply_data = json.loads(re.match(r'autocompleteCallback\((.*)\);', reply_data).group(1)) 139 | return [ cleanhtml(res['phrase']).strip() for res in reply_data ] 140 | 141 | def main(): 142 | search_string = html.unescape((' '.join(sys.argv[1:])).strip()) 143 | 144 | path_str = os.path.dirname(os.path.realpath(__file__)) + '/' 145 | icon_path_str = path_str + 'icons/' 146 | icon_name = icon_path_str 147 | 148 | if SEARCH_ENGINE == 'google': 149 | icon_name += 'google.svg' 150 | else: 151 | icon_name += 'ddg.svg' 152 | 153 | if search_string.startswith('!'): 154 | search_string = search_string.rstrip('!').strip() 155 | results = fetch_suggestions(search_string) 156 | for r in results: 157 | print(":wb " + html.unescape(r) + "\0icon\x1f"+icon_name+"\n") 158 | else: 159 | url = CONFIG['SEARCH_URL'][SEARCH_ENGINE] + urllib.parse.quote_plus(search_string) 160 | sp.Popen(CONFIG['BROWSER_PATH'][BROWSER] + [url], stdout=sp.DEVNULL, stderr=sp.DEVNULL, shell=False) 161 | 162 | if __name__ == "__main__": 163 | try: 164 | main() 165 | except Exception as e: 166 | if e: 167 | sys.exit(1) 168 | -------------------------------------------------------------------------------- /.config/rofi/powermenu/powermenu.rasi: -------------------------------------------------------------------------------- 1 | configuration { 2 | font: "JetBrainsMono Nerd Font 36"; 3 | drun-display-format: "{name}"; 4 | fullscreen: false; 5 | threads: 0; 6 | matching: "fuzzy"; 7 | scroll-method: 0; 8 | disable-history: false; 9 | fullscreen: true; 10 | } 11 | 12 | * { 13 | transparent: #00000000; 14 | foreground: #F2F2F2EE; 15 | background-selected: #F2F2F245; 16 | background-active: #F2F2F230; 17 | background-white: #F2F2F211; 18 | background-black: #00000066; 19 | urgent: #E91E6366; 20 | urgent-selected: #E91E6377; 21 | } 22 | 23 | window { 24 | transparency: "real"; 25 | background-color: @transparent; 26 | text-color: @foreground; 27 | location: northwest; 28 | anchor: northwest; 29 | } 30 | 31 | inputbar { 32 | margin: 0; 33 | padding: 0; 34 | children: [ entry-wrapper ]; 35 | } 36 | 37 | listview { 38 | background-color: @transparent; 39 | lines: 6; 40 | spacing: 5%; 41 | cycle: false; 42 | dynamic: true; 43 | layout: horizontal; 44 | } 45 | 46 | mainbox { 47 | background-color: @background-black; 48 | children: [ inputbar, listview ]; 49 | padding: calc(50% - 70px) 0% 0% 15%; 50 | } 51 | 52 | element { 53 | background-color: @transparent; 54 | text-color: @foreground; 55 | orientation: horizontal; 56 | border-radius: 10px; 57 | padding: 30px; 58 | vertical: 0.5; 59 | } 60 | 61 | element-text { 62 | expand: true; 63 | horizontal-align: 0.5; 64 | vertical-align: 0.5; 65 | } 66 | 67 | element normal.urgent, 68 | element alternate.urgent { 69 | background-color: @urgent; 70 | text-color: @foreground; 71 | border-radius: 9px; 72 | } 73 | 74 | element normal.active, 75 | element alternate.active { 76 | background-color: @background-active; 77 | text-color: @foreground; 78 | } 79 | 80 | element selected { 81 | background-color: #29B6F6; 82 | text-color: #212121; 83 | } 84 | 85 | element selected.urgent { 86 | background-color: @urgent-selected; 87 | text-color: @foreground; 88 | } 89 | 90 | element selected.active { 91 | background-color: @background-active; 92 | color: @foreground-selected; 93 | } 94 | -------------------------------------------------------------------------------- /.config/rofi/scripts/emoji: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | DIR="$HOME/.config" 4 | 5 | rofi -show emoji -modi emoji -theme $DIR/rofi/Themes/emojis.rasi 6 | -------------------------------------------------------------------------------- /.config/rofi/scripts/powermenu.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ## Author : Aditya Shakya 4 | ## Mail : adi1090x@gmail.com 5 | ## Github : @adi1090x 6 | ## Twitter : @adi1090x 7 | 8 | dir="$HOME/.config/rofi/styles" 9 | rofi_command="rofi -theme $dir/five.rasi" 10 | 11 | uptime=$(uptime -p | sed -e 's/up //g') 12 | 13 | # Options 14 | shutdown="" 15 | reboot="" 16 | lock="" 17 | suspend="" 18 | logout="" 19 | 20 | # Confirmation 21 | confirm_exit() { 22 | rofi -dmenu\ 23 | -i\ 24 | -no-fixed-num-lines\ 25 | -p "Are You Sure? : "\ 26 | -theme $dir/confirm.rasi 27 | } 28 | 29 | # Message 30 | msg() { 31 | rofi -theme "$dir/message.rasi" -e "Available Options - yes / y / no / n" 32 | } 33 | 34 | # Variable passed to rofi 35 | options="$shutdown\n$reboot\n$lock\n$suspend\n$logout" 36 | 37 | chosen="$(echo -e "$options" | $rofi_command -p "Uptime: $uptime" -dmenu -selected-row 2)" 38 | case $chosen in 39 | $shutdown) 40 | ans=$(confirm_exit &) 41 | if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then 42 | loginctl poweroff 43 | elif [[ $ans == "no" || $ans == "NO" || $ans == "n" || $ans == "N" ]]; then 44 | exit 0 45 | else 46 | msg 47 | fi 48 | ;; 49 | $reboot) 50 | ans=$(confirm_exit &) 51 | if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then 52 | loginctl reboot 53 | elif [[ $ans == "no" || $ans == "NO" || $ans == "n" || $ans == "N" ]]; then 54 | exit 0 55 | else 56 | msg 57 | fi 58 | ;; 59 | $lock) 60 | if [[ -f /usr/bin/i3lock ]]; then 61 | i3lock 62 | elif [[ -f /usr/bin/betterlockscreen ]]; then 63 | betterlockscreen -l 64 | fi 65 | ;; 66 | $suspend) 67 | ans=$(confirm_exit &) 68 | if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then 69 | loginctl suspend 70 | elif [[ $ans == "no" || $ans == "NO" || $ans == "n" || $ans == "N" ]]; then 71 | exit 0 72 | else 73 | msg 74 | fi 75 | ;; 76 | $logout) 77 | ans=$(confirm_exit &) 78 | if [[ $ans == "yes" || $ans == "YES" || $ans == "y" || $ans == "Y" ]]; then 79 | if [[ "$DESKTOP_SESSION" == "/usr/share/xsessions/voidwm" ]]; then 80 | pkill dwm 81 | elif [[ "$DESKTOP_SESSION" == "bspwm" ]]; then 82 | bspc quit 83 | elif [[ "$DESKTOP_SESSION" == "/usr/share/xsessions/i3" ]]; then 84 | i3-msg exit 85 | elif [[ "$DESKTOP_SESSION" == "/usr/local/bin/dwm" ]]; then 86 | pkill dwm 87 | elif [[ "$DESKTOP_SESSION" == "awesome" ]]; then 88 | pkill awesome 89 | else 90 | pkill Hyprland 91 | fi 92 | elif [[ $ans == "no" || $ans == "NO" || $ans == "n" || $ans == "N" ]]; then 93 | exit 0 94 | else 95 | msg 96 | fi 97 | ;; 98 | esac 99 | -------------------------------------------------------------------------------- /.config/rofi/scripts/screenshot-wl.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ## Author : Aditya Shakya 4 | ## Mail : adi1090x@gmail.com 5 | ## Github : @adi1090x 6 | ## Twitter : @adi1090x 7 | 8 | dir="$HOME/.config/rofi/styles" 9 | rofi_command="rofi -theme $dir/three.rasi" 10 | 11 | # Options 12 | screen="" 13 | area="" 14 | window="" 15 | 16 | # Variable passed to rofi 17 | options="$screen\n$area\n$window" 18 | 19 | chosen="$(echo -e "$options" | $rofi_command -p '' -dmenu -selected-row 1)" 20 | case $chosen in 21 | $screen) 22 | sleep 0.4; grim -t png - | wl-copy -t image/png 23 | ;; 24 | $area) 25 | grim -g "$(slurp)" -t png - | wl-copy -t image/png 26 | ;; 27 | $window) 28 | sleep 0.4; grim -g "$(hyprctl activewindow | grep at: | cut -d' ' -f2) $(hyprctl activewindow | grep size: | cut -d' ' -f2 | sed 's/,/x/g')" - | wl-copy 29 | ;; 30 | esac 31 | 32 | -------------------------------------------------------------------------------- /.config/rofi/scripts/screenshot.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | ## Author : Aditya Shakya 4 | ## Mail : adi1090x@gmail.com 5 | ## Github : @adi1090x 6 | ## Twitter : @adi1090x 7 | 8 | dir="$HOME/.config/rofi/styles" 9 | rofi_command="rofi -theme $dir/three.rasi" 10 | 11 | # Options 12 | screen="" 13 | area="" 14 | window="" 15 | 16 | # Variable passed to rofi 17 | options="$screen\n$area\n$window" 18 | 19 | chosen="$(echo -e "$options" | $rofi_command -p '' -dmenu -selected-row 1)" 20 | case $chosen in 21 | $screen) 22 | scrot -e 'xclip -selection clipboard -target image/png -i $f && rm $f' 23 | ;; 24 | $area) 25 | scrot -s --line mode=edge -e 'xclip -selection clipboard -target image/png -i $f && rm $f' 26 | ;; 27 | $window) 28 | scrot -u -e 'xclip -selection clipboard -target image/png -i $f && rm $f' 29 | ;; 30 | esac 31 | 32 | -------------------------------------------------------------------------------- /.config/starship/starship.toml: -------------------------------------------------------------------------------- 1 | ## ░█▀▀░▀█▀░█▀█░█▀▄░█▀▀░█░█░▀█▀░█▀█ 2 | ## ░▀▀█░░█░░█▀█░█▀▄░▀▀█░█▀█░░█░░█▀▀ 3 | ## ░▀▀▀░░▀░░▀░▀░▀░▀░▀▀▀░▀░▀░▀▀▀░▀░░ 4 | ## CROSS-SHELL PROMPT 5 | ## 6 | ## rxyhn's starship configuration 7 | ## The minimal, blazing-fast, and infinitely customizable prompt for any shell! 8 | 9 | format = "$all" 10 | right_format = """$git_branch$git_status$cmd_duration$directory""" 11 | 12 | # Disable the blank line at the start of the prompt 13 | add_newline = false 14 | 15 | [line_break] 16 | disabled = true 17 | 18 | [character] 19 | success_symbol = " [](#6791c9)" 20 | error_symbol = " [](#df5b61)" 21 | vicmd_symbol = "[ ](#78b892)" 22 | 23 | [hostname] 24 | ssh_only = true 25 | format = "[$hostname](bold blue) " 26 | disabled = false 27 | 28 | [cmd_duration] 29 | min_time = 1 30 | format = "[](fg:#232526 bg:none)[$duration]($style)[](fg:#232526 bg:#232526)[](fg:#bc83e3 bg:#232526)[](fg:#232526 bg:#bc83e3)[](fg:#bc83e3 bg:none) " 31 | disabled = false 32 | style = "fg:#edeff0 bg:#232526" 33 | 34 | [directory] 35 | format = "[](fg:#232526 bg:none)[$path]($style)[](fg:#232526 bg:#232526)[](fg:#6791c9 bg:#232526)[](fg:#232526 bg:#6791c9)[](fg:#6791c9 bg:none)" 36 | style = "fg:#edeff0 bg:#232526" 37 | truncation_length = 3 38 | truncate_to_repo=false 39 | 40 | [git_branch] 41 | format = "[](fg:#232526 bg:none)[$branch]($style)[](fg:#232526 bg:#232526)[](fg:#78b892 bg:#232526)[](fg:#282c34 bg:#78b892)[](fg:#78b892 bg:none) " 42 | style = "fg:#edeff0 bg:#232526" 43 | 44 | [git_status] 45 | format="[](fg:#232526 bg:none)[$all_status$ahead_behind]($style)[](fg:#232526 bg:#232526)[](fg:#67afc1 bg:#232526)[](fg:#232526 bg:#67afc1)[](fg:#67afc1 bg:none) " 46 | style = "fg:#edeff0 bg:#232526" 47 | conflicted = "=" 48 | ahead = "⇡${count}" 49 | behind = "⇣${count}" 50 | diverged = "⇕⇡${ahead_count}⇣${behind_count}" 51 | up_to_date = "" 52 | untracked = "?${count}" 53 | stashed = "" 54 | modified = "!${count}" 55 | staged = "+${count}" 56 | renamed = "»${count}" 57 | deleted = "${count}" 58 | 59 | [git_commit] 60 | format = "[\\($hash\\)]($style) [\\($tag\\)]($style)" 61 | style = "green" 62 | 63 | [git_state] 64 | rebase = "REBASING" 65 | merge = "MERGING" 66 | revert = "REVERTING" 67 | cherry_pick = "CHERRY-PICKING" 68 | bisect = "BISECTING" 69 | am = "AM" 70 | am_or_rebase = "AM/REBASE" 71 | style = "yellow" 72 | format = '\([$state( $progress_current/$progress_total)]($style)\) ' 73 | -------------------------------------------------------------------------------- /.config/swaylock/config: -------------------------------------------------------------------------------- 1 | daemonize 2 | show-failed-attempts 3 | clock 4 | effect-blur=5x5 5 | color=1f1d2e80 6 | font="Inter" 7 | indicator 8 | indicator-radius=200 9 | indicator-thickness=50 10 | line-color=00000000 11 | ring-color=2F3136 12 | inside-color=202225 13 | key-hl-color=eb6f92 14 | separator-color=00000000 15 | text-color=e0def4 16 | text-caps-lock-color="" 17 | line-ver-color=eb6f92 18 | ring-ver-color=eb6f92 19 | inside-ver-color=1f1d2e 20 | text-ver-color=e0def4 21 | ring-wrong-color=31748f 22 | text-wrong-color=31748f 23 | inside-wrong-color=1f1d2e 24 | inside-clear-color=1f1d2e 25 | text-clear-color=e0def4 26 | ring-clear-color=9ccfd8 27 | line-clear-color=1f1d2e 28 | line-wrong-color=1f1d2e 29 | bs-hl-color=31748f 30 | grace=60 31 | grace-no-mouse 32 | grace-no-touch 33 | timestr=%R 34 | datestr=%A %e %B 35 | fade-in="0.1" 36 | ignore-empty-password 37 | -------------------------------------------------------------------------------- /.config/waybar/config.jsonc: -------------------------------------------------------------------------------- 1 | { 2 | "layer": "top", 3 | "position": "top", 4 | "mod": "dock", 5 | "exclusive": true, 6 | "passtrough": false, 7 | "gtk-layer-shell": true, 8 | "height": 0, 9 | "modules-left": [ 10 | "clock", 11 | "wlr/workspaces" 12 | ], 13 | "modules-center": ["hyprland/window"], 14 | "modules-right": [ 15 | "tray", 16 | "pulseaudio", 17 | "pulseaudio#microphone" 18 | ], 19 | 20 | "hyprland/window": { 21 | "format": "{}" 22 | }, 23 | "wlr/workspaces": { 24 | "on-scroll-up": "hyprctl dispatch workspace e+1", 25 | "on-scroll-down": "hyprctl dispatch workspace e-1", 26 | "all-outputs": true, 27 | "on-click": "activate", 28 | "format": "{icon}", 29 | "format-icons": { 30 | "1": "", 31 | "2": "", 32 | "3": "", 33 | "4": "", 34 | "5": "", 35 | "urgent": "", 36 | "active": "", 37 | "default": "" 38 | } 39 | }, 40 | "clock": { 41 | "format": "{: %R %d/%m}", 42 | "tooltip-format": "{:%Y %B}\n{calendar}" 43 | }, 44 | "pulseaudio": { 45 | "format": "{icon} {volume}%", 46 | "tooltip": false, 47 | "format-muted": " Muted", 48 | "on-click": "pamixer -t", 49 | "on-scroll-up": "pamixer -i 5", 50 | "on-scroll-down": "pamixer -d 5", 51 | "scroll-step": 5, 52 | "format-icons": { 53 | "headphone": "", 54 | "hands-free": "", 55 | "headset": "", 56 | "phone": "", 57 | "portable": "", 58 | "car": "", 59 | "default": ["", "", ""] 60 | } 61 | }, 62 | "pulseaudio#microphone": { 63 | "format": "{format_source}", 64 | "tooltip": false, 65 | "format-source": " {volume}%", 66 | "format-source-muted": " Muted", 67 | "on-click": "pamixer --default-source -t", 68 | "on-scroll-up": "pamixer --default-source -i 5", 69 | "on-scroll-down": "pamixer --default-source -d 5", 70 | "scroll-step": 5 71 | }, 72 | "tray": { 73 | "icon-size": 13, 74 | "tooltip": false, 75 | "spacing": 10 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /.config/waybar/scripts/waybar-wttr.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import json 4 | import requests 5 | from datetime import datetime 6 | 7 | WEATHER_CODES = { 8 | '113': '🌈', 9 | '116': '⛅️', 10 | '119': '☁️', 11 | '122': '☁️', 12 | '143': '🌫', 13 | '176': '🌦', 14 | '179': '🌧', 15 | '182': '🌧', 16 | '185': '🌧', 17 | '200': '⛈', 18 | '227': '🌨', 19 | '230': '❄️', 20 | '248': '🌫', 21 | '260': '🌫', 22 | '263': '🌦', 23 | '266': '🌦', 24 | '281': '🌧', 25 | '284': '🌧', 26 | '293': '🌦', 27 | '296': '🌦', 28 | '299': '🌧', 29 | '302': '🌧', 30 | '305': '🌧', 31 | '308': '🌧', 32 | '311': '🌧', 33 | '314': '🌧', 34 | '317': '🌧', 35 | '320': '🌨', 36 | '323': '🌨', 37 | '326': '🌨', 38 | '329': '❄️', 39 | '332': '❄️', 40 | '335': '❄️', 41 | '338': '❄️', 42 | '350': '🌧', 43 | '353': '🌦', 44 | '356': '🌧', 45 | '359': '🌧', 46 | '362': '🌧', 47 | '365': '🌧', 48 | '368': '🌨', 49 | '371': '❄️', 50 | '374': '🌧', 51 | '377': '🌧', 52 | '386': '⛈', 53 | '389': '🌩', 54 | '392': '⛈', 55 | '395': '❄️' 56 | } 57 | 58 | data = {} 59 | 60 | 61 | weather = requests.get("https://wttr.in/?format=j1").json() 62 | 63 | 64 | def format_time(time): 65 | return time.replace("00", "").zfill(2) 66 | 67 | 68 | def format_temp(temp): 69 | return (hour['FeelsLikeC']+"°").ljust(3) 70 | 71 | 72 | def format_chances(hour): 73 | chances = { 74 | "chanceoffog": "Fog", 75 | "chanceoffrost": "Frost", 76 | "chanceofovercast": "Overcast", 77 | "chanceofrain": "Rain", 78 | "chanceofsnow": "Snow", 79 | "chanceofsunshine": "Sunshine", 80 | "chanceofthunder": "Thunder", 81 | "chanceofwindy": "Wind" 82 | } 83 | 84 | conditions = [] 85 | for event in chances.keys(): 86 | if int(hour[event]) > 0: 87 | conditions.append(chances[event]+" "+hour[event]+"%") 88 | return ", ".join(conditions) 89 | 90 | 91 | data['text'] = WEATHER_CODES[weather['current_condition'][0]['weatherCode']] + \ 92 | " "+weather['current_condition'][0]['FeelsLikeC']+"°C" 93 | 94 | data['tooltip'] = f"{weather['current_condition'][0]['weatherDesc'][0]['value']} {weather['current_condition'][0]['temp_C']}°C\n" 95 | data['tooltip'] += f"Feels like: {weather['current_condition'][0]['FeelsLikeC']}°C\n" 96 | data['tooltip'] += f"Wind: {weather['current_condition'][0]['windspeedKmph']}Km/h\n" 97 | data['tooltip'] += f"Humidity: {weather['current_condition'][0]['humidity']}%\n" 98 | for i, day in enumerate(weather['weather']): 99 | data['tooltip'] += f"\n" 100 | if i == 0: 101 | data['tooltip'] += "Today, " 102 | if i == 1: 103 | data['tooltip'] += "Tomorrow, " 104 | data['tooltip'] += f"{day['date']}\n" 105 | data['tooltip'] += f"⬆️ {day['maxtempC']}° ⬇️ {day['mintempC']}° " 106 | data['tooltip'] += f"🌅 {day['astronomy'][0]['sunrise']} 🌇 {day['astronomy'][0]['sunset']}\n" 107 | for hour in day['hourly']: 108 | if i == 0: 109 | if int(format_time(hour['time'])) < datetime.now().hour-2: 110 | continue 111 | data['tooltip'] += f"{format_time(hour['time'])} {WEATHER_CODES[hour['weatherCode']]} {format_temp(hour['FeelsLikeC'])} {hour['weatherDesc'][0]['value']}, {format_chances(hour)}\n" 112 | 113 | 114 | print(json.dumps(data)) 115 | -------------------------------------------------------------------------------- /.config/waybar/style.css: -------------------------------------------------------------------------------- 1 | * { 2 | border: none; 3 | border-radius: 0; 4 | font-family: Cartograph CF Nerd Font, monospace; 5 | font-weight: bold; 6 | font-size: 14px; 7 | min-height: 0; 8 | } 9 | 10 | window#waybar { 11 | background: rgba(21, 18, 27, 0); 12 | color: #cdd6f4; 13 | } 14 | 15 | tooltip { 16 | background: #2F3136; 17 | border-radius: 10px; 18 | } 19 | 20 | #workspaces button.active { 21 | color: rgba(255, 255, 255, 0.7); 22 | } 23 | 24 | #workspaces button { 25 | padding: 5px; 26 | color: #202225; 27 | margin-right: 5px; 28 | } 29 | 30 | #workspaces button:hover { 31 | background: #42464D; 32 | color: rgba(255, 255, 255, 0.7); 33 | border-radius: 10px; 34 | } 35 | 36 | #workspaces button.focused { 37 | color: #a6adc8; 38 | background: #eba0ac; 39 | border-radius: 10px; 40 | } 41 | 42 | #workspaces button.urgent { 43 | color: #11111b; 44 | background: #a6e3a1; 45 | border-radius: 10px; 46 | } 47 | 48 | #window, 49 | #clock, 50 | #battery, 51 | #pulseaudio, 52 | #workspaces, 53 | #tray, 54 | 55 | #backlight { 56 | background: #2F3136; 57 | padding: 0px 10px; 58 | margin: 3px 0px; 59 | margin-top: 10px; 60 | border: 1px solid #181825; 61 | } 62 | 63 | #tray { 64 | border-radius: 10px; 65 | margin-right: 10px; 66 | } 67 | 68 | #workspaces { 69 | background: #2F3136; 70 | border-radius: 10px; 71 | margin-left: 10px; 72 | padding-right: 0px; 73 | padding-left: 5px; 74 | } 75 | 76 | #window { 77 | color: rgba(255, 255, 255, 0.7); 78 | border-radius: 10px 10px 10px 10px; 79 | margin-left: 60px; 80 | margin-right: 60px; 81 | } 82 | 83 | #clock { 84 | color: rgba(255, 255, 255, 0.7); 85 | border-radius: 10px 10px 10px 10px; 86 | margin-left: 5px; 87 | border-right: 0px; 88 | } 89 | 90 | #pulseaudio { 91 | color: rgba(255, 255, 255, 0.7); 92 | border-left: 0px; 93 | border-right: 0px; 94 | border-radius: 10px 0px 0px 10px; 95 | } 96 | 97 | #pulseaudio.microphone { 98 | color: rgba(255, 255, 255, 0.7); 99 | margin-right: 5px; 100 | border-radius: 0 10px 10px 0; 101 | } 102 | -------------------------------------------------------------------------------- /.config/wezterm/colors/rose-pine-dawn.toml: -------------------------------------------------------------------------------- 1 | # rose-pine-dawn 2 | [colors] 3 | foreground = "#575279" 4 | background = "#faf4ed" 5 | cursor_bg = "#9893a5" 6 | cursor_border = "#9893a5" 7 | cursor_fg = "#575279" 8 | selection_bg = "#f2e9e1" 9 | selection_fg = "#575279" 10 | 11 | ansi = ["#f2e9de", "#b4637a", "#286983", "#ea9d34", "#56949f", "#907aa9", "#d7827e", "#575279"] 12 | brights = ["#6e6a86", "#b4637a", "#286983", "#ea9d34", "#56949f", "#907aa9", "#d7827e", "#575279"] 13 | -------------------------------------------------------------------------------- /.config/wezterm/colors/rose-pine-moon.toml: -------------------------------------------------------------------------------- 1 | # rose-pine-moon 2 | [colors] 3 | foreground = "#e0def4" 4 | background = "#232136" 5 | cursor_bg = "#59546d" 6 | cursor_border = "#59546d" 7 | cursor_fg = "#e0def4" 8 | selection_bg = "#393552" 9 | selection_fg = "#817c9c" 10 | 11 | ansi = ["#393552", "#eb6f92", "#3e8fb0", "#f6c177", "#9ccfd8", "#c4a7e7", "#ebbcba", "#e0def4"] 12 | brights = ["817c9c", "#eb6f92", "#3e8fb0", "#f6c177", "#9ccfd8", "#c4a7e7", "#ebbcba", "#e0def4"] 13 | -------------------------------------------------------------------------------- /.config/wezterm/colors/rose-pine.toml: -------------------------------------------------------------------------------- 1 | # rose-pine 2 | [colors] 3 | foreground = "#e0def4" 4 | background = "#191724" 5 | cursor_bg = "#524f67" 6 | cursor_border = "#524f67" 7 | cursor_fg = "#e0def4" 8 | selection_bg = "#2a283e" 9 | selection_fg = "#e0def4" 10 | 11 | ansi = ["#26233a", "#eb6f92", "#31748f", "#f6c177", "#9ccfd8", "#c4a7e7", "#ebbcba", "#e0def4"] 12 | brights = ["#6e6a86", "#eb6f92", "#31748f", "#f6c177", "#9ccfd8", "#c4a7e7", "#ebbcba", "#e0def4"] 13 | -------------------------------------------------------------------------------- /.config/wezterm/lua/rose-pine-dawn.lua: -------------------------------------------------------------------------------- 1 | -- rose-pine-dawn 2 | 3 | local M = {} 4 | 5 | local palette = { 6 | base = '#faf4ed', 7 | overlay = '#f2e9e1', 8 | muted = '#9893a5', 9 | text = '#575279', 10 | } 11 | 12 | local active_tab = { 13 | bg_color = palette.overlay, 14 | fg_color = palette.text, 15 | } 16 | 17 | local inactive_tab = { 18 | bg_color = palette.base, 19 | fg_color = palette.muted, 20 | } 21 | 22 | function M.colors() 23 | return { 24 | tab_bar = { 25 | background = palette.base, 26 | active_tab = active_tab, 27 | inactive_tab = inactive_tab, 28 | inactive_tab_hover = active_tab, 29 | new_tab = inactive_tab, 30 | new_tab_hover = active_tab, 31 | inactive_tab_edge = palette.muted, -- (Fancy tab bar only) 32 | }, 33 | } 34 | end 35 | 36 | function M.window_frame() -- (Fancy tab bar only) 37 | return { 38 | active_titlebar_bg = palette.base, 39 | inactive_titlebar_bg = palette.base, 40 | } 41 | end 42 | 43 | return M 44 | -------------------------------------------------------------------------------- /.config/wezterm/lua/rose-pine-moon.lua: -------------------------------------------------------------------------------- 1 | -- rose-pine-moon 2 | 3 | local M = {} 4 | 5 | local palette = { 6 | base = '#232136', 7 | overlay = '#393552', 8 | muted = '#6e6a86', 9 | text = '#e0def4', 10 | } 11 | 12 | local active_tab = { 13 | bg_color = palette.overlay, 14 | fg_color = palette.text, 15 | } 16 | 17 | local inactive_tab = { 18 | bg_color = palette.base, 19 | fg_color = palette.muted, 20 | } 21 | 22 | function M.colors() 23 | return { 24 | tab_bar = { 25 | background = palette.base, 26 | active_tab = active_tab, 27 | inactive_tab = inactive_tab, 28 | inactive_tab_hover = active_tab, 29 | new_tab = inactive_tab, 30 | new_tab_hover = active_tab, 31 | inactive_tab_edge = palette.muted, -- (Fancy tab bar only) 32 | }, 33 | } 34 | end 35 | 36 | function M.window_frame() -- (Fancy tab bar only) 37 | return { 38 | active_titlebar_bg = palette.base, 39 | inactive_titlebar_bg = palette.base, 40 | } 41 | end 42 | 43 | return M 44 | -------------------------------------------------------------------------------- /.config/wezterm/lua/rose-pine.lua: -------------------------------------------------------------------------------- 1 | -- rose-pine 2 | 3 | local M = {} 4 | 5 | local palette = { 6 | base = '#191724', 7 | overlay = '#26233a', 8 | muted = '#6e6a86', 9 | text = '#e0def4', 10 | } 11 | 12 | local active_tab = { 13 | bg_color = palette.overlay, 14 | fg_color = palette.text, 15 | } 16 | 17 | local inactive_tab = { 18 | bg_color = palette.base, 19 | fg_color = palette.muted, 20 | } 21 | 22 | function M.colors() 23 | return { 24 | tab_bar = { 25 | background = palette.base, 26 | active_tab = active_tab, 27 | inactive_tab = inactive_tab, 28 | inactive_tab_hover = active_tab, 29 | new_tab = inactive_tab, 30 | new_tab_hover = active_tab, 31 | inactive_tab_edge = palette.muted, -- (Fancy tab bar only) 32 | }, 33 | } 34 | end 35 | 36 | function M.window_frame() -- (Fancy tab bar only) 37 | return { 38 | active_titlebar_bg = palette.base, 39 | inactive_titlebar_bg = palette.base, 40 | } 41 | end 42 | 43 | return M 44 | -------------------------------------------------------------------------------- /.config/wezterm/wezterm.lua: -------------------------------------------------------------------------------- 1 | local wezterm = require("wezterm") 2 | 3 | local function font_with_fallback(name, params) 4 | local names = { name, "Apple Color Emoji", "azuki_font" } 5 | return wezterm.font_with_fallback(names, params) 6 | end 7 | 8 | local font_name = "Cartograph CF" 9 | 10 | return { 11 | -- OpenGL for GPU acceleration, Software for CPU 12 | front_end = "OpenGL", 13 | 14 | color_scheme = 'Catppuccin Mocha', 15 | 16 | -- Font config 17 | font = font_with_fallback(font_name), 18 | font_rules = { 19 | { 20 | italic = true, 21 | font = font_with_fallback(font_name, { italic = true }), 22 | }, 23 | { 24 | italic = false, 25 | font = font_with_fallback(font_name, { bold = true }), 26 | }, 27 | { 28 | intensity = "Bold", 29 | font = font_with_fallback(font_name, { bold = true }), 30 | }, 31 | }, 32 | warn_about_missing_glyphs = false, 33 | font_size = 10, 34 | line_height = 1.0, 35 | dpi = 96.0, 36 | 37 | -- Cursor style 38 | default_cursor_style = "BlinkingUnderline", 39 | 40 | -- X11 41 | enable_wayland = true, 42 | 43 | -- Keybinds 44 | disable_default_key_bindings = true, 45 | keys = { 46 | { 47 | key = [[\]], 48 | mods = "CTRL|ALT", 49 | action = wezterm.action({ 50 | SplitHorizontal = { domain = "CurrentPaneDomain" }, 51 | }), 52 | }, 53 | { 54 | key = [[\]], 55 | mods = "CTRL", 56 | action = wezterm.action({ 57 | SplitVertical = { domain = "CurrentPaneDomain" }, 58 | }), 59 | }, 60 | { 61 | key = "q", 62 | mods = "CTRL", 63 | action = wezterm.action({ CloseCurrentPane = { confirm = false } }), 64 | }, 65 | { 66 | key = "h", 67 | mods = "CTRL|SHIFT", 68 | action = wezterm.action({ ActivatePaneDirection = "Left" }), 69 | }, 70 | { 71 | key = "l", 72 | mods = "CTRL|SHIFT", 73 | action = wezterm.action({ ActivatePaneDirection = "Right" }), 74 | }, 75 | { 76 | key = "k", 77 | mods = "CTRL|SHIFT", 78 | action = wezterm.action({ ActivatePaneDirection = "Up" }), 79 | }, 80 | { 81 | key = "j", 82 | mods = "CTRL|SHIFT", 83 | action = wezterm.action({ ActivatePaneDirection = "Down" }), 84 | }, 85 | { 86 | key = "h", 87 | mods = "CTRL|SHIFT|ALT", 88 | action = wezterm.action({ AdjustPaneSize = { "Left", 1 } }), 89 | }, 90 | { 91 | key = "l", 92 | mods = "CTRL|SHIFT|ALT", 93 | action = wezterm.action({ AdjustPaneSize = { "Right", 1 } }), 94 | }, 95 | { 96 | key = "k", 97 | mods = "CTRL|SHIFT|ALT", 98 | action = wezterm.action({ AdjustPaneSize = { "Up", 1 } }), 99 | }, 100 | { 101 | key = "j", 102 | mods = "CTRL|SHIFT|ALT", 103 | action = wezterm.action({ AdjustPaneSize = { "Down", 1 } }), 104 | }, 105 | { -- browser-like bindings for tabbing 106 | key = "t", 107 | mods = "CTRL", 108 | action = wezterm.action({ SpawnTab = "CurrentPaneDomain" }), 109 | }, 110 | { 111 | key = "w", 112 | mods = "CTRL", 113 | action = wezterm.action({ CloseCurrentTab = { confirm = false } }), 114 | }, 115 | { 116 | key = "Tab", 117 | mods = "CTRL", 118 | action = wezterm.action({ ActivateTabRelative = 1 }), 119 | }, 120 | { 121 | key = "Tab", 122 | mods = "CTRL|SHIFT", 123 | action = wezterm.action({ ActivateTabRelative = -1 }), 124 | }, -- standard copy/paste bindings 125 | { 126 | key = "x", 127 | mods = "CTRL", 128 | action = "ActivateCopyMode", 129 | }, 130 | { 131 | key = "v", 132 | mods = "CTRL|SHIFT", 133 | action = wezterm.action({ PasteFrom = "Clipboard" }), 134 | }, 135 | { 136 | key = "c", 137 | mods = "CTRL|SHIFT", 138 | action = wezterm.action({ CopyTo = "ClipboardAndPrimarySelection" }), 139 | }, 140 | }, 141 | 142 | -- Aesthetic Night Colorscheme 143 | bold_brightens_ansi_colors = true, 144 | -- Padding 145 | window_padding = { 146 | left = 25, 147 | right = 25, 148 | top = 25, 149 | bottom = 25, 150 | }, 151 | 152 | -- Tab Bar 153 | enable_tab_bar = true, 154 | hide_tab_bar_if_only_one_tab = true, 155 | show_tab_index_in_tab_bar = false, 156 | 157 | -- General 158 | automatically_reload_config = true, 159 | inactive_pane_hsb = { saturation = 1.0, brightness = 1.0 }, 160 | window_background_opacity = 0.4, 161 | window_close_confirmation = "NeverPrompt", 162 | window_frame = { active_titlebar_bg = "#45475a", font = font_with_fallback(font_name, { bold = true }) }, 163 | } 164 | -------------------------------------------------------------------------------- /.config/wlogout/layout: -------------------------------------------------------------------------------- 1 | { 2 | "label" : "lock", 3 | "action" : "swaylock", 4 | "keybind" : "l" 5 | } 6 | { 7 | "label" : "reboot", 8 | "action" : "systemctl reboot", 9 | "keybind" : "r" 10 | } 11 | { 12 | "label" : "shutdown", 13 | "action" : "systemctl poweroff", 14 | "keybind" : "s" 15 | } 16 | { 17 | "label" : "logout", 18 | "action" : "hyprctl dispatch exit 0", 19 | "keybind" : "u" 20 | } 21 | { 22 | "label" : "suspend", 23 | "action" : "systemctl suspend", 24 | "keybind" : "v" 25 | } 26 | -------------------------------------------------------------------------------- /.config/wlogout/lock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mainmast-git/hyprinstall/b3f0ed6428b93d25b0225dd23638b91f438bb5d0/.config/wlogout/lock.png -------------------------------------------------------------------------------- /.config/wlogout/logout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mainmast-git/hyprinstall/b3f0ed6428b93d25b0225dd23638b91f438bb5d0/.config/wlogout/logout.png -------------------------------------------------------------------------------- /.config/wlogout/power.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mainmast-git/hyprinstall/b3f0ed6428b93d25b0225dd23638b91f438bb5d0/.config/wlogout/power.png -------------------------------------------------------------------------------- /.config/wlogout/restart.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mainmast-git/hyprinstall/b3f0ed6428b93d25b0225dd23638b91f438bb5d0/.config/wlogout/restart.png -------------------------------------------------------------------------------- /.config/wlogout/sleep.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mainmast-git/hyprinstall/b3f0ed6428b93d25b0225dd23638b91f438bb5d0/.config/wlogout/sleep.png -------------------------------------------------------------------------------- /.config/wlogout/style.css: -------------------------------------------------------------------------------- 1 | window { 2 | background-color: rgba(30, 30, 46, 0.5); 3 | } 4 | 5 | button { 6 | background-repeat: no-repeat; 7 | background-position: center; 8 | background-size: 70%; 9 | border-radius: 10%; 10 | border: 5px solid white; 11 | margin: 30px; 12 | transition: box-shadow 0.3s ease-in-out, background-color 0.3s ease-in-out; 13 | background-color: #2F3136; 14 | } 15 | 16 | button:hover { 17 | background-color: #42464D; 18 | } 19 | 20 | button:focus { 21 | background-color: #42464D; 22 | } 23 | 24 | #lock { 25 | background-image: image(url("./lock.png")); 26 | } 27 | 28 | #logout { 29 | background-image: image(url("./logout.png")); 30 | } 31 | 32 | #suspend { 33 | background-image: image(url("./sleep.png")); 34 | } 35 | 36 | #shutdown { 37 | background-image: image(url("./power.png")); 38 | } 39 | 40 | #reboot { 41 | background-image: image(url("./restart.png")); 42 | } 43 | -------------------------------------------------------------------------------- /.local/bin/wrappedhl: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # wrappedhl 3 | # Launch Hyprland with a simple wrapper 4 | 5 | cd ~ 6 | 7 | # Variables 8 | export _JAVA_AWT_WM_NONREPARENTING=1 9 | export XCURSOR_SIZE=24 10 | 11 | # Execute Hyprland 12 | if [ -f /usr/local/bin/Hyprland ]; then 13 | exec /usr/local/bin/Hyprland >/dev/null 2>&1 14 | elif [ -f /usr/bin/Hyprland ]; then 15 | exec /usr/bin/Hyprland >/dev/null 2>&1 16 | fi 17 | -------------------------------------------------------------------------------- /.profile: -------------------------------------------------------------------------------- 1 | if [ -n "$DESKTOP_SESSION" ];then 2 | eval $(gnome-keyring-daemon --start) 3 | export SSH_AUTH_SOCK 4 | fi 5 | -------------------------------------------------------------------------------- /.scripts/colorpicker.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # License: MIT 4 | # 5 | # A script to easily pick a color on a wayland session by using: 6 | # slurp to select the location, grim to get the pixel, convert 7 | # to make the pixel a hex number and zenity to display a nice color 8 | # selector dialog where the picked color can be tweaked further. 9 | # 10 | # The script was possible thanks to the useful information on: 11 | # https://www.trst.co/simple-colour-picker-in-sway-wayland.html 12 | # https://unix.stackexchange.com/questions/320070/is-there-a-colour-picker-that-works-with-wayland-or-xwayland/523805#523805 13 | # 14 | 15 | # Check if running under wayland. 16 | if [ "$WAYLAND_DISPLAY" = "" ]; then 17 | zenity --error --width 400 \ 18 | --title "No wayland session found." \ 19 | --text "This color picker must be run under a valid wayland session." 20 | 21 | exit 1 22 | fi 23 | 24 | # Get color position 25 | position=$(slurp -b 00000000 -p) 26 | 27 | # Sleep at least for a second to prevet issues with grim always 28 | # returning improper color. 29 | sleep 1 30 | 31 | # Store the hex color value using graphicsmagick or imagemagick. 32 | if command -v /usr/bin/gm &> /dev/null; then 33 | color=$(grim -g "$position" -t png - \ 34 | | /usr/bin/gm convert - -format '%[pixel:p{0,0}]' txt:- \ 35 | | tail -n 1 \ 36 | | rev \ 37 | | cut -d ' ' -f 1 \ 38 | | rev 39 | ) 40 | else 41 | color=$(grim -g "$position" -t png - \ 42 | | convert - -format '%[pixel:p{0,0}]' txt:- \ 43 | | tail -n 1 \ 44 | | cut -d ' ' -f 4 45 | ) 46 | fi 47 | 48 | if [ "$1" == "clipboard" ]; then 49 | echo $color | wl-copy -n 50 | else 51 | # Display a color picker and store the returned rgb color 52 | rgb_color=$(zenity --color-selection \ 53 | --title="Copy color to Clipboard" \ 54 | --color="${color}" 55 | ) 56 | 57 | # Execute if user didn't click cancel 58 | if [ "$rgb_color" != "" ]; then 59 | # Convert rgb color to hex 60 | hex_color="#" 61 | for value in $(echo "${rgb_color}" | grep -E -o -m1 '[0-9]+'); do 62 | hex_color="$hex_color$(printf "%.2x" $value)" 63 | done 64 | 65 | # Copy user selection to clipboard 66 | echo $hex_color | wl-copy -n 67 | fi 68 | fi 69 | -------------------------------------------------------------------------------- /.scripts/screensht: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -o pipefail 4 | 5 | # Directory 6 | _SCREENSHOT_DIR_=$HOME/Pictures/Screenshots 7 | _ORIGINAL_DIR_=$_SCREENSHOT_DIR_/Original 8 | _LOG_FILE_="$_SCREENSHOT_DIR_/.screensht.log" 9 | # Color 10 | _FG_COLOR_='#cdd6f4' 11 | _BG_COLOR_='#1e1e2e' 12 | _BG_SIZE_=10 13 | # Border Size Applied when value greater than or equal 3 14 | _BORDER_SIZE_=0 15 | _SHADOW_SIZE_='100x40+0+16' # [ weight ] x [ radius ] + [ horizontal ] x [ vertical ] 16 | _ROUNDED_CORNER_=8 17 | # Author Config 18 | _AUTHOR_POST_=( 'South' '+0+15' ) 19 | _AUTHOR_NAME_=" $USER" 20 | _AUTHOR_COLOR_='#b4befe' 21 | # Get Lists Font With "convert -list font | grep -iE 'font:.*' | nl" 22 | _FONT_SIZE_=11 23 | _FONT_='Cartograph-CF-Regular-Nerd-Font-Complete' 24 | 25 | function check() { 26 | if [[ $? -eq 1 && ${PIPESTATUS[0]} -eq 1 ]]; then 27 | _end_job_=$(date +%s) 28 | summary $_start_job_ $_end_job_ 'failed' && dunstify -u critical -t 3000 -a "Screenshot Tool" "Screensht" >> $_LOG_FILE_ 2>&1 29 | exit 1 30 | fi 31 | } 32 | 33 | # Check save directory 34 | # Create it if it doesn't exist 35 | function check_dir() { 36 | if [[ ! -d "$_SCREENSHOT_DIR_" || ! -d "$_ORIGINAL_DIR_" ]]; then 37 | mkdir -p "$_SCREENSHOT_DIR_" 38 | mkdir -p "$_ORIGINAL_DIR_" 39 | fi 40 | } 41 | 42 | function get_latest_img() { 43 | _LATEST_IMAGE_=$(/bin/ls -th $_SCREENSHOT_DIR_ | grep -vE '.screensht.png$' | grep -E '.png$' | head -n 1) 44 | 45 | if [[ $( echo "$_LATEST_IMAGE_" | wc -w ) -eq 0 ]]; then 46 | exit 1 47 | else 48 | _LATEST_IMAGE_="$_SCREENSHOT_DIR_/$_LATEST_IMAGE_" 49 | fi 50 | } 51 | 52 | function convert() { 53 | _target_file_=$( echo "$_LATEST_IMAGE_" | sed 's/.png/.screensht.png/g' ) 54 | 55 | if [[ $_BORDER_SIZE_ -ge 3 ]]; then 56 | magick convert "$_LATEST_IMAGE_" \ 57 | -format 'roundrectangle 1,1 %[fx:w+4],%[fx:h+4] '"$_ROUNDED_CORNER_"','"$_ROUNDED_CORNER_"''\ 58 | info: > $_SCREENSHOT_DIR_/_rounded_.mvg 59 | check 60 | 61 | magick convert "$_LATEST_IMAGE_" -border $_BORDER_SIZE_ -alpha transparent \ 62 | -background none -fill white -stroke none -strokewidth 0 \ 63 | -draw "@"$_SCREENSHOT_DIR_"/_rounded_.mvg" $_SCREENSHOT_DIR_/_rounded_mask_.png >> $_LOG_FILE_ 2>&1 64 | check 65 | 66 | magick convert "$_LATEST_IMAGE_" -border $_BORDER_SIZE_ -alpha transparent \ 67 | -background none -fill none -stroke $_FG_COLOR_ -strokewidth $_BORDER_SIZE_ \ 68 | -draw "@"$_SCREENSHOT_DIR_"/_rounded_.mvg" $_SCREENSHOT_DIR_/_rounded_overlay_.png >> $_LOG_FILE_ 2>&1 69 | check 70 | 71 | magick convert "$_LATEST_IMAGE_" -alpha set -bordercolor none -border $_BORDER_SIZE_ \ 72 | $_SCREENSHOT_DIR_/_rounded_mask_.png -compose DstIn -composite \ 73 | $_SCREENSHOT_DIR_/_rounded_overlay_.png -compose Over -composite \ 74 | "$_target_file_" >> $_LOG_FILE_ 2>&1 && \ 75 | rm -f $_SCREENSHOT_DIR_/_rounded_* 76 | check 77 | else 78 | magick convert "$_LATEST_IMAGE_" \( +clone -alpha extract -draw 'fill black polygon 0,0 0,'"$_ROUNDED_CORNER_"' '"$_ROUNDED_CORNER_"',0 fill white circle '"$_ROUNDED_CORNER_"','"$_ROUNDED_CORNER_"' '"$_ROUNDED_CORNER_"',0' \ 79 | \( +clone -flip \) -compose Multiply -composite \ 80 | \( +clone -flop \) -compose Multiply -composite \ 81 | \) -alpha off -compose CopyOpacity -composite -compose over "$_target_file_" >> $_LOG_FILE_ 2>&1 82 | check 83 | fi 84 | 85 | magick convert "$_target_file_" \( +clone -background black -shadow $_SHADOW_SIZE_ \) +swap -background none -layers merge +repage "$_target_file_" >> $_LOG_FILE_ 2>&1 \ 86 | && magick convert "$_target_file_" -bordercolor $_BG_COLOR_ -border $_BG_SIZE_ "$_target_file_" >> $_LOG_FILE_ 2>&1 87 | check 88 | 89 | echo -en " $_AUTHOR_NAME_ " | magick convert "$_target_file_" -gravity ${_AUTHOR_POST_[0]} -pointsize $_FONT_SIZE_ -fill $_AUTHOR_COLOR_ -undercolor none -font $_FONT_ -annotate ${_AUTHOR_POST_[1]} @- "$_target_file_" \ 90 | >> $_LOG_FILE_ 2>&1 && magick convert "$_target_file_" -gravity South -chop 0x$(( $_BG_SIZE_ / 2 )) "$_target_file_" >> $_LOG_FILE_ 2>&1 91 | check 92 | 93 | magick convert "$_target_file_" -gravity North -background $_BG_COLOR_ -splice 0x$(( $_BG_SIZE_ / 2 )) "$_target_file_" >> $_LOG_FILE_ 2>&1 94 | check 95 | 96 | magick convert "$_target_file_" -profile /usr/share/color/icc/colord/sRGB.icc "$_target_file_" >> $_LOG_FILE_ 2>&1 97 | check 98 | } 99 | 100 | function summary() { 101 | _runtime_job_=$(($2-$1)) 102 | hours=$((_runtime_job_ / 3600)); minutes=$(( (_runtime_job_ % 3600) / 60 )); seconds=$(( (_runtime_job_ % 3600) % 60 )) 103 | 104 | if [[ $3 != "failed" ]]; then 105 | wl-copy < "$_target_file_" >> $_LOG_FILE_ 2>&1 106 | 107 | message="${_notif_message_} Runtime: $hours hours, $minutes minutes, $seconds seconds" 108 | dunstify -i "$_target_file_" -t 10000 "Screenshot Tool" "$message" -a "Screenshot Tool" 109 | fi 110 | } 111 | 112 | function main() { 113 | check_dir 114 | 115 | rm -f $_LOG_FILE_ 116 | _start_job_=$(date +%s) 117 | 118 | _screenshot_command_="$1" 119 | _notif_message_="$2" 120 | 121 | $_screenshot_command_ $_SCREENSHOT_DIR_\/$_start_job_.png> /dev/null 2>&1 122 | check 123 | 124 | get_latest_img 125 | convert 126 | 127 | mv $_LATEST_IMAGE_ $_ORIGINAL_DIR_ 128 | 129 | _end_job_=$(date +%s) 130 | summary $_start_job_ $_end_job_ 131 | } 132 | 133 | # Check the args passed 134 | if [ -z "$1" ] || ([ "$1" != 'full' ] && [ "$1" != 'area' ]); 135 | then 136 | echo " 137 | Requires an argument: 138 | area - Area screenshot 139 | full - Fullscreen screenshot 140 | Example: 141 | ./screensht area 142 | ./screensht full 143 | " 144 | elif [ "$1" = 'full' ]; 145 | then 146 | msg="Full screenshot saved and copied to clipboard!" 147 | main 'grimblast copysave output' "${msg}" 148 | elif [ "$1" = 'area' ]; 149 | then 150 | msg='Area screenshot saved and copied to clipboard!' 151 | main 'grimblast copysave area' "${msg}" 152 | fi 153 | -------------------------------------------------------------------------------- /.wallpapers/linux.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mainmast-git/hyprinstall/b3f0ed6428b93d25b0225dd23638b91f438bb5d0/.wallpapers/linux.jpg -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 raminsamadi123 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | # **Hyprinstall** 5 | 6 | 7 | 8 | 9 |  10 | 11 | 12 | 13 | 14 | This project was created to make Arch Linux ricing easier for people who don't have much time or for people who don't want to do a lot of scripting. It's beautiful, simple and lightweight (Runs on 400MB idle on my pc from 2015) 15 | 16 | 17 | ## :arrow_down: Setup :arrow_down: 18 | 19 | 20 | 21 | Installation 22 | 23 | Install Sway desktop with archinstall (NetworkManager) if problems occur try removing your disk's partitions with fdisk or cfdisk and then reboot or you might use pacman-key --init. Note that as desktop you shall use sway with pipewire, multilib and filesystem as EXT4. 24 | 25 | ## Run hyprinstall !!DO THIS AS USER NOT ROOT!! 26 | During xdg-desktop-portal pick xdg-desktop-portal-wlr. If you have a NVIDIA GPU you should type Nvidia when running the script else press enter to continue. Remeber to check the dropdown menus below if any problems occur 27 | ```sh 28 | sudo pacman -Syu git 29 | cd && git clone https://github.com/raminsamadi123/hyprinstall 30 | cd ~/hyprinstall/ 31 | ./hyprinstall.sh 32 | ``` 33 | If Hyprland is not automatically launching and you only get into tty try run this: 34 | ```sh 35 | systemctl daemon-reload && systemctl enable --now getty@tty1.service && source ~/.bash_profile && reboot 36 | ``` 37 | 38 | 39 | 40 | 41 | 42 | ## :keyboard: Keyboard :keyboard: 43 | 44 | 45 | Keybind 46 | 47 | | Key | Action | 48 | | -------------------------------------- | --------------------------------------- | 49 | | SUPER | App Launcher | 50 | | SUPER + . | Emoji | 51 | | SUPER + Q | Quit | 52 | | SUPER + F | Fullscreen | 53 | | SUPER + Right/Left | Focus Window | 54 | | SUPER + SHIFT + Right/Left | Switch Window Position | 55 | | SUPER + 1-0 | Change Workspace | 56 | | SUPER + SHIFT + 1-0 | Move Window to Workspace | 57 | | SUPER + X | Power Menu | 58 | | SUPER + SHIFT + S | Screenshot | 59 | | SUPER + SHIFT + X | Colorpicker (Install grim slurp zenity) | 60 | | SUPER + T | Terminal | 61 | | SUPER + E | File Manager (Install thunar) | 62 | | SUPER + L | Lock Screen | 63 | | SUPER + Mouse left button + Drag | Drag Window | 64 | 65 | 66 | 67 | 68 | Change Keyboard Layout 69 | 70 | #### Install Vim or any editor of your choice 71 | ```sh 72 | sudo pacman -Syu vim 73 | ``` 74 | #### Find out what your X11 layout is 75 | ```sh 76 | localectl 77 | localectl list-x11-keymap-layouts 78 | ``` 79 | #### Edit Hyprland Configuration file 80 | ```sh 81 | sudo vim ~/.config/hypr/hyprland.conf 82 | ``` 83 | #### Under EXEC & INPUT change se to your x11 layout 84 | Under EXEC: 85 | ```sh 86 | exec-once = echo se > /tmp/kb_layout 87 | ``` 88 | Under INPUT: 89 | ```sh 90 | kb_layout = se 91 | ``` 92 | 93 | 94 | 95 | 96 | 97 | ## :desktop_computer: Monitor :desktop_computer: 98 | 99 | 100 | Change Monitor Position/Resolution/Refresh Rate 101 | 102 | #### Install Vim or any editor of your choice 103 | ```sh 104 | sudo pacman -Syu vim 105 | ``` 106 | #### Find your monitors output (It should look something like this if you use Display Port DP-1. For HDMI it's something else) 107 | ```sh 108 | wl-randr 109 | ``` 110 | #### Edit Hyprland Configuration file 111 | ```sh 112 | sudo vim ~/.config/hypr/hyprland.conf 113 | ``` 114 | #### Under MONITOR change monitor=,preferred,auto,1 to your preference 115 | ```sh 116 | monitor=,preferred,auto,1 117 | ``` 118 | #### Here are some examples (Thanks to [SinisterSpatula](https://github.com/SinisterSpatula)) : 119 | ```sh 120 | #monitor=name, resolution, position, scale 121 | monitor=DP-5, 2560x1440, 1920x0, 1.25 122 | monitor=DP-6, 1920x1080, 0x0, 1 123 | ``` 124 | For highest resolution: 125 | ```sh 126 | monitor=,highres,auto,1 127 | ``` 128 | For highest refresh rate: 129 | ```sh 130 | monitor=,highrr,auto,1 131 | ``` 132 | For more specific information visit https://wiki.hyprland.org/Configuring/Monitors/ 133 | 134 | 135 | 136 | 137 | 138 | ## :city_sunset: Wallpaper :city_sunset: 139 | 140 | 141 | Change Wallpaper 142 | 143 | #### Install Vim or any editor of your choice 144 | ```sh 145 | sudo pacman -Syu vim 146 | ``` 147 | #### Find out your monitor's name in terminal 148 | It should look something like ***DP-1*** or ***HDMI-A-1*** 149 | ```sh 150 | hyprctl monitors 151 | ``` 152 | #### Edit the hyprpapper.conf in terminal 153 | ```sh 154 | sudo vim ~/.config/hypr/hyprpaper.conf 155 | ``` 156 | 157 | 158 | 159 | 160 | 161 | ## NVIDIA 162 | 163 | 164 | 165 | How to fix no cursor or dissapearing cursor on NVIDIA install 166 | 167 | #### Open your terminal and run the command below 168 | ```sh 169 | echo " 170 | export LIBVA_DRIVER_NAME=nvidia 171 | export XDG_SESSION_TYPE=wayland 172 | export GBM_BACKEND=nvidia-drm 173 | export __GLX_VENDOR_LIBRARY_NAME=nvidia 174 | export WLR_NO_HARDWARE_CURSORS=1 175 | export CURSOR_INACTIVE_TIMEOUT=0 176 | " >> ~/.bashrc && source ~/.bashrc 177 | ``` 178 | #### Reboot 179 | ```sh 180 | reboot 181 | ``` 182 | 183 | 184 | 185 | 186 | 187 | ## Virtual Machine 188 | 189 | Problems in Virtualmachine? 190 | 191 | #### Here's some articles if you really want to run it in a VM. Remeber that you need to enable 3D acceleration. 192 | ### Quick tip: Go into tty by pressing ctrl+alt+(F2-F6) and run: 193 | 194 | ```sh 195 | Hyprland 196 | ``` 197 | 198 | ### If you are on VMware install these 199 | ```sh 200 | sudo pacman -Syu open-vm-tools xf86-input-vmmouse xf86-video-vmware 201 | ``` 202 | 203 | ### You may also want to try this 204 | ```sh 205 | sudo pacman -Syu egl-wayland lib32-libva 206 | sudo sh -c "echo 'LIBSEAT_BACKEND=logind' >> /etc/environment" 207 | echo ' 208 | export XDG_SESSION_TYPE=wayland 209 | export LIBSEAT_BACKEND=logind 210 | export WLR_NO_HARDWARE_CURSORS=1 211 | export WLR_RENDERER_ALLOW_SOFTWARE=1 Hyprland 212 | ' >> ~/.bashrc && source ~/.bashrc 213 | echo ' 214 | #!/usr/bin/env bash 215 | # wrappedhl 216 | # Launch Hyprland with a simple wrapper 217 | cd ~ 218 | # Variables 219 | export _JAVA_AWT_WM_NONREPARENTING=1 220 | export XCURSOR_SIZE=24 221 | export MOZ_ENABLE_WAYLAND=1 222 | export WLR_RENDERER_ALLOW_SOFTWARE=1 Hyprland 223 | export LIBSEAT_BACKEND=logind 224 | export WLR_NO_HARDWARE_CURSORS=1 225 | export QT_QPA_PLATFORM=wayland 226 | export QT_QPA_PLATFORMTHEME=gtk2 227 | export SDL_VIDEODRIVER=wayland 228 | export CLUTTER_BACKEND=wayland 229 | exec Hyprland 230 | # Execute Hyprland 231 | if [ -f /usr/local/bin/Hyprland ]; then 232 | exec /usr/local/bin/Hyprland >/dev/null 2>&1 233 | elif [ -f /usr/bin/Hyprland ]; then 234 | exec /usr/bin/Hyprland >/dev/null 2>&1 235 | fi' > ~/.local/bin/wrappedhl 236 | sudo cp ~/.local/bin/wrappedhl /usr/share/wayland-sessions/wrapped_hl.desktop 237 | ``` 238 | 239 | https://unix.stackexchange.com/questions/656328/libseat-backend-seatd-c70-could-not-connect-to-socket-run-seatd-sock-no-su 240 | https://github.com/swaywm/sway/issues/5834 241 | https://ask.fedoraproject.org/t/cant-switch-back-to-x11/19640 242 | https://bbs.archlinux.org/viewtopic.php?id=164391 243 | https://www.reddit.com/r/hyprland/comments/y5fc5e/how_can_i_wrapping_the_launcher/ 244 | 245 | 246 | 247 | 248 | 249 | ## :wrench: Optional Configuration :wrench: 250 | 251 | 252 | How to get a working colorpicker? 253 | Note that I didn't enable this by default during installation in order to make your device more lightweight 254 | 255 | ### Install dependencies and then press (SUPER + SHIFT + X) and click somewhere to pick the color 256 | ```sh 257 | sudo pacman -Syu grim slurp zenity 258 | ``` 259 | 260 | 261 | 262 | Silent-boot for systemd-bootctl 263 | 264 | ### Install an editor of your choice 265 | ```sh 266 | sudo pacman -Syu vim 267 | ``` 268 | ### Edit your entries .conf file (Mine looks like this) 269 | ```sh 270 | sudo vim /boot/loader/entries/2023-02-05_21-29-22_linux.conf 271 | ``` 272 | ### add this at the end of options rw quiet splash loglevel=0 (it should look something like this) 273 | ```sh 274 | options root=PARTUUID=a49e02ad-bb32-476d-b200-4812aafcd87f zswap.enabled=0 rw intel_pstate=no_hwp rootfstype=ext4 rw quiet splash loglevel=0 275 | ``` 276 | ### Update your bootctl 277 | ```sh 278 | sudo bootctl update 279 | ``` 280 | 281 | 282 | 283 | 284 | 285 | Silent-boot for grub 286 | 287 | ### Install an editor of your choice 288 | ```sh 289 | sudo pacman -Syu vim 290 | ``` 291 | ### Edit your entries grub file 292 | ```sh 293 | sudo vim /etc/default/grub 294 | ``` 295 | ### Add loglevel=0 in between quiet splashscreen (like this) 296 | ```sh 297 | GRUB_CMDLINE_LINUX_DEFAULT="quiet loglevel=0 splash" 298 | ``` 299 | ### Update your grub 300 | ```sh 301 | grub-mkconfig -o /boot/grub/grub.cfg 302 | ``` 303 | 304 | 305 | 306 | 307 | 308 | How to remove timeout during systemd boot 309 | 310 | ### Run this in your terminal 311 | ```sh 312 | sudo sh -c "echo -e '#timeout 3\n#console-mode keep' > /boot/loader/loader.conf" 313 | ``` 314 | 315 | 316 | 317 | 318 | 319 | How to remove timeout during grub boot 320 | 321 | ### Install an editor of your choice 322 | ```sh 323 | sudo pacman -Syu vim 324 | ``` 325 | ### Edit your grub file 326 | ```sh 327 | sudo vim /etc/default/grub 328 | ``` 329 | ### Change GRUB_TIMEOUT to be equal to 0 330 | ```sh 331 | GRUB_TIMEOUT=0 332 | ``` 333 | ### Update grub 334 | ```sh 335 | grub-mkconfig -o /boot/grub/grub.cfg 336 | ``` 337 | 338 | 339 | 340 | 341 | 342 | 343 | ## Credits 344 | 345 | _Beauty community: [r/unixporn](https://www.reddit.com/r/unixporn)._ 346 | 347 | **©** _Artist who make Wallpapers, graphics and more_ 348 | 349 | **©** _All of mantainers of this amazing and opensource tools_ 350 | 351 | --- 352 | 353 | 354 | © [Owl4ce](https://github.com/owl4ce) 355 | © [Ilham25](https://github.com/ilham25) 356 | © [Siduck](https://github.com/siduck) 357 | © [NvChad](https://github.com/NvChad) 358 | © [Rxyhn](https://github.com/rxyhn) 359 | © [AmitGold](https://github.com/AmitGolden) 360 | © [linuxmobile](https://github.com/linuxmobile) 361 | © [ChrisTitusTech](https://github.com/ChrisTitusTech) 362 | 363 | -------------------------------------------------------------------------------- /hyprinstall.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo "What are you using? (Type Nvidia or if none press enter):" 4 | read graphics 5 | 6 | sudo pacman -Rns foot htop swaylock waybar dmenu 7 | 8 | sudo pacman -Syu base-devel git unzip rsync intel-ucode amd-ucode gvfs linux-headers 9 | 10 | mkdir Downloads && cd Downloads/ && mkdir _cloned-repos && cd _cloned-repos && git clone https://aur.archlinux.org/paru.git && cd paru/ && makepkg -si 11 | 12 | paru -Syu hyprland-bin polkit-gnome polkit-kde-agent dunst rofi rofi-emoji wl-clipboard-rs wl-clipboard-x11 wf-recorder wlogout grimblast-git mingetty hyprpaper-git xdg-desktop-portal-hyprland-git wtype imagemagick swaylock-effects qt5-wayland qt6-wayland waybar-hyprland-git playerctl pavucontrol starship noise-suppression-for-voice wezterm pamixer wlr-randr wtype noto-fonts-emoji 13 | 14 | if [[ "$graphics" =~ ^[nN][vV][iI][dD][iI][aA]$ ]]; then 15 | sudo pacman -Syu nvidia-dkms nvidia-utils nvidia-settings qt5ct libva 16 | paru -Syu nvidia-vaapi-driver-git 17 | echo ' 18 | export LIBVA_DRIVER_NAME=nvidia 19 | export XDG_SESSION_TYPE=wayland 20 | export GBM_BACKEND=nvidia-drm 21 | export __GLX_VENDOR_LIBRARY_NAME=nvidia 22 | export WLR_NO_HARDWARE_CURSORS=1 23 | export CURSOR_INACTIVE_TIMEOUT=0 24 | ' >> ~/.bashrc && source ~/.bashrc 25 | sudo sh -c "echo ' 26 | MODULES=(nvidia nvidia_modeset nvidia_uvm nvidia_drm) 27 | BINARIES=() 28 | FILES=() 29 | HOOKS=(base udev autodetect keyboard keymap modconf block filesystems fsck)' > /etc/mkinitcpio.conf" 30 | sudo mkinitcpio --config /etc/mkinitcpio.conf --generate /boot/initramfs-custom.img 31 | sudo sh -c "echo 'options nvidia-drm modeset=1' > /etc/modprobe.d/nvidia.conf" 32 | echo ' 33 | #!/usr/bin/env bash 34 | # wrappedhl 35 | # Launch Hyprland with a simple wrapper 36 | cd ~ 37 | # Variables 38 | export _JAVA_AWT_WM_NONREPARENTING=1 39 | export XCURSOR_SIZE=24 40 | export LIBVA_DRIVER_NAME=nvidia 41 | export XDG_SESSION_TYPE=wayland 42 | export GBM_BACKEND=nvidia-drm 43 | export __GLX_VENDOR_LIBRARY_NAME=nvidia 44 | export WLR_NO_HARDWARE_CURSORS=1 45 | export CURSOR_INACTIVE_TIMEOUT=0 46 | export NO_CURSOR_WARPS=0 47 | exec systemd-cat --identifier=hyprland /usr/bin/Hyprland $@ 48 | # Execute Hyprland 49 | if [ -f /usr/local/bin/Hyprland ]; then 50 | exec /usr/local/bin/Hyprland >/dev/null 2>&1 51 | elif [ -f /usr/bin/Hyprland ]; then 52 | exec /usr/bin/Hyprland >/dev/null 2>&1 53 | fi' > ~/.local/bin/wrappedhl 54 | fi 55 | 56 | sudo sh -c "echo 'LIBSEAT_BACKEND=logind' >> /etc/environment" 57 | git clone https://github.com/raminsamadi123/hyprinstall $HOME/Downloads/hyprinstall/ 58 | cd $HOME/Downloads/hyprinstall/ 59 | rsync -avxHAXP --exclude '.git*' .* ~/ 60 | mkdir -p $HOME/Downloads/nerdfonts/ 61 | cd $HOME/Downloads/ 62 | wget https://github.com/raminsamadi123/hyprinstall/releases/download/Fonts/CascadiaCode.zip 63 | wget https://github.com/raminsamadi123/hyprinstall/files/10593769/cartograph-cf-v2.zip 64 | unzip '*.zip' -d $HOME/Downloads/nerdfonts/ 65 | rm -rf *.zip 66 | sudo cp -R $HOME/Downloads/nerdfonts/ /usr/share/fonts/ 67 | fc-cache -rv 68 | 69 | sudo mkdir /etc/systemd/system/getty@tty1.service.d 70 | sudo touch override.conf /etc/systemd/system/getty@tty1.service.d/ 71 | sudo sh -c "echo -e '[Service]\nExecStart=\nExecStart=-/sbin/agetty --noissue --autologin $USER %I \$TERM\nType=idle' > /etc/systemd/system/getty@tty1.service.d/override.conf" 72 | sudo cp ~/.local/bin/wrappedhl /usr/share/wayland-sessions/wrapped_hl.desktop 73 | echo ' 74 | # 75 | # ~/.bash_profile 76 | # 77 | 78 | [[ -f ~/.bashrc ]] && . ~/.bashrc 79 | 80 | if [[ "$(tty)" == "/dev/tty1" ]] 81 | then 82 | /usr/share/wayland-sessions/wrapped_hl.desktop 83 | fi 84 | ' > ~/.bash_profile && source ~/.bash_profile 85 | sudo sh -c "echo -e '[Service]\nExecStart=\nExecStart=-/sbin/agetty --noissue --autologin $USER %I \$TERM\nType=idle' > /etc/systemd/system/getty@tty1.service.d/override.conf" 86 | echo ' 87 | # 88 | # ~/.bash_profile 89 | # 90 | 91 | [[ -f ~/.bashrc ]] && . ~/.bashrc 92 | 93 | if [[ "$(tty)" == "/dev/tty1" ]] 94 | then 95 | /usr/share/wayland-sessions/wrapped_hl.desktop 96 | fi 97 | ' > ~/.bash_profile && source ~/.bash_profile 98 | sudo chmod +x /usr/share/wayland-sessions/wrapped_hl.desktop 99 | 100 | systemctl daemon-reload 101 | systemctl enable --now getty@tty1.service 102 | source ~/.bash_profile 103 | 104 | reboot 105 | --------------------------------------------------------------------------------