├── README.md ├── dunst └── dunstrc ├── hypr ├── bin │ ├── scratchpad.sh │ ├── translate.js │ ├── translate.sh │ └── workspaceloop.sh └── hyprland.conf ├── install.sh ├── rofi ├── nord.rasi └── tokyonight.rasi ├── screenshots ├── .part ├── hyprland.png ├── scratchpad.png └── translate.png ├── swaylock └── config ├── update.sh ├── wallpaper ├── deepEye.jpg └── great_lake_sky.jpg └── waybar ├── bin ├── rofi-bluetooth.sh ├── rofi-wifi-menu.sh └── waybar-date.sh ├── config └── style.css /README.md: -------------------------------------------------------------------------------- 1 | # hyprland 2 | 3 | ![hyprland](./screenshots/hyprland.png) 4 | ![scratchpad](./screenshots/scratchpad.png) 5 | ![translate](./screenshots/translate.png) 6 | 7 | ## Desktop Component 8 | 9 | | category | software | 10 | | :------------: | :-------------: | 11 | | window manager | Hyprland | 12 | | wallpaper tool | swaybg | 13 | | status bar | waybar | 14 | | screen lock | swaylock-effect | 15 | | app launcher | rofi | 16 | | notification | dunst | 17 | | input method | fcitx5 | 18 | 19 | ps: be sure to change wallpaper path -------------------------------------------------------------------------------- /dunst/dunstrc: -------------------------------------------------------------------------------- 1 | # See dunst(5) for all configuration options 2 | 3 | [global] 4 | ### Display ### 5 | 6 | # Which monitor should the notifications be displayed on. 7 | monitor = 0 8 | 9 | # Display notification on focused monitor. Possible modes are: 10 | # mouse: follow mouse pointer 11 | # keyboard: follow window with keyboard focus 12 | # none: don't follow anything 13 | # 14 | # "keyboard" needs a window manager that exports the 15 | # _NET_ACTIVE_WINDOW property. 16 | # This should be the case for almost all modern window managers. 17 | # 18 | # If this option is set to mouse or keyboard, the monitor option 19 | # will be ignored. 20 | # follow = keyboard 21 | follow = mouse 22 | 23 | ### Geometry ### 24 | 25 | # dynamic width from 0 to 300 26 | # width = (0, 300) 27 | # constant width of 300 28 | width = (0, 400) 29 | 30 | # The maximum height of a single notification, excluding the frame. 31 | height = 500 32 | 33 | # Position the notification in the top right corner 34 | origin = top-right 35 | 36 | # Offset from the origin 37 | offset = 50x31 38 | 39 | # Scale factor. It is auto-detected if value is 0. 40 | scale = 0 41 | 42 | # Maximum number of notification (0 means no limit) 43 | notification_limit = 3 44 | 45 | ### Progress bar ### 46 | 47 | # Turn on the progess bar. It appears when a progress hint is passed with 48 | # for example dunstify -h int:value:12 49 | progress_bar = true 50 | 51 | # Set the progress bar height. This includes the frame, so make sure 52 | # it's at least twice as big as the frame width. 53 | progress_bar_height = 10 54 | 55 | # Set the frame width of the progress bar 56 | progress_bar_frame_width = 1 57 | 58 | # Set the minimum width for the progress bar 59 | progress_bar_min_width = 150 60 | 61 | # Set the maximum width for the progress bar 62 | progress_bar_max_width = 300 63 | 64 | 65 | # Show how many messages are currently hidden (because of 66 | # notification_limit). 67 | indicate_hidden = yes 68 | 69 | # The transparency of the window. Range: [0; 100]. 70 | # This option will only work if a compositing window manager is 71 | # present (e.g. xcompmgr, compiz, etc.). (X11 only) 72 | transparency = 0 73 | 74 | # Draw a line of "separator_height" pixel height between two 75 | # notifications. 76 | # Set to 0 to disable. 77 | # If gap_size is greater than 0, this setting will be ignored. 78 | separator_height = 2 79 | 80 | # Padding between text and separator. 81 | padding = 8 82 | 83 | # Horizontal padding. 84 | horizontal_padding = 8 85 | 86 | # Padding between text and icon. 87 | text_icon_padding = 0 88 | 89 | # Defines width in pixels of frame around the notification window. 90 | # Set to 0 to disable. 91 | frame_width = 3 92 | 93 | # Defines color of the frame around the notification window. 94 | frame_color = "#c0caf5" 95 | 96 | # Size of gap to display between notifications - requires a compositor. 97 | # If value is greater than 0, separator_height will be ignored and a border 98 | # of size frame_width will be drawn around each notification instead. 99 | # Click events on gaps do not currently propagate to applications below. 100 | 101 | # Define a color for the separator. 102 | # possible values are: 103 | # * auto: dunst tries to find a color fitting to the background; 104 | # * foreground: use the same color as the foreground; 105 | # * frame: use the same color as the frame; 106 | # * anything else will be interpreted as a X color. 107 | separator_color = frame 108 | 109 | # Sort messages by urgency. 110 | sort = yes 111 | 112 | # Don't remove messages, if the user is idle (no mouse or keyboard input) 113 | # for longer than idle_threshold seconds. 114 | # Set to 0 to disable. 115 | # A client can set the 'transient' hint to bypass this. See the rules 116 | # section for how to disable this if necessary 117 | # idle_threshold = 120 118 | 119 | ### Text ### 120 | 121 | font = JetBrainsMono Nerd Font 18 122 | 123 | # The spacing between lines. If the height is smaller than the 124 | # font height, it will get raised to the font height. 125 | line_height = 0 126 | 127 | # Possible values are: 128 | # full: Allow a small subset of html markup in notifications: 129 | # bold 130 | # italic 131 | # strikethrough 132 | # underline 133 | # 134 | # For a complete reference see 135 | # . 136 | # 137 | # strip: This setting is provided for compatibility with some broken 138 | # clients that send markup even though it's not enabled on the 139 | # server. Dunst will try to strip the markup but the parsing is 140 | # simplistic so using this option outside of matching rules for 141 | # specific applications *IS GREATLY DISCOURAGED*. 142 | # 143 | # no: Disable markup parsing, incoming notifications will be treated as 144 | # plain text. Dunst will not advertise that it has the body-markup 145 | # capability if this is set as a global setting. 146 | # 147 | # It's important to note that markup inside the format option will be parsed 148 | # regardless of what this is set to. 149 | markup = full 150 | 151 | # The format of the message. Possible variables are: 152 | # %a appname 153 | # %s summary 154 | # %b body 155 | # %i iconname (including its path) 156 | # %I iconname (without its path) 157 | # %p progress value if set ([ 0%] to [100%]) or nothing 158 | # %n progress value if set without any extra characters 159 | # %% Literal % 160 | # Markup is allowed 161 | format = "%s\n%b" 162 | 163 | # Alignment of message text. 164 | # Possible values are "left", "center" and "right". 165 | alignment = center 166 | 167 | # Vertical alignment of message text and icon. 168 | # Possible values are "top", "center" and "bottom". 169 | vertical_alignment = center 170 | 171 | # Show age of message if message is older than show_age_threshold 172 | # seconds. 173 | # Set to -1 to disable. 174 | show_age_threshold = 60 175 | 176 | # Specify where to make an ellipsis in long lines. 177 | # Possible values are "start", "middle" and "end". 178 | ellipsize = middle 179 | 180 | # Ignore newlines '\n' in notifications. 181 | ignore_newline = no 182 | 183 | # Stack together notifications with the same content 184 | stack_duplicates = true 185 | 186 | # Hide the count of stacked notifications with the same content 187 | hide_duplicate_count = false 188 | 189 | # Display indicators for URLs (U) and actions (A). 190 | show_indicators = yes 191 | 192 | ### Icons ### 193 | 194 | # Align icons left/right/top/off 195 | icon_position = left 196 | # Scale small icons up to this size, set to 0 to disable. Helpful 197 | # for e.g. small files or high-dpi screens. In case of conflict, 198 | # max_icon_size takes precedence over this. 199 | # min_icon_size = 16 200 | 201 | # Scale larger icons down to this size, set to 0 to disable 202 | max_icon_size = 50 203 | 204 | # Paths to default icons. 205 | icon_path = /usr/share/icons/Mkos-Big-Sur/16x16/status/:/usr/share/icons/Mkos-Big-Sur/16x16/devices/:/usr/share/icons/Mkos-Big-Sur/16x16/apps/:/usr/share/icons/Mkos-Big-Sur/16x16/places/:/usr/share/icons/Mkos-Big-Sur/16x16/panel/ 206 | #icon_theme = "Infinity, Adwaita" 207 | #enable_recursive_icon_lookup = true 208 | 209 | ### History ### 210 | 211 | # Should a notification popped up from history be sticky or timeout 212 | # as if it would normally do. 213 | sticky_history = yes 214 | 215 | # Maximum amount of notifications kept in history 216 | history_length = 20 217 | 218 | ### Misc/Advanced ### 219 | 220 | # Browser for opening urls in context menu. 221 | browser = /usr/bin/xdg-open 222 | 223 | # Always run rule-defined scripts, even if the notification is suppressed 224 | always_run_script = true 225 | 226 | # Define the title of the windows spawned by dunst 227 | title = Dunst 228 | 229 | # Define the class of the windows spawned by dunst 230 | class = Dunst 231 | 232 | # Define the corner radius of the notification window 233 | # in pixel size. If the radius is 0, you have no rounded 234 | # corners. 235 | # The radius will be automatically lowered if it exceeds half of the 236 | # notification height to avoid clipping text and/or icons. 237 | corner_radius = 15 238 | 239 | # Ignore the dbus closeNotification message. 240 | # Useful to enforce the timeout set by dunst configuration. Without this 241 | # parameter, an application may close the notification sent before the 242 | # user defined timeout. 243 | ignore_dbusclose = false 244 | 245 | ### Wayland ### 246 | # These settings are Wayland-specific. They have no effect when using X11 247 | 248 | # Uncomment this if you want to let notications appear under fullscreen 249 | # applications (default: overlay) 250 | # layer = top 251 | 252 | # Set this to true to use X11 output on Wayland. 253 | force_xwayland = false 254 | 255 | ### Legacy 256 | 257 | # Use the Xinerama extension instead of RandR for multi-monitor support. 258 | # This setting is provided for compatibility with older nVidia drivers that 259 | # do not support RandR and using it on systems that support RandR is highly 260 | # discouraged. 261 | # 262 | # By enabling this setting dunst will not be able to detect when a monitor 263 | # is connected or disconnected which might break follow mode if the screen 264 | # layout changes. 265 | force_xinerama = false 266 | 267 | ### mouse 268 | 269 | # Defines list of actions for each mouse event 270 | # Possible values are: 271 | # * none: Don't do anything. 272 | # * do_action: Invoke the action determined by the action_name rule. If there is no 273 | # such action, open the context menu. 274 | # * open_url: If the notification has exactly one url, open it. If there are multiple 275 | # ones, open the context menu. 276 | # * close_current: Close current notification. 277 | # * close_all: Close all notifications. 278 | # * context: Open context menu for the notification. 279 | # * context_all: Open context menu for all notifications. 280 | # These values can be strung together for each mouse event, and 281 | # will be executed in sequence. 282 | mouse_left_click = close_current 283 | mouse_middle_click = context 284 | mouse_right_click = do_action 285 | 286 | # Experimental features that may or may not work correctly. Do not expect them 287 | # to have a consistent behaviour across releases. 288 | [experimental] 289 | # Calculate the dpi to use on a per-monitor basis. 290 | # If this setting is enabled the Xft.dpi value will be ignored and instead 291 | # dunst will attempt to calculate an appropriate dpi value for each monitor 292 | # using the resolution and physical size. This might be useful in setups 293 | # where there are multiple screens with very different dpi values. 294 | per_monitor_dpi = false 295 | 296 | [urgency_low] 297 | background = "#16161e" 298 | foreground = "#c0caf5" 299 | frame_color = "#c0caf5" 300 | 301 | [urgency_normal] 302 | background = "#1a1b26" 303 | foreground = "#c0caf5" 304 | frame_color = "#c0caf5" 305 | 306 | [urgency_critical] 307 | background = "#292e42" 308 | foreground = "#db4b4b" 309 | frame_color = "#db4b4b" 310 | 311 | -------------------------------------------------------------------------------- /hypr/bin/scratchpad.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | hasspecial=$(hyprctl clients -j | jq -r '.[] | select(.workspace.name=="special")') 4 | if [ -z "$hasspecial" ]; then 5 | kitty --class "scratchpad" & 6 | sleep 0.5 7 | else 8 | hyprctl dispatch togglespecialworkspace 9 | fi 10 | -------------------------------------------------------------------------------- /hypr/bin/translate.js: -------------------------------------------------------------------------------- 1 | function TL(a) { 2 | var k = ""; 3 | var b = 406644; 4 | var b1 = 3293161072; 5 | 6 | var jd = "."; 7 | var $b = "+-a^+6"; 8 | var Zb = "+-3^+b+-f"; 9 | 10 | for (var e = [], f = 0, g = 0; g < a.length; g++) { 11 | var m = a.charCodeAt(g); 12 | 128 > m 13 | ? (e[f++] = m) 14 | : (2048 > m 15 | ? (e[f++] = (m >> 6) | 192) 16 | : (55296 === (m & 64512) && 17 | g + 1 < a.length && 18 | 56320 === (a.charCodeAt(g + 1) & 64512) 19 | ? ((m = 65536 + ((m & 1023) << 10) + (a.charCodeAt(++g) & 1023)), 20 | (e[f++] = (m >> 18) | 240), 21 | (e[f++] = ((m >> 12) & 63) | 128)) 22 | : (e[f++] = (m >> 12) | 224), 23 | (e[f++] = ((m >> 6) & 63) | 128)), 24 | (e[f++] = (m & 63) | 128)); 25 | } 26 | a = b; 27 | for (f = 0; f < e.length; f++) (a += e[f]), (a = RL(a, $b)); 28 | a = RL(a, Zb); 29 | a ^= b1 || 0; 30 | 0 > a && (a = (a & 2147483647) + 2147483648); 31 | a %= 1e6; 32 | return a.toString() + jd + (a ^ b); 33 | } 34 | 35 | function RL(a, b) { 36 | var t = "a"; 37 | var Yb = "+"; 38 | for (var c = 0; c < b.length - 2; c += 3) { 39 | var d = b.charAt(c + 2); 40 | d = d >= t ? d.charCodeAt(0) - 87 : Number(d); 41 | d = b.charAt(c + 1) === Yb ? a >>> d : a << d; 42 | a = b.charAt(c) === Yb ? (a + d) & 4294967295 : a ^ d; 43 | } 44 | return a; 45 | } 46 | 47 | const http = require("http"); 48 | const readline = require("readline"); 49 | const rl = readline.createInterface({ 50 | input: process.stdin, 51 | output: process.stdout, 52 | }); 53 | 54 | rl.question("", function (text) { 55 | var strip_text = text.replace(/\n/g, ""); 56 | var target_language = "zh-CN"; 57 | const options = { 58 | hostname: "translate.google.com", 59 | path: `/translate_a/single?client=webapp&sl=auto&tl=${target_language}&hl=${target_language}&dt=at&dt=bd&dt=ex&dt=ld&dt=md&dt=qca&dt=rw&dt=rm&dt=ss&dt=t&source=bh&ssel=0&tsel=0&kc=1&tk=${TL( 60 | strip_text, 61 | )}&q=${encodeURIComponent(strip_text)}`, 62 | method: "GET", 63 | headers: { responseType: "json" }, 64 | }; 65 | const req = http 66 | .request(options, (res) => { 67 | let data = ""; 68 | res.on("data", (chunk) => { 69 | data += chunk; 70 | }); // Ending the response 71 | res.on("end", () => { 72 | var result = JSON.parse(data); 73 | var content_list = result[0]; 74 | var final = ""; 75 | // console.log(content_list) 76 | for (let index = 0; index < content_list.length; index++) { 77 | if (content_list[index][0] !== null) { 78 | final += content_list[index][0]; 79 | } else { 80 | break; 81 | } 82 | } 83 | console.log(final); 84 | }); 85 | }) 86 | .on("error", (err) => { 87 | console.log("Error: ", err); 88 | }) 89 | .end(); 90 | }); 91 | -------------------------------------------------------------------------------- /hypr/bin/translate.sh: -------------------------------------------------------------------------------- 1 | a=$(wl-paste -p | sed ':a;N;$!ba;s/\n/ /g' | node ~/.config/hypr/bin/translate.js) 2 | notify-send "󰊿 Google Translate" "$a" 3 | -------------------------------------------------------------------------------- /hypr/bin/workspaceloop.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | current_workspace=$(hyprctl activewindow | grep "workspace: " | cut -d' ' -f2) 4 | current_monitor=$(hyprctl monitors -j | jq -r '.[] | select(.focused==true).name') 5 | current_monitor_ws=($(hyprctl workspaces -j | jq -r ".[] | select(.monitor==\"$current_monitor\") | select(.name!=\"special\") | .name")) 6 | current_ws=$(hyprctl monitors -j | jq -r '.[] | select(.focused==true) | .activeWorkspace | .name') 7 | echo $current_ws 8 | 9 | length=${#current_monitor_ws[@]} 10 | current_monitor_sorted_ws=($(for element in "${current_monitor_ws[@]}"; do echo "$element"; done | sort -n)) 11 | echo $current_monitor_sorted_ws 12 | next_ws=0 13 | case $1 in 14 | Left) 15 | for((i=0;i<$length;i++)) do 16 | ws=${current_monitor_sorted_ws[$i]} 17 | if [ $ws -eq $current_ws ] 18 | then 19 | if [ $i -eq 0 ] 20 | then 21 | next_ws_index=$((${#current_monitor_sorted_ws[@]}-1)) 22 | next_ws=${current_monitor_sorted_ws[next_ws_index]} 23 | break 24 | else 25 | next_ws_index=$(($i-1)) 26 | next_ws=${current_monitor_sorted_ws[next_ws_index]} 27 | fi 28 | fi 29 | done 30 | if [ $next_ws -eq $current_ws ] 31 | then 32 | exit 33 | fi 34 | echo $next_ws 35 | hyprctl dispatch workspace $next_ws 36 | ;; 37 | Right) 38 | for((i=0;i<$length;i++)) do 39 | ws=${current_monitor_sorted_ws[$i]} 40 | if [ $ws -eq $current_ws ] 41 | then 42 | last_index=$(($length-1)) 43 | if [ $i = $last_index ] 44 | then 45 | next_ws_index=0 46 | next_ws=${current_monitor_sorted_ws[next_ws_index]} 47 | break 48 | else 49 | next_ws_index=$(($i+1)) 50 | next_ws=${current_monitor_sorted_ws[next_ws_index]} 51 | fi 52 | fi 53 | done 54 | if [ $next_ws -eq $current_ws ] 55 | then 56 | exit 57 | fi 58 | echo $next_ws 59 | hyprctl dispatch workspace $next_ws 60 | ;; 61 | esac 62 | -------------------------------------------------------------------------------- /hypr/hyprland.conf: -------------------------------------------------------------------------------- 1 | $mainMod = SUPER 2 | $term = kitty 3 | $rofiTheme = ~/.config/rofi/tokyonight.rasi 4 | $translate = ~/.config/hypr/bin/translate.sh 5 | $workspaceloop = ~/.config/hypr/bin/workspaceloop.sh 6 | $scratchpad = ~/.config/hypr/bin/scratchpad.sh 7 | # $wallpaper = ~/Media/Pictures/landscape/city_from_sky.jpg 8 | $wallpaper = ~/Media/Pictures/YGO/deepEye.jpg 9 | 10 | monitor=eDP-1,prefered,auto,1 11 | 12 | env=QT_QPA_PLATFORM,wayland 13 | env=MOZ_ENABLE_WAYLAND,1 14 | env=GTK_IM_MODULE,fcitx 15 | env=QT_IM_MODULE,fcitx 16 | env=XMODIFIERS,@im=fcitx 17 | env=SDL_IM_MODULE,fcitx 18 | env=GLFW_IM_MODULE,ibus 19 | env=_JAVA_AWT_WM_NONREPARENTING,1 20 | env=QT_QPA_PLATFORMTHEME,qt5ct 21 | env=GTK_THEME,Adwaita:dark 22 | env=DEEPIN_WINE_SCALE,1.25 23 | env=XDG_SESSION_TYPE,wayland 24 | env=XDG_CURRENT_DESKTOP,Hyprland 25 | env=XDG_SESSION_DESKTOP,Hyprland 26 | env=XCURSOR_SIZE,24 27 | 28 | exec-once = swaybg -i $wallpaper 29 | exec-once = waybar 30 | exec-once = dunst 31 | exec-once = swayidle -w timeout 1800 'hyprctl dispatch dpms off' resume 'hyprctl dispatch dpms on' 32 | exec-once = /usr/lib/polkit-kde-authentication-agent-1 33 | exec-once = fcitx5 --replace -d 34 | exec-once = wl-paste -t text --watch clipman store --no-persist 35 | 36 | general { 37 | gaps_in = 5 38 | gaps_out = 5 39 | border_size = 2 40 | col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg 41 | layout = master 42 | } 43 | 44 | decoration { 45 | blur { 46 | size = 10 47 | special = false 48 | } 49 | drop_shadow = false 50 | } 51 | 52 | animations { 53 | enabled = true 54 | bezier = myBezier, 0.05, 0.9, 0.1, 1.05 55 | animation = windows, 1, 3, myBezier 56 | animation = windowsOut, 1, 3, default, popin 80% 57 | animation = border, 1, 3, default 58 | animation = borderangle, 1, 3, default 59 | animation = fade, 1, 3, default 60 | animation = workspaces, 1, 3, default, fade 61 | animation = specialWorkspace, 1, 3, default, fade 62 | } 63 | 64 | dwindle { 65 | pseudotile = true 66 | preserve_split = true 67 | } 68 | 69 | master { 70 | new_is_master = true 71 | new_on_top = true 72 | no_gaps_when_only = true 73 | special_scale_factor=0.90 74 | } 75 | 76 | gestures { 77 | workspace_swipe = true 78 | workspace_swipe_fingers = 4 79 | workspace_swipe_distance = 600 80 | workspace_swipe_min_speed_to_force = 10 81 | } 82 | 83 | binds { 84 | scroll_event_delay = 0 85 | workspace_back_and_forth = false 86 | } 87 | 88 | misc { 89 | animate_mouse_windowdragging = true 90 | key_press_enables_dpms = true 91 | disable_splash_rendering = true 92 | disable_hyprland_logo = true 93 | enable_swallow = true 94 | swallow_regex = ^(kitty)$ 95 | } 96 | 97 | 98 | windowrulev2 = workspace 1 silent,class:firefoxdeveloperedition 99 | windowrulev2 = workspace 1 silent,class:brave-browser 100 | windowrulev2 = workspace 1 silent,class:chrome 101 | windowrulev2 = workspace 2 silent,class:^(terminal)$ 102 | 103 | windowrulev2 = workspace special,class:scratchpad 104 | windowrulev2 = float,class:telegram,title:viewer 105 | windowrulev2 = float,class:imv 106 | windowrulev2 = float,class:pcmanfm 107 | windowrulev2 = size 40% 40%,class:pcmanfm 108 | windowrulev2 = float, class:^(.*polkit-kde.*)$ 109 | 110 | bind = $mainMod, Return, exec, $term 111 | bind = $mainMod, Q, killactive, 112 | bind = $mainMod, Space, togglefloating 113 | bind = $mainMod, D, exec, rofi -show drun -m -1 -show-icons -theme $rofiTheme 114 | bind = $mainMod, R, exec, rofi -show run -m -1 -theme $rofiTheme 115 | bind = CTRL ALT, A, exec, grim -g "$(slurp)" - | swappy -f - -o - | wl-copy 116 | bind = CTRL ALT, Z, exec, $translate 117 | bind = $mainMod CTRL ALT, L, exec, swaylock 118 | bind= ALT,Tab,layoutmsg,swapwithmaster auto 119 | bind= $mainMod,F,fullscreen, 0 120 | 121 | bind = $mainMod, h, movefocus, l 122 | bind = $mainMod, l, movefocus, r 123 | bind = $mainMod, k, movefocus, u 124 | bind = $mainMod, j, movefocus, d 125 | bind = $mainMod CTRL, h, movewindow, l 126 | bind = $mainMod CTRL, l, movewindow, r 127 | bind = $mainMod CTRL, k, movewindow, u 128 | bind = $mainMod CTRL, j, movewindow, d 129 | 130 | bind = $mainMod, 1, workspace, 1 131 | bind = $mainMod, 2, workspace, 2 132 | bind = $mainMod, 3, workspace, 3 133 | bind = $mainMod, 4, workspace, 4 134 | bind = $mainMod, 5, workspace, 5 135 | bind = $mainMod, 6, workspace, 6 136 | bind = $mainMod, 7, workspace, 7 137 | bind = $mainMod, 8, workspace, 8 138 | bind = $mainMod, 9, workspace, 9 139 | bind = $mainMod, 0, workspace, 10 140 | bind = $mainMod, Right, exec, $workspaceloop Right 141 | bind = $mainMod, Left, exec, $workspaceloop Left 142 | 143 | bind = $mainMod CTRL, 1, movetoworkspace, 1 144 | bind = $mainMod CTRL, 2, movetoworkspace, 2 145 | bind = $mainMod CTRL, 3, movetoworkspace, 3 146 | bind = $mainMod CTRL, 4, movetoworkspace, 4 147 | bind = $mainMod CTRL, 5, movetoworkspace, 5 148 | bind = $mainMod CTRL, 6, movetoworkspace, 6 149 | bind = $mainMod CTRL, 7, movetoworkspace, 7 150 | bind = $mainMod CTRL, 8, movetoworkspace, 8 151 | bind = $mainMod CTRL, 9, movetoworkspace, 9 152 | bind = $mainMod CTRL, 0, movetoworkspace, 10 153 | bind = $mainMod CTRL, S, movetoworkspace, special 154 | bind = $mainMod CTRL, left, movetoworkspace, e-1 155 | bind = $mainMod CTRL, right, movetoworkspace, e+1 156 | 157 | bind = $mainMod, mouse_down, exec, $workspaceloop Left 158 | bind = $mainMod, mouse_up,exec, $workspaceloop Right 159 | bindm = $mainMod, mouse:272, movewindow 160 | bindm = $mainMod, mouse:273, resizewindow 161 | 162 | bindl=,switch:off:Lid Switch,exec,hyprctl keyword monitor "eDP-1, prefered, auto, 1" 163 | bindl=,switch:on:Lid Switch, exec, hyprctl keyword monitor "eDP-1, disable" 164 | binde=,XF86AudioRaiseVolume, exec, sh -c "pactl set-sink-mute 0 false ; pactl set-sink-volume @DEFAULT_SINK@ +2%" 165 | binde=,XF86AudioLowerVolume , exec, sh -c "pactl set-sink-mute 0 false ; pactl set-sink-volume @DEFAULT_SINK@ -2%" 166 | bind=,XF86AudioMute, exec, sh -c "pactl set-sink-mute @DEFAULT_SINK@ toggle" 167 | binde=,XF86MonBrightnessDown, exec, sh -c "sudo light -U 5" 168 | binde=,XF86MonBrightnessUp, exec,sh -c "sudo light -A 5" 169 | 170 | bind=$mainMod SHIFT,S,movetoworkspace,special 171 | bind=$mainMod,S,exec, $scratchpad 172 | -------------------------------------------------------------------------------- /install.sh: -------------------------------------------------------------------------------- 1 | cp -r hypr ~/.config/ 2 | cp -r dunst ~/.config/ 3 | cp -r rofi ~/.config/ 4 | cp -r swaylock ~/.config/ 5 | cp -r waybar ~/.config/ 6 | 7 | 8 | -------------------------------------------------------------------------------- /rofi/nord.rasi: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * ROFI SQUARED THEME USING THE NORD PALETTE 3 | * User : LR-Tech 4 | * Theme Repo : https://github.com/lr-tech/rofi-themes-collection 5 | *******************************************************************************/ 6 | 7 | * { 8 | font: "VictorMono NF Italic 20"; 9 | 10 | bg0: #2E3440; 11 | bg1: #3B4252; 12 | fg0: #D8DEE9; 13 | 14 | accent-color: #88C0D0; 15 | urgent-color: #EBCB8B; 16 | 17 | background-color: transparent; 18 | text-color: @fg0; 19 | 20 | margin: 0; 21 | padding: 0; 22 | spacing: 0; 23 | } 24 | 25 | window { 26 | location: center; 27 | width: 1000; 28 | height: 700; 29 | 30 | background-color: @bg0; 31 | } 32 | 33 | inputbar { 34 | spacing: 8px; 35 | padding: 8px; 36 | 37 | background-color: @bg1; 38 | } 39 | 40 | prompt, entry, element-icon, element-text { 41 | vertical-align: 0.5; 42 | } 43 | 44 | prompt { 45 | text-color: @accent-color; 46 | } 47 | 48 | textbox { 49 | padding: 8px; 50 | background-color: @bg1; 51 | } 52 | 53 | listview { 54 | padding: 4px 0; 55 | lines: 8; 56 | columns: 2; 57 | 58 | fixed-height: false; 59 | } 60 | 61 | element { 62 | padding: 8px; 63 | spacing: 8px; 64 | } 65 | 66 | element normal normal { 67 | text-color: @fg0; 68 | } 69 | 70 | element normal urgent { 71 | text-color: @urgent-color; 72 | } 73 | 74 | element normal active { 75 | text-color: @accent-color; 76 | } 77 | 78 | element selected { 79 | text-color: @bg0; 80 | } 81 | 82 | element selected normal, element selected active { 83 | background-color: @accent-color; 84 | } 85 | 86 | element selected urgent { 87 | background-color: @urgent-color; 88 | } 89 | 90 | element-icon { 91 | size: 0.8em; 92 | } 93 | 94 | element-text { 95 | text-color: inherit; 96 | } 97 | -------------------------------------------------------------------------------- /rofi/tokyonight.rasi: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * ROFI SQUARED THEME USING THE NORD PALETTE 3 | * User : LR-Tech 4 | * Theme Repo : https://github.com/lr-tech/rofi-themes-collection 5 | *******************************************************************************/ 6 | 7 | * { 8 | font: "VictorMono NF Italic 20"; 9 | bg0 : #1a1b26; 10 | bg1 : #1f2335; 11 | bg2 : #24283b; 12 | bg3 : #414868; 13 | fg0 : #c0caf5; 14 | fg1 : #a9b1d6; 15 | fg2 : #737aa2; 16 | red : #f7768e; 17 | green : #9ece6a; 18 | yellow : #e0af68; 19 | blue : #7aa2f7; 20 | magenta : #9a7ecc; 21 | cyan : #4abaaf; 22 | 23 | accent: @blue; 24 | urgent: @yellow; 25 | 26 | background-color : transparent; 27 | text-color : @fg0; 28 | 29 | margin : 0; 30 | padding : 0; 31 | spacing : 0; 32 | } 33 | 34 | window { 35 | location: center; 36 | width: 1000; 37 | height: 700; 38 | 39 | background-color: @bg0; 40 | /*background-image: url("/home/ch4ser/Media/Pictures/jarvis.jpg", width);*/ 41 | 42 | border: 2px; 43 | border-color: @bg3; 44 | } 45 | 46 | inputbar { 47 | spacing: 8px; 48 | padding: 8px; 49 | 50 | border: 2px; 51 | border-color: @blue; 52 | background-color: @bg1; 53 | } 54 | 55 | prompt, entry, element-icon, element-text { 56 | vertical-align: 0.5; 57 | } 58 | 59 | prompt { 60 | text-color: @accent; 61 | } 62 | 63 | textbox { 64 | padding: 8px; 65 | background-color: @bg1; 66 | } 67 | 68 | listview { 69 | padding: 4px 0; 70 | lines: 8; 71 | columns: 2; 72 | 73 | fixed-height: false; 74 | } 75 | 76 | element { 77 | padding: 8px; 78 | spacing: 8px; 79 | } 80 | 81 | element normal normal { 82 | text-color: @fg0; 83 | } 84 | 85 | element normal urgent { 86 | text-color: @urgent; 87 | } 88 | 89 | element normal active { 90 | text-color: @accent; 91 | } 92 | 93 | element selected { 94 | text-color: @bg0; 95 | } 96 | 97 | element selected normal, element selected active { 98 | background-color: @accent; 99 | } 100 | 101 | element selected urgent { 102 | background-color: @urgent; 103 | } 104 | 105 | element-icon { 106 | size: 0.8em; 107 | text-color: inherit; 108 | background-color: inherit; 109 | } 110 | 111 | element-text { 112 | text-color: inherit; 113 | background-color: inherit; 114 | } 115 | 116 | element alternate urgent { 117 | text-color: @urgent; 118 | } 119 | element alternate active { 120 | text-color: @accent; 121 | } 122 | -------------------------------------------------------------------------------- /screenshots/.part: -------------------------------------------------------------------------------- 1 | file:///home/ch4ser/resulthypr.png 2 | -------------------------------------------------------------------------------- /screenshots/hyprland.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ch4xer/hyprland/8918d559d69ccd1ad564d2be3d6c86957c904a1a/screenshots/hyprland.png -------------------------------------------------------------------------------- /screenshots/scratchpad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ch4xer/hyprland/8918d559d69ccd1ad564d2be3d6c86957c904a1a/screenshots/scratchpad.png -------------------------------------------------------------------------------- /screenshots/translate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ch4xer/hyprland/8918d559d69ccd1ad564d2be3d6c86957c904a1a/screenshots/translate.png -------------------------------------------------------------------------------- /swaylock/config: -------------------------------------------------------------------------------- 1 | ignore-empty-password 2 | 3 | clock 4 | 5 | disable-caps-lock-text 6 | image=~/Media/Pictures/landscape/great_lake_sky.jpg 7 | screenshots 8 | effect-blur=7x5 9 | font=JetBrainMono Nerd Font 10 | 11 | indicator 12 | indicator-radius=240 13 | indicator-thickness=20 14 | indicator-caps-lock 15 | 16 | key-hl-color=00ffff 17 | 18 | separator-color=0000ff 19 | 20 | inside-color=00000069 21 | inside-clear-color=00000069 22 | inside-caps-lock-color=00000069 23 | inside-ver-color=00000069 24 | inside-wrong-color=00000069 25 | 26 | ring-color=231f20D9 27 | ring-clear-color=231f20D9 28 | ring-caps-lock-color=231f20D9 29 | ring-ver-color=231f20D9 30 | ring-wrong-color=231f20D9 31 | 32 | line-color=00000000 33 | line-clear-color=009ddc 34 | line-caps-lock-color=009ddcFF 35 | line-ver-color=d9d8d8FF 36 | line-wrong-color=ee2e24FF 37 | 38 | text-color=D3D3D3 39 | text-clear-color=009ddc 40 | text-ver-color=009ddc 41 | text-wrong-color=dc143c 42 | 43 | bs-hl-color=ee2e24FF 44 | caps-lock-key-hl-color=ffd204FF 45 | caps-lock-bs-hl-color=ee2e24FF 46 | disable-caps-lock-text 47 | text-caps-lock-color=009ddc 48 | 49 | fade-in=0.2 50 | -------------------------------------------------------------------------------- /update.sh: -------------------------------------------------------------------------------- 1 | rm -r hypr waybar rofi dunst swaylock applications 2 | cp -r ~/.config/hypr ./ 3 | cp -r ~/.config/swaylock ./ 4 | cp -r ~/.config/waybar ./ 5 | cp -r ~/.config/rofi ./ 6 | cp -r ~/.config/dunst ./ 7 | 8 | -------------------------------------------------------------------------------- /wallpaper/deepEye.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ch4xer/hyprland/8918d559d69ccd1ad564d2be3d6c86957c904a1a/wallpaper/deepEye.jpg -------------------------------------------------------------------------------- /wallpaper/great_lake_sky.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ch4xer/hyprland/8918d559d69ccd1ad564d2be3d6c86957c904a1a/wallpaper/great_lake_sky.jpg -------------------------------------------------------------------------------- /waybar/bin/rofi-bluetooth.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # __ _ _ _ _ _ _ 3 | # _ __ ___ / _(_) | |__ | |_ _ ___| |_ ___ ___ | |_| |__ 4 | # | '__/ _ \| |_| |_____| '_ \| | | | |/ _ \ __/ _ \ / _ \| __| '_ \ 5 | # | | | (_) | _| |_____| |_) | | |_| | __/ || (_) | (_) | |_| | | | 6 | # |_| \___/|_| |_| |_.__/|_|\__,_|\___|\__\___/ \___/ \__|_| |_| 7 | # 8 | # Author: Nick Clyde (clydedroid) 9 | # 10 | # A script that generates a rofi menu that uses bluetoothctl to 11 | # connect to bluetooth devices and display status info. 12 | # 13 | # Inspired by networkmanager-dmenu (https://github.com/firecat53/networkmanager-dmenu) 14 | # Thanks to x70b1 (https://github.com/polybar/polybar-scripts/tree/master/polybar-scripts/system-bluetooth-bluetoothctl) 15 | # 16 | # Depends on: 17 | # Arch repositories: rofi, bluez-utils (contains bluetoothctl) 18 | 19 | # Constants 20 | divider="---------" 21 | goback="Back" 22 | 23 | # Checks if bluetooth controller is powered on 24 | power_on() { 25 | if bluetoothctl show | grep -q "Powered: yes"; then 26 | return 0 27 | else 28 | return 1 29 | fi 30 | } 31 | 32 | # Toggles power state 33 | toggle_power() { 34 | if power_on; then 35 | bluetoothctl power off 36 | show_menu 37 | else 38 | if rfkill list bluetooth | grep -q 'blocked: yes'; then 39 | rfkill unblock bluetooth && sleep 3 40 | fi 41 | bluetoothctl power on 42 | show_menu 43 | fi 44 | } 45 | 46 | # Checks if controller is scanning for new devices 47 | scan_on() { 48 | if bluetoothctl show | grep -q "Discovering: yes"; then 49 | echo "Scan: on" 50 | return 0 51 | else 52 | echo "Scan: off" 53 | return 1 54 | fi 55 | } 56 | 57 | # Toggles scanning state 58 | toggle_scan() { 59 | if scan_on; then 60 | kill $(pgrep -f "bluetoothctl scan on") 61 | bluetoothctl scan off 62 | show_menu 63 | else 64 | bluetoothctl scan on & 65 | echo "Scanning..." 66 | sleep 5 67 | show_menu 68 | fi 69 | } 70 | 71 | # Checks if controller is able to pair to devices 72 | pairable_on() { 73 | if bluetoothctl show | grep -q "Pairable: yes"; then 74 | echo "Pairable: on" 75 | return 0 76 | else 77 | echo "Pairable: off" 78 | return 1 79 | fi 80 | } 81 | 82 | # Toggles pairable state 83 | toggle_pairable() { 84 | if pairable_on; then 85 | bluetoothctl pairable off 86 | show_menu 87 | else 88 | bluetoothctl pairable on 89 | show_menu 90 | fi 91 | } 92 | 93 | # Checks if controller is discoverable by other devices 94 | discoverable_on() { 95 | if bluetoothctl show | grep -q "Discoverable: yes"; then 96 | echo "Discoverable: on" 97 | return 0 98 | else 99 | echo "Discoverable: off" 100 | return 1 101 | fi 102 | } 103 | 104 | # Toggles discoverable state 105 | toggle_discoverable() { 106 | if discoverable_on; then 107 | bluetoothctl discoverable off 108 | show_menu 109 | else 110 | bluetoothctl discoverable on 111 | show_menu 112 | fi 113 | } 114 | 115 | # Checks if a device is connected 116 | device_connected() { 117 | device_info=$(bluetoothctl info "$1") 118 | if echo "$device_info" | grep -q "Connected: yes"; then 119 | return 0 120 | else 121 | return 1 122 | fi 123 | } 124 | 125 | # Toggles device connection 126 | toggle_connection() { 127 | if device_connected $1; then 128 | bluetoothctl disconnect $1 129 | device_menu "$device" 130 | else 131 | bluetoothctl connect $1 132 | device_menu "$device" 133 | fi 134 | } 135 | 136 | # Checks if a device is paired 137 | device_paired() { 138 | device_info=$(bluetoothctl info "$1") 139 | if echo "$device_info" | grep -q "Paired: yes"; then 140 | echo "Paired: yes" 141 | return 0 142 | else 143 | echo "Paired: no" 144 | return 1 145 | fi 146 | } 147 | 148 | # Toggles device paired state 149 | toggle_paired() { 150 | if device_paired $1; then 151 | bluetoothctl remove $1 152 | device_menu "$device" 153 | else 154 | bluetoothctl pair $1 155 | device_menu "$device" 156 | fi 157 | } 158 | 159 | # Checks if a device is trusted 160 | device_trusted() { 161 | device_info=$(bluetoothctl info "$1") 162 | if echo "$device_info" | grep -q "Trusted: yes"; then 163 | echo "Trusted: yes" 164 | return 0 165 | else 166 | echo "Trusted: no" 167 | return 1 168 | fi 169 | } 170 | 171 | # Toggles device connection 172 | toggle_trust() { 173 | if device_trusted $1; then 174 | bluetoothctl untrust $1 175 | device_menu "$device" 176 | else 177 | bluetoothctl trust $1 178 | device_menu "$device" 179 | fi 180 | } 181 | 182 | # Prints a short string with the current bluetooth status 183 | # Useful for status bars like polybar, etc. 184 | print_status() { 185 | if power_on; then 186 | printf '' 187 | 188 | paired_devices_cmd="devices Paired" 189 | # Check if an outdated version of bluetoothctl is used to preserve backwards compatibility 190 | if (( $(echo "$(bluetoothctl version | cut -d ' ' -f 2) < 5.65" | bc -l) )); then 191 | paired_devices_cmd="paired-devices" 192 | fi 193 | 194 | mapfile -t paired_devices < <(bluetoothctl $paired_devices_cmd | grep Device | cut -d ' ' -f 2) 195 | counter=0 196 | 197 | for device in "${paired_devices[@]}"; do 198 | if device_connected $device; then 199 | device_alias=$(bluetoothctl info $device | grep "Alias" | cut -d ' ' -f 2-) 200 | 201 | if [ $counter -gt 0 ]; then 202 | printf ", %s" "$device_alias" 203 | else 204 | printf " %s" "$device_alias" 205 | fi 206 | 207 | ((counter++)) 208 | fi 209 | done 210 | printf "\n" 211 | else 212 | echo "" 213 | fi 214 | } 215 | 216 | # A submenu for a specific device that allows connecting, pairing, and trusting 217 | device_menu() { 218 | device=$1 219 | 220 | # Get device name and mac address 221 | device_name=$(echo $device | cut -d ' ' -f 3-) 222 | mac=$(echo $device | cut -d ' ' -f 2) 223 | 224 | # Build options 225 | if device_connected $mac; then 226 | connected="Connected: yes" 227 | else 228 | connected="Connected: no" 229 | fi 230 | paired=$(device_paired $mac) 231 | trusted=$(device_trusted $mac) 232 | options="$connected\n$paired\n$trusted\n$divider\n$goback\nExit" 233 | 234 | # Open rofi menu, read chosen option 235 | chosen="$(echo -e "$options" | $rofi_command "$device_name")" 236 | 237 | # Match chosen option to command 238 | case $chosen in 239 | "" | $divider) 240 | echo "No option chosen." 241 | ;; 242 | $connected) 243 | toggle_connection $mac 244 | ;; 245 | $paired) 246 | toggle_paired $mac 247 | ;; 248 | $trusted) 249 | toggle_trust $mac 250 | ;; 251 | $goback) 252 | show_menu 253 | ;; 254 | esac 255 | } 256 | 257 | # Opens a rofi menu with current bluetooth status and options to connect 258 | show_menu() { 259 | # Get menu options 260 | if power_on; then 261 | power="Power: on" 262 | 263 | # Human-readable names of devices, one per line 264 | # If scan is off, will only list paired devices 265 | devices=$(bluetoothctl devices | grep Device | cut -d ' ' -f 3-) 266 | 267 | # Get controller flags 268 | scan=$(scan_on) 269 | pairable=$(pairable_on) 270 | discoverable=$(discoverable_on) 271 | 272 | # Options passed to rofi 273 | options="$devices\n$divider\n$power\n$scan\n$pairable\n$discoverable\nExit" 274 | else 275 | power="Power: off" 276 | options="$power\nExit" 277 | fi 278 | 279 | # Open rofi menu, read chosen option 280 | chosen="$(echo -e "$options" | $rofi_command "Bluetooth")" 281 | 282 | # Match chosen option to command 283 | case $chosen in 284 | "" | $divider) 285 | echo "No option chosen." 286 | ;; 287 | $power) 288 | toggle_power 289 | ;; 290 | $scan) 291 | toggle_scan 292 | ;; 293 | $discoverable) 294 | toggle_discoverable 295 | ;; 296 | $pairable) 297 | toggle_pairable 298 | ;; 299 | *) 300 | device=$(bluetoothctl devices | grep "$chosen") 301 | # Open a submenu if a device is selected 302 | if [[ $device ]]; then device_menu "$device"; fi 303 | ;; 304 | esac 305 | } 306 | 307 | # Rofi command to pipe into, can add any options here 308 | rofi_command="rofi -dmenu -theme ~/.config/rofi/tokyonight.rasi -p" 309 | 310 | case "$1" in 311 | --status) 312 | print_status 313 | ;; 314 | *) 315 | show_menu 316 | ;; 317 | esac 318 | -------------------------------------------------------------------------------- /waybar/bin/rofi-wifi-menu.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Starts a scan of available broadcasting SSIDs 4 | # nmcli dev wifi rescan 5 | 6 | DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 7 | 8 | FIELDS=SSID,SECURITY 9 | POSITION=0 10 | YOFF=0 11 | XOFF=0 12 | FONT="DejaVu Sans Mono 8" 13 | 14 | if [ -r "$DIR/config" ]; then 15 | source "$DIR/config" 16 | elif [ -r "$HOME/.config/rofi/wifi" ]; then 17 | source "$HOME/.config/rofi/wifi" 18 | else 19 | echo "WARNING: config file not found! Using default values." 20 | fi 21 | 22 | LIST=$(nmcli --fields "$FIELDS" device wifi list | sed '/^--/d') 23 | # For some reason rofi always approximates character width 2 short... hmmm 24 | RWIDTH=$(($(echo "$LIST" | head -n 1 | awk '{print length($0); }')+2)) 25 | # Dynamically change the height of the rofi menu 26 | LINENUM=$(echo "$LIST" | wc -l) 27 | # Gives a list of known connections so we can parse it later 28 | KNOWNCON=$(nmcli connection show) 29 | # Really janky way of telling if there is currently a connection 30 | CONSTATE=$(nmcli -fields WIFI g) 31 | 32 | CURRSSID=$(LANGUAGE=C nmcli -t -f active,ssid dev wifi | awk -F: '$1 ~ /^yes/ {print $2}') 33 | 34 | if [[ ! -z $CURRSSID ]]; then 35 | HIGHLINE=$(echo "$(echo "$LIST" | awk -F "[ ]{2,}" '{print $1}' | grep -Fxn -m 1 "$CURRSSID" | awk -F ":" '{print $1}') + 1" | bc ) 36 | fi 37 | 38 | # HOPEFULLY you won't need this as often as I do 39 | # If there are more than 8 SSIDs, the menu will still only have 8 lines 40 | if [ "$LINENUM" -gt 8 ] && [[ "$CONSTATE" =~ "enabled" ]]; then 41 | LINENUM=8 42 | elif [[ "$CONSTATE" =~ "disabled" ]]; then 43 | LINENUM=1 44 | fi 45 | 46 | 47 | if [[ "$CONSTATE" =~ "enabled" ]]; then 48 | TOGGLE="toggle off" 49 | elif [[ "$CONSTATE" =~ "disabled" ]]; then 50 | TOGGLE="toggle on" 51 | fi 52 | 53 | 54 | 55 | CHENTRY=$(echo -e "$TOGGLE\nmanual\n$LIST" | uniq -u | rofi -dmenu -theme ~/.config/rofi/nord.rasi -p "Wi-Fi SSID: " -lines "$LINENUM" -a "$HIGHLINE" -location "$POSITION" -yoffset "$YOFF" -xoffset "$XOFF" -font "$FONT" -width -"$RWIDTH") 56 | #echo "$CHENTRY" 57 | CHSSID=$(echo "$CHENTRY" | sed 's/\s\{2,\}/\|/g' | awk -F "|" '{print $1}') 58 | #echo "$CHSSID" 59 | 60 | # If the user inputs "manual" as their SSID in the start window, it will bring them to this screen 61 | if [ "$CHENTRY" = "manual" ] ; then 62 | # Manual entry of the SSID and password (if appplicable) 63 | MSSID=$(echo "enter the SSID of the network (SSID,password)" | rofi -dmenu -theme ~/.config/rofi/nord.rasi -p "Manual Entry: " -font "$FONT" -lines 1) 64 | # Separating the password from the entered string 65 | MPASS=$(echo "$MSSID" | awk -F "," '{print $2}') 66 | 67 | #echo "$MSSID" 68 | #echo "$MPASS" 69 | 70 | # If the user entered a manual password, then use the password nmcli command 71 | if [ "$MPASS" = "" ]; then 72 | nmcli dev wifi con "$MSSID" 73 | else 74 | nmcli dev wifi con "$MSSID" password "$MPASS" 75 | fi 76 | 77 | elif [ "$CHENTRY" = "toggle on" ]; then 78 | nmcli radio wifi on 79 | 80 | elif [ "$CHENTRY" = "toggle off" ]; then 81 | nmcli radio wifi off 82 | 83 | else 84 | # If the connection is already in use, then this will still be able to get the SSID 85 | if [ "$CHSSID" = "*" ]; then 86 | CHSSID=$(echo "$CHENTRY" | sed 's/\s\{2,\}/\|/g' | awk -F "|" '{print $3}') 87 | fi 88 | 89 | # Parses the list of preconfigured connections to see if it already contains the chosen SSID. This speeds up the connection process 90 | if [[ $(echo "$KNOWNCON" | grep "$CHSSID") = "$CHSSID" ]]; then 91 | nmcli con up "$CHSSID" 92 | else 93 | if [[ "$CHENTRY" =~ "WPA2" ]] || [[ "$CHENTRY" =~ "WEP" ]]; then 94 | WIFIPASS=$(echo "if connection is stored, hit enter" | rofi -dmenu -theme ~/.config/rofi/nord.rasi -p "password: " -lines 1 -font "$FONT" ) 95 | fi 96 | if [[ $WIFIPASS == *"if connection is stored"* ]]; then 97 | nmcli dev wifi con "$CHSSID" 98 | else 99 | nmcli dev wifi con "$CHSSID" password "$WIFIPASS" 100 | fi 101 | fi 102 | 103 | fi 104 | -------------------------------------------------------------------------------- /waybar/bin/waybar-date.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | date +"%a %m-%d %H:%M " 3 | -------------------------------------------------------------------------------- /waybar/config: -------------------------------------------------------------------------------- 1 | { 2 | "position": "bottom", 3 | "modules-left": ["hyprland/workspaces"], 4 | "modules-center": ["clock"], 5 | "modules-right": ["tray","network","bluetooth","cpu","memory","temperature","pulseaudio","battery"], 6 | "hyprland/workspaces": { 7 | "all-outputs": false, 8 | /*"format": "{name} {icon}",*/ 9 | "format": "{name} {icon}", 10 | "on-click": "activate", 11 | "format-icons": { 12 | "1": " ", 13 | "2": " ", 14 | "3": " ", 15 | "4": " ", 16 | "5": " ", 17 | "6": " ", 18 | "7": " ", 19 | "8": " ", 20 | "9": " ", 21 | "10": " ", 22 | "11": " ", 23 | }, 24 | }, 25 | "clock": { 26 | "format": "{:%a %m-%d %H:%M}", 27 | "tooltip": false, 28 | }, 29 | "tray": { 30 | "icon-size": 21, 31 | "spacing": 10, 32 | "show-passive-items": true, 33 | }, 34 | "battery": { 35 | "states": { 36 | "warning": 30, 37 | "critical": 15 38 | }, 39 | "tooltip": false, 40 | "format": "{icon} {capacity}%", 41 | "format-charging": "󰂄{capacity}%", 42 | "format-plugged": " {capacity}%", 43 | "format-full": " {capacity}%", 44 | "format-icons": [" ", " ", " "], 45 | "max-length": 8, 46 | }, 47 | "network": { 48 | "format-wifi": " {essid} ", 49 | "tooltip": false, 50 | "format-ethernet": " {ipaddr}/{cidr}", 51 | "format-linked": "{ifname} (No IP) ", 52 | "format-disconnected": " ", 53 | "format-disabled": "Disabled", 54 | "on-click": "sleep 0.1 && ~/.config/waybar/bin/rofi-wifi-menu.sh", 55 | "max-length": 5, 56 | }, 57 | "pulseaudio": { 58 | "format": "{icon} {volume}%", 59 | "tooltip": false, 60 | "format-muted": "󰝟 Muted" , 61 | "format-bluetooth": " {volume}%", 62 | "format-icons": { 63 | "headphone": "", 64 | "default": ["", "", "󰕾"], 65 | }, 66 | }, 67 | "temperature": { 68 | "hwmon-path": "/sys/class/hwmon/hwmon1/temp1_input", 69 | "critical-threshold": 70, 70 | "format-critical": " !{temperatureC}°C", 71 | "format": " {temperatureC}°C" 72 | }, 73 | "cpu": { 74 | "interval": 10, 75 | "format": " {usage}%", 76 | "max-length": 8 77 | }, 78 | "memory": { 79 | "states": { 80 | "critical": 90, 81 | }, 82 | "interval": 10, 83 | "format": " {}%", 84 | "max-length": 8, 85 | }, 86 | "bluetooth": { 87 | "format": " {statue}", 88 | "format-connected": " {device_alias}", 89 | "format-disabled": "", 90 | "tooltip": false, 91 | "format-on": "", 92 | "format-off": "󰂲", 93 | "on-click": "sleep 0.1 && ~/.config/waybar/bin/rofi-bluetooth.sh &", 94 | "max-length": 5, 95 | }, 96 | } 97 | -------------------------------------------------------------------------------- /waybar/style.css: -------------------------------------------------------------------------------- 1 | * { 2 | border: none; 3 | font-family: Firacode Nerd Font; 4 | font-size: 24px; 5 | min-height: 0; 6 | } 7 | 8 | window#waybar { 9 | background: #3b4252; 10 | background: #212124; 11 | /* background: #002b36; */ 12 | color: white; 13 | opacity: 1; 14 | } 15 | 16 | #workspaces { 17 | background-color: #373737; 18 | background: #212124; 19 | color: white; 20 | margin: 0px; 21 | margin-left: 10px; 22 | border-radius: 0px; 23 | } 24 | #workspaces button { 25 | padding: 0 10px; 26 | color: white; 27 | min-width: 50px; 28 | /* border-top: 1px solid #212124; */ 29 | border-bottom: 2px solid #212124; 30 | /* border-left: 1px solid #212124; */ 31 | /* border-right: 1px solid #212124; */ 32 | } 33 | 34 | #workspaces button.focused { 35 | color: #7aa2f7; 36 | border-radius: 1px; 37 | /* border-top: 1px solid #7aa2f7; */ 38 | border-bottom: 2px solid #7aa2f7; 39 | /* border-left: 1px solid #7aa2f7; */ 40 | /* border-right: 1px solid #7aa2f7; */ 41 | } 42 | 43 | #workspaces button.active { 44 | color: #7aa2f7; 45 | border-radius: 1px; 46 | /* border-top: 1px solid #7aa2f7; */ 47 | border-bottom: 2px solid #7dcfff; 48 | /* border-left: 1px solid #7aa2f7; */ 49 | /* border-right: 1px solid #7aa2f7; */ 50 | } 51 | #workspaces button:hover { 52 | color: white; 53 | background: #373737; 54 | border-radius: 0px; 55 | } 56 | 57 | 58 | #custom-gpu-usage, #custom-date, #battery, #pulseaudio, #network, #temperature,#cpu,#memory, #bluetooth, #custom-books, #custom-ML,#custom-forest-coin, #custom-forest, #custom-todo{ 59 | /*background-color: #4c566a;*/ 60 | background-color: #373737; 61 | background: #212124; 62 | padding: 0px 10px; 63 | margin: 0px 0px; 64 | border-radius: 0px 0px 0px 0px; 65 | } 66 | 67 | #clock { 68 | background-color: #373737; 69 | background: #212124; 70 | padding: 0px 10px; 71 | margin: 0px 0px; 72 | border-radius: 0px 0px 0px 0px; 73 | } 74 | 75 | #custom-date { 76 | color: #8fbcbb; 77 | } 78 | 79 | 80 | #clock { 81 | color: #ffffff; 82 | /* border-radius: 0px 10px 10px 0px; */ 83 | } 84 | 85 | #battery { 86 | color: #a3be8c; 87 | /* border-radius: 10px 0px 0px 10px; */ 88 | } 89 | 90 | #custom-gpu-usage { 91 | color: #FF69B4; 92 | } 93 | 94 | @keyframes blink { 95 | to { 96 | background-color: #ffffff; 97 | color: black; 98 | } 99 | } 100 | 101 | #battery.charging { 102 | color: #a3be8c; 103 | } 104 | 105 | #battery.critical:not(.charging) { 106 | background-color: #f53c3c; 107 | color: #ffffff; 108 | animation-name: blink; 109 | animation-duration: 0.5s; 110 | animation-timing-function: linear; 111 | animation-iteration-count: infinite; 112 | animation-direction: alternate; 113 | } 114 | 115 | #network { 116 | color: #2aa198; 117 | /* border-radius: 0px 10px 10px 0px; */ 118 | } 119 | 120 | #memory { 121 | color: #2aa000; 122 | } 123 | 124 | #cpu { 125 | color: #7aa2f7; 126 | } 127 | 128 | #memory.critical { 129 | background-color: #f53c3c; 130 | color: #ffffff; 131 | animation-name: blink; 132 | animation-duration: 0.5s; 133 | animation-timing-function: linear; 134 | animation-iteration-count: infinite; 135 | animation-direction: alternate; 136 | } 137 | 138 | #temperature { 139 | color: #d08770; 140 | } 141 | 142 | #pulseaudio { 143 | color: #ebcb8b; 144 | } 145 | 146 | #bluetooth { 147 | color: #268bd2; 148 | } 149 | 150 | #custom-todo { 151 | color: #7AA2F7; 152 | /* border-radius: 10px 0px 0px 10px; */ 153 | } 154 | --------------------------------------------------------------------------------