Skip to content

Commit 2de897e

Browse files
author
Ruben Kharel
committed
several changes
1 parent 251fb36 commit 2de897e

9 files changed

+126
-47
lines changed

src/_post/hyprland_productivity.toml

+5-36
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[Blog]
22
layout = "post"
33
title = "For the love of Tiling Window Managers (Hyprland)"
4-
description = "Say goodbye to cluttered screens and hello to smooth sailing"
4+
description = "Say goodbye to cluttered screens and hello to smooth sailing. Might be a flex post"
55
date = "2022-01-15T12:30:00+05:45"
66
tags = ["Linux"]
77
image = "img/postbanners/oss.png"
@@ -13,13 +13,13 @@ The joy and struggle of linux is found in its freedom. The joy of using what you
1313
1414
### Journey
1515
16-
I used to jump from one Linux distribution to another, always looking for the perfect desktop. I didn't know much about window managers or desktop environments back then. I tried popular options like GNOME and KDE, but nothing felt quite right.
16+
I used to jump from one Linux distribution to another, always looking for the perfect desktop. I didn't know much about window managers or desktop environments back then. I tried popular options like GNOME and KDE and XFCE but none feel much polished. (Controversial statement ik. but its subjective)
1717
18-
Then I discovered i3, my first tiling window manager. At first, it was strange. Everything was controlled by keyboard shortcuts, and I had to learn a whole new way of managing windows. It was tough at the beginning, but after a few days, something clicked.
18+
Then I discovered i3, my first tiling window manager. At first, it was strange. Everything was controlled with keyboard shortcuts, and I had to learn a whole new way of managing windows. It was tough at the beginning, but after a few days... my muscle memory was learning.
1919
2020
I felt the need of mouse to move around was little to none. Windows automatically organized themselves on the screen, and I could do everything with just the keyboard. It was so much faster and more efficient.
2121
22-
I was amazed by how simple and elegant it was. I was hooked on tiling window managers, and I knew I wouldn't go back. (and i cannot atm, because i find other WM unusable now)
22+
I was amazed by how simple and elegant it was. I was hooked on tiling window managers, and I knew I wouldn't go back. (and i cannot atm, because i find other WM hard to navigate now)
2323
2424
### Tiling Window Manager
2525
@@ -33,7 +33,6 @@ Let's look at the below screenshot to give a gist of what it is.
3333
![Dwm-screenshot](https://en.wikipedia.org/wiki/Tiling_window_manager#/media/File:Dwm-screenshot.png)
3434
3535
36-
3736
### Journy continues on Tiling WM
3837
3938
For many, the journey into the world of tiling window managers begins with the renowned [i3wm](https://i3wm.org/). It's a fantastic option, known for its stability and robust features, especially for those using the [X11 display server](https://www.x.org/wiki/). However, as I got into [Wayland](https://wayland.freedesktop.org/), the search for the perfect tiling companion continued. While [Sway](https://swaywm.org/) presented itself as a compelling alternative with its i3-compatible configuration, my exploration ultimately led me to [Hyprland](https://hyprland.org/).
@@ -42,8 +41,7 @@ For many, the journey into the world of tiling window managers begins with the r
4241
4342
Hyprland caught my eye because it's a really attractive window manager, even without any extra setup. It's exactly what I was looking for: a customizable yet beautiful window manager.
4443
45-
Hyprland is special because it lets you personalize almost everything while still being easy to use and **looking great**. It's similar to other window managers in what it can do, but it stands out because it runs so smoothly. ([not sure if you have nvidia](https://www.youtube.com/watch?v=xPh-5P4XH6o))
46-
44+
Hyprland is special because it lets you personalize almost everything while still being easy to use and **looking great**. It's similar to other window managers in what it can do, But I will lean towards Hyprland because it looks amazing with its animation and all that. ([not sure if you have nvidia](https://www.youtube.com/watch?v=xPh-5P4XH6o))
4745
4846
#### Setup hyprland
4947
@@ -86,33 +84,4 @@ While the basic features of Hyprland are powerful on their own, there's so much
8684
Hyprland has been a game-changer for me. It's fast, efficient, and beautiful, and it has completely transformed the way I work on my computer. If you're looking to supercharge your productivity and streamline your workflow, I highly recommend giving Hyprland (Or any other tiling window manager) a try.
8785
8886
I encourage you to explore the world of tiling window managers and find what works best for you. It may take some time to
89-
90-
==== Outline ====
91-
- opening window
92-
- moving windows
93-
- resizing windows
94-
- changing workspaces
95-
- secret workspace
96-
- bindings
97-
98-
99-
---
100-
101-
Provide a basic overview of the installation process (depending on the user's distro).
102-
Mention any dependencies or configuration files needed.
103-
Point to resources like the official documentation or community guides.
104-
Hyprland in Action:
105-
106-
Showcase your personal Hyprland setup with screenshots or even a short video demonstration.
107-
Highlight your favorite features and customizations.
108-
Explain how Hyprland improves your workflow and productivity.
109-
Beyond the Basics:
110-
111-
Discuss more advanced Hyprland features like scripting, custom layouts, and integrations with other tools.
112-
Offer tips and tricks for optimizing your Hyprland experience.
113-
Conclusion:
114-
115-
Summarize your overall experience with Hyprland and why you recommend it.
116-
Encourage readers to explore the world of tiling window managers and find what works best for them.
117-
End with a call to action, inviting readers to share their own Hyprland setups or ask questions.
11887
"""

src/_post/published/aws_ses.toml

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ title = "Tips to get out of AWS SES sandbox environment."
33
description = "If you are struggling with getting access to production environment for AWS SES, then this post might be helpful for you."
44
date = "2023-01-24T01:04:03+05:45"
55
tags = ["AWS"]
6+
slug = "tips-to-get-out-of-aws-ses-sandbox-environment"
67
image = "img/postbanners/awsses.png"
78
markdown = """
89
# Getting out of AWS SES sandbox environment

src/_post/published/notes-iproute.toml

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ title = "Routing Traffic to Raspberry Pi via VPS and WireGuard: IPTables Setup N
33
description = "I wrote some notes while setting up port forwarding for my Raspberry Pi. After facing issues, I used a public VPS and connected my Raspberry Pi to the network with WireGuard. These notes detail the IPTables configuration to route traffic from the VPS to the Raspberry Pi."
44
date = "2024-05-15"
55
tags = ["iptables", "raspberrypi", "port forwarding", "vps", "wireguard"]
6+
slug = "routing-traffic-to-raspberrypi-via-vps-wireguard-iptable-setup-notes"
67
image = "img/postbanners/python_plus_toml.png"
78
markdown = """
89
## Routing Traffic from WAN to a Local Network Device using IPTables

src/_post/published/py_publish.toml

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
title = "Python Packaging and Publishing CLI Package with pyproject.toml"
33
description = "This blog is focused on step to step guide to package and publish python CLI tool/package with pyproject.toml."
44
date = "2023-04-07 11:12:03 +0545"
5+
slug = "python-packaging-and-publishing-cli-package-with-pyproject"
56
tags = ["Python"]
67
image = "img/postbanners/python_plus_toml.png"
78
markdown = """

src/_post/published/sane_apps.toml

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
[Blog]
22
title = "Apps that keeps me sane"
33
date = "2022-01-15T12:30:00+05:45"
4+
slug = "apps-that-keeps-me-sane"
45
image = "img/postbanners/oss.png"
56
description = "The list of apps and softwares I use."
67
tags = ["Opensource"]

src/_post/published/spf_dkim.toml

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
[Blog]
22
title = "What is SPF, DKIM and DMARC?"
33
description = "Let's understand the ABC of email security."
4+
slug = "what-is-spf-dkim-dmarc"
45
date = "2023-05-03 04:03:03 +0545"
56
tags = ["EmailSecurity"]
67
image = "img/postbanners/secure-email.jpg"

src/_post/temp.md

+78
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
`
2+
The joy and struggle of linux is found in its freedom. The joy of using what you like. The struggle of finding what that is.`
3+
4+
- u/Own-Cupcake7586
5+
6+
### Journey
7+
8+
I used to jump from one Linux distribution to another, always looking for the perfect desktop. I didn't know much about window managers or desktop environments back then. I tried popular options like GNOME and KDE and XFCE but none feel much polished. (Controversial statement ik. but its subjective)
9+
10+
Then I discovered i3, my first tiling window manager. At first, it was strange. Everything was controlled with keyboard shortcuts, and I had to learn a whole new way of managing windows. It was tough at the beginning, but after a few days... my muscle memory was learning.
11+
12+
I felt the need of mouse to move around was little to none. Windows automatically organized themselves on the screen, and I could do everything with just the keyboard. It was so much faster and more efficient.
13+
14+
I was amazed by how simple and elegant it was. I was hooked on tiling window managers, and I knew I wouldn't go back. (and i cannot atm, because i find other WM hard to navigate now)
15+
16+
### Tiling Window Manager
17+
18+
https://en.wikipedia.org/wiki/Tiling_window_manager
19+
20+
Wikipedia defines a tiling window manager as a system that organizes windows into non-overlapping frames, unlike the usual way of stacking windows on top of each other. That's exactly what it is, But let's break it down into simpler terms for the less geeky peps.
21+
22+
Let's look at the below screenshot to give a gist of what it is.
23+
24+
25+
![Dwm-screenshot](https://en.wikipedia.org/wiki/Tiling_window_manager#/media/File:Dwm-screenshot.png)
26+
27+
28+
### Journy continues on Tiling WM
29+
30+
For many, the journey into the world of tiling window managers begins with the renowned [i3wm](https://i3wm.org/). It's a fantastic option, known for its stability and robust features, especially for those using the [X11 display server](https://www.x.org/wiki/). However, as I got into [Wayland](https://wayland.freedesktop.org/), the search for the perfect tiling companion continued. While [Sway](https://swaywm.org/) presented itself as a compelling alternative with its i3-compatible configuration, my exploration ultimately led me to [Hyprland](https://hyprland.org/).
31+
32+
### ...and now Hyprland
33+
34+
Hyprland caught my eye because it's a really attractive window manager, even without any extra setup. It's exactly what I was looking for: a customizable yet beautiful window manager.
35+
36+
Hyprland is special because it lets you personalize almost everything while still being easy to use and **looking great**. It's similar to other window managers in what it can do, But I will lean towards Hyprland because it looks amazing with its animation and all that. ([not sure if you have nvidia](https://www.youtube.com/watch?v=xPh-5P4XH6o))
37+
38+
#### Setup hyprland
39+
40+
[official documentation](https://wiki.hyprland.org/Getting-Started/Installation/) to setup hyprland is here if you happen to try it out.
41+
42+
##### Opening window
43+
44+
To open a new window, press `mod+enter`. This opens a terminal by default, but you can customize it to open any application you want. It's a quick and easy way to launch programs without using the mouse.
45+
46+
##### Moving windows
47+
48+
To move a window, press `mod+shift+arrow keys`. This allows you to quickly rearrange windows on the screen. It's a simple but powerful feature that makes multitasking a breeze.
49+
50+
##### Resizing windows
51+
52+
To resize a window, press `mod+r` to enter resize mode, then use the arrow keys to adjust the size. This is a great way to customize your workspace and make the most of your screen real estate.
53+
54+
##### Changing workspaces
55+
56+
To switch between workspaces, press `mod+number`. This lets you organize your windows into different groups, so you can keep your workflow organized and efficient.
57+
58+
##### Secret workspace
59+
60+
Hyprland has a secret workspace feature that lets you hide windows from view. To activate it, press `mod+shift+s`. This is a handy way to keep your desktop clutter-free and focus on the task at hand.
61+
62+
##### Bindings
63+
64+
Hyprland lets you create custom key bindings to suit your workflow. You can remap keys, create new shortcuts, and customize the window manager to your heart's content. This level of customization is what sets Hyprland apart from other window managers.
65+
66+
### Beyond the Basics
67+
68+
While the basic features of Hyprland are powerful on their own, there's so much more you can do with this window manager. Here are a few advanced features that can take your productivity to the next level:
69+
70+
- **Scripting**: Hyprland supports scripting languages like Python and Lua, allowing you to automate tasks and create custom workflows.
71+
- **Custom layouts**: You can create custom layouts to organize your windows in unique ways. This is great for multitasking and keeping your workspace tidy.
72+
- **Integrations**: Hyprland integrates with other tools and applications, allowing you to create a seamless workflow across different programs.
73+
74+
### Conclusion
75+
76+
Hyprland has been a game-changer for me. It's fast, efficient, and beautiful, and it has completely transformed the way I work on my computer. If you're looking to supercharge your productivity and streamline your workflow, I highly recommend giving Hyprland (Or any other tiling window manager) a try.
77+
78+
I encourage you to explore the world of tiling window managers and find what works best for you. It may take some time to

src/pages/blog.rs

+26-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1+
use std::fmt::format;
2+
13
use egui_commonmark::{CommonMarkCache, CommonMarkViewer};
24
use include_dir::{include_dir, Dir};
35

4-
use crate::custom_widgets::{powered_by_egui_and_eframe, footer};
6+
use crate::custom_widgets::{footer, powered_by_egui_and_eframe};
57

68
#[derive(Debug, serde::Deserialize, serde::Serialize)]
79
pub struct Blogs {
@@ -17,6 +19,7 @@ pub struct Blog {
1719
pub tags: Vec<String>,
1820
pub markdown: String,
1921
pub show_full: bool,
22+
pub slug: String,
2023
}
2124

2225
impl Blog {
@@ -27,6 +30,7 @@ impl Blog {
2730
description: String,
2831
tags: Vec<String>,
2932
markdown: String,
33+
slug: String,
3034
) -> Self {
3135
Blog {
3236
title,
@@ -36,6 +40,7 @@ impl Blog {
3640
tags,
3741
markdown,
3842
show_full: false,
43+
slug,
3944
}
4045
}
4146
}
@@ -65,6 +70,7 @@ impl Default for Blogs {
6570

6671
let blog_item = blog_toml["Blog"].as_table().unwrap();
6772
let title = blog_item["title"].as_str().unwrap().to_string();
73+
let slug = blog_item["slug"].as_str().unwrap().to_string();
6874
let date = blog_item["date"].as_str().unwrap().to_string();
6975
let image = blog_item["image"].as_str().unwrap().to_string();
7076
let description = blog_item["description"].as_str().unwrap().to_string();
@@ -76,7 +82,7 @@ impl Default for Blogs {
7682
.collect();
7783
let markdown = blog_item["markdown"].as_str().unwrap().to_string();
7884

79-
let blog = Blog::new(title, date, image, description, tags, markdown);
85+
let blog = Blog::new(title, date, image, description, tags, markdown, slug);
8086
blogs.all_blogs.push(blog);
8187
});
8288
blogs
@@ -130,13 +136,24 @@ impl eframe::App for BlogPage {
130136
eframe::set_value(storage, eframe::APP_KEY, self);
131137
}
132138

133-
fn update(&mut self, ctx: &egui::Context, _frame: &mut eframe::Frame) {
139+
fn update(&mut self, ctx: &egui::Context, frame: &mut eframe::Frame) {
134140
egui::CentralPanel::default().show(ctx, |ui| {
135141
footer(ui);
136142

137143
powered_by_egui_and_eframe(ui);
138-
// let mut cache = CommonMarkCache::default();
144+
139145
for blog in &mut self.blogs.all_blogs {
146+
#[cfg(target_arch = "wasm32")]
147+
if let Some(slug) = frame.info().web_info.location.hash.strip_prefix('#') {
148+
let parts: Vec<&str> = slug.split("/").collect();
149+
150+
if parts.len() == 2 && parts[0] == "Blog" {
151+
if parts[1] == blog.slug {
152+
blog.show_full = true;
153+
}
154+
}
155+
}
156+
140157
egui::Window::new(blog.title.clone())
141158
.enabled(true)
142159
.collapsible(true)
@@ -154,6 +171,7 @@ impl eframe::App for BlogPage {
154171
if &blog.show_full == &true {
155172
if ui.button("Collapse").clicked() {
156173
blog.show_full = false;
174+
ui.ctx().open_url(egui::OpenUrl::same_tab(format!("#Blog")));
157175
}
158176
egui::ScrollArea::vertical().show(ui, |ui| {
159177
CommonMarkViewer::new(blog.title.clone()).show(
@@ -165,6 +183,10 @@ impl eframe::App for BlogPage {
165183
} else {
166184
if ui.button("Read More").clicked() {
167185
blog.show_full = true;
186+
ui.ctx().open_url(egui::OpenUrl::same_tab(format!(
187+
"#Blog/{}",
188+
blog.slug
189+
)));
168190
}
169191
}
170192
});

0 commit comments

Comments
 (0)