diff --git a/atom.xml b/atom.xml index d285cec..bc02d17 100644 --- a/atom.xml +++ b/atom.xml @@ -43,39 +43,33 @@ See, once you have a working system, there isn’t a need to keep on configu

A C Compiler:

Most likely, you’ll want gcc. It’s the most common C compiler everyone gets.

If you’re on a Debian-based system (like Mint), you can usually get this and other essential tools by installing build-essential.

-
┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
-| $ sudo apt install build-essential                                                                  |
-└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
-
+
+
$ sudo apt install build-essential
+

For Arch users (for the “I use Arch btw” furries):

-
┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
-| $ sudo pacman -S base-devel                                                                         |
-└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
-
+
+
$ sudo pacman -S base-devel
+

And for Fedora folks:

-
┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
-| $ sudo dnf group install "Development Tools" "Development Libraries"                                |
-└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
-
+
+
$ sudo dnf group install "Development Tools" "Development Libraries"
+

Make:

This is a build automation tool that will, well, “make” dwm for you. It usually comes with the build-essential or base-devel packages.

LibX11 development files:

DWM interacts with the X Window System, so you’ll need the development headers for it. Often called something like libx11-dev or libX11-devel.

Debian:

-
┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
-| $ sudo apt install libx11-dev libxft-dev libxinerama-dev                                            |
-└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
-
+
+
$ sudo apt install libx11-dev libxft-dev libxinerama-dev
+

Arch:

-
┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
-| $ sudo pacman -S libx11 libxft libxinerama                                                          |
-└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
-
+
+
$ sudo pacman -S libx11 libxft libxinerama
+

Fedora:

-
┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
-| $ sudo dnf install libX11-devel libXft-devel libXinerama-devel                                      |
-└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
-
+
+
$ sudo dnf install libX11-devel libXft-devel libXinerama-devel
+

(Note: libxft-dev is for font rendering and libxinerama-dev is handy for multi-monitor setups, which you’ll probably want later on!)

Got all that? Sweet!

Getting the Goods (The Source Code!)

@@ -91,10 +85,9 @@ However I recommend personally to get their official The Infamous config.h

This is where the magic happens, folks. config.def.h is the default configuration. You’re not supposed to edit this directly. Instead, you copy it to config.h:

-
┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
-| $ cp config.def.h config.h                                                                          |
-└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
-
+
+
$ cp config.def.h config.h
+

Now, config.h is your personal configuration file. Open it up with your favorite text editor. You’ll see C arrays defining your keys, your tags, your fonts, your colors. It might look a bit intimidating at first, but it’s surprisingly straightforward.

For now, don’t change anything. Let’s just get it built!

@@ -102,37 +95,34 @@ It might look a bit intimidating at first, but it’s surprisingly straightf

Still in your dwm directory? Good. Time to compile! This is the part that sounds scary but is usually super simple thanks to the Makefile.

To compile and install it system-wide:

-
┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
-| $ sudo make clean install                                                                           |
-└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
-
+
+
$ sudo make clean install
+

Or, if you prefer not to install it system-wide immediately yet (which is a good idea for testing):

-
┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
-| $ make                                                                                              |
-└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
-
+
+
$ make
+

If all your prerequisites were met, this should complete without errors. You’ll now have a dwm executable file in the directory (and runnable in your terminal if you ran the system wide installation)!

To run dwm, you’ll typically need to configure your .xinitrc file to launch it. For example, you could add this line to your ~/.xinitrc:

-
┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
-| exec dwm                                                                                            |
-└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
-
+
+
exec dwm
+

For the people who run a Display Manager which is more likely (i.e gdm, sddm, lightdm, etc.). You’ll need to create a .desktop file. This file basically has the information and stuff for the thing to see and run it. You’ll need to create one in the /usr/share/xsessions/. And here’s an example dwm.desktop for reference:

/usr/share/xsessions/dwm.desktop:

-
┌────────────────────────────────────┐
-|   [Destop Entry]                   | 
-|   Encoding=UTF-8                   |
-|   Name=dwm                         |
-|   Comment=Dynamic window manager   |
-|   Exec=dwm                         |
-|   Icon=dwm                         |
-|   Type=XSession                    |
-└────────────────────────────────────┘
+
+
[Destop Entry] 
+Encoding=UTF-8
+Name=dwm
+Comment=Dynamic window manager
+Exec=dwm
+Icon=dwm
+Type=XSession
 
+

The default keybinding for the Terminal is Alt+Shift+Return. Any other keybindings can be found in config.h, it shouldn’t be hard to understand the giant struct declaration. Comments left by the suckless team are your friends! Read them!

Uh Oh, It’s Plain! Time for Patches!

@@ -140,11 +130,11 @@ understand the giant struct declaration. Comments left by the suckless team are

Aha! You’ve stumbled upon the next layer of the suckless philosophy: patching.

Instead of bloating the core dwm code with every feature under the sun, the suckless community maintains a collection of patches. These are .diff files that you apply to your source code to add specific functionalities.

-
    Want gaps between windows? There's a patch for that.
-    Want clickable status bar elements? Patch!
-    Want windows to swallow terminals? Patch!
-    Want your bar at the bottom? You guessed it, patch!
-
+

Want gaps between windows? There's a patch for that.
+ Want clickable status bar elements? Patch!
+ Want windows to swallow terminals? Patch!
+ Want your bar at the bottom? You guessed it, patch!
+

This is where the “do it yourself” ethos really shines. You pick and choose exactly what you want. However it might be daunting for some people. And unfortunately, many patches don’t really like to work together. If you want a nice dwm patching experience, I would use this one, he’s the same creator as st-flexipatch and other “flexipatch” series. Basically, all you do is edit the patches.h file @@ -159,20 +149,18 @@ which allows you to run commands automatically when dwm starts (I highly reccome

  • Download the Patch: Download the .diff file for the patch. Save it somewhere, perhaps in a patches subdirectory within your dwm source folder.

  • Apply the Patch: In your dwm source directory, use the patch command:

  • -
    ┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
    -| $ patch -Np1 -i /path/to/patchfile.diff                                                             |
    -└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
    -
    +
    +
    $ patch -Np1 -i /path/to/patchfile.diff
    +
    1. Resolve Conflicts (If Any): Sometimes, patches might conflict, especially if they modify the same lines of code or if you’re applying a patch meant for an older version of dwm. This will result in .rej (rejected) files. You’ll need to manually edit the source files to resolve these conflicts, looking at the .rej files to see what couldn’t be applied. This is the trickiest part, but it gets easier with practice. Start with simple, popular patches.

    2. Recompile: After applying a patch (and resolving any conflicts), you need to recompile!

    -
    ┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
    -| $ sudo make clean install                                                                           |
    -└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
    -
    +
    +
    $ sudo make clean install
    +

    And that’s the patching dance! It can be a bit fiddly, especially when patches conflict, but it gives you incredible control over your window manager. Also, a quick note! Some patches might change the config.def.h, add these new changes to your config.h since they are default configs for the new patches.

    Next Steps & The Suckless Mentality

    diff --git a/blog4.html b/blog4.html index b7c6657..c4f57da 100644 --- a/blog4.html +++ b/blog4.html @@ -65,39 +65,33 @@ See, once you have a working system, there isn’t a need to keep on configu

    A C Compiler:

    Most likely, you’ll want gcc. It’s the most common C compiler everyone gets.

    If you’re on a Debian-based system (like Mint), you can usually get this and other essential tools by installing build-essential.

    -
    ┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
    -| $ sudo apt install build-essential                                                                  |
    -└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
    -
    +
    +
    $ sudo apt install build-essential
    +

    For Arch users (for the “I use Arch btw” furries):

    -
    ┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
    -| $ sudo pacman -S base-devel                                                                         |
    -└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
    -
    +
    +
    $ sudo pacman -S base-devel
    +

    And for Fedora folks:

    -
    ┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
    -| $ sudo dnf group install "Development Tools" "Development Libraries"                                |
    -└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
    -
    +
    +
    $ sudo dnf group install "Development Tools" "Development Libraries"
    +

    Make:

    This is a build automation tool that will, well, “make” dwm for you. It usually comes with the build-essential or base-devel packages.

    LibX11 development files:

    DWM interacts with the X Window System, so you’ll need the development headers for it. Often called something like libx11-dev or libX11-devel.

    Debian:

    -
    ┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
    -| $ sudo apt install libx11-dev libxft-dev libxinerama-dev                                            |
    -└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
    -
    +
    +
    $ sudo apt install libx11-dev libxft-dev libxinerama-dev
    +

    Arch:

    -
    ┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
    -| $ sudo pacman -S libx11 libxft libxinerama                                                          |
    -└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
    -
    +
    +
    $ sudo pacman -S libx11 libxft libxinerama
    +

    Fedora:

    -
    ┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
    -| $ sudo dnf install libX11-devel libXft-devel libXinerama-devel                                      |
    -└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
    -
    +
    +
    $ sudo dnf install libX11-devel libXft-devel libXinerama-devel
    +

    (Note: libxft-dev is for font rendering and libxinerama-dev is handy for multi-monitor setups, which you’ll probably want later on!)

    Got all that? Sweet!

    Getting the Goods (The Source Code!)

    @@ -113,10 +107,9 @@ However I recommend personally to get their official The Infamous config.h

    This is where the magic happens, folks. config.def.h is the default configuration. You’re not supposed to edit this directly. Instead, you copy it to config.h:

    -
    ┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
    -| $ cp config.def.h config.h                                                                          |
    -└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
    -
    +
    +
    $ cp config.def.h config.h
    +

    Now, config.h is your personal configuration file. Open it up with your favorite text editor. You’ll see C arrays defining your keys, your tags, your fonts, your colors. It might look a bit intimidating at first, but it’s surprisingly straightforward.

    For now, don’t change anything. Let’s just get it built!

    @@ -124,37 +117,34 @@ It might look a bit intimidating at first, but it’s surprisingly straightf

    Still in your dwm directory? Good. Time to compile! This is the part that sounds scary but is usually super simple thanks to the Makefile.

    To compile and install it system-wide:

    -
    ┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
    -| $ sudo make clean install                                                                           |
    -└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
    -
    +
    +
    $ sudo make clean install
    +

    Or, if you prefer not to install it system-wide immediately yet (which is a good idea for testing):

    -
    ┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
    -| $ make                                                                                              |
    -└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
    -
    +
    +
    $ make
    +

    If all your prerequisites were met, this should complete without errors. You’ll now have a dwm executable file in the directory (and runnable in your terminal if you ran the system wide installation)!

    To run dwm, you’ll typically need to configure your .xinitrc file to launch it. For example, you could add this line to your ~/.xinitrc:

    -
    ┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
    -| exec dwm                                                                                            |
    -└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
    -
    +
    +
    exec dwm
    +

    For the people who run a Display Manager which is more likely (i.e gdm, sddm, lightdm, etc.). You’ll need to create a .desktop file. This file basically has the information and stuff for the thing to see and run it. You’ll need to create one in the /usr/share/xsessions/. And here’s an example dwm.desktop for reference:

    /usr/share/xsessions/dwm.desktop:

    -
    ┌────────────────────────────────────┐
    -|   [Destop Entry]                   | 
    -|   Encoding=UTF-8                   |
    -|   Name=dwm                         |
    -|   Comment=Dynamic window manager   |
    -|   Exec=dwm                         |
    -|   Icon=dwm                         |
    -|   Type=XSession                    |
    -└────────────────────────────────────┘
    +
    +
    [Destop Entry] 
    +Encoding=UTF-8
    +Name=dwm
    +Comment=Dynamic window manager
    +Exec=dwm
    +Icon=dwm
    +Type=XSession
     
    +

    The default keybinding for the Terminal is Alt+Shift+Return. Any other keybindings can be found in config.h, it shouldn’t be hard to understand the giant struct declaration. Comments left by the suckless team are your friends! Read them!

    Uh Oh, It’s Plain! Time for Patches!

    @@ -162,11 +152,11 @@ understand the giant struct declaration. Comments left by the suckless team are

    Aha! You’ve stumbled upon the next layer of the suckless philosophy: patching.

    Instead of bloating the core dwm code with every feature under the sun, the suckless community maintains a collection of patches. These are .diff files that you apply to your source code to add specific functionalities.

    -
        Want gaps between windows? There's a patch for that.
    -    Want clickable status bar elements? Patch!
    -    Want windows to swallow terminals? Patch!
    -    Want your bar at the bottom? You guessed it, patch!
    -
    +

    Want gaps between windows? There's a patch for that.
    + Want clickable status bar elements? Patch!
    + Want windows to swallow terminals? Patch!
    + Want your bar at the bottom? You guessed it, patch!
    +

    This is where the “do it yourself” ethos really shines. You pick and choose exactly what you want. However it might be daunting for some people. And unfortunately, many patches don’t really like to work together. If you want a nice dwm patching experience, I would use this one, he’s the same creator as st-flexipatch and other “flexipatch” series. Basically, all you do is edit the patches.h file @@ -181,20 +171,18 @@ which allows you to run commands automatically when dwm starts (I highly reccome

  • Download the Patch: Download the .diff file for the patch. Save it somewhere, perhaps in a patches subdirectory within your dwm source folder.

  • Apply the Patch: In your dwm source directory, use the patch command:

  • -
    ┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
    -| $ patch -Np1 -i /path/to/patchfile.diff                                                             |
    -└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
    -
    +
    +
    $ patch -Np1 -i /path/to/patchfile.diff
    +
    1. Resolve Conflicts (If Any): Sometimes, patches might conflict, especially if they modify the same lines of code or if you’re applying a patch meant for an older version of dwm. This will result in .rej (rejected) files. You’ll need to manually edit the source files to resolve these conflicts, looking at the .rej files to see what couldn’t be applied. This is the trickiest part, but it gets easier with practice. Start with simple, popular patches.

    2. Recompile: After applying a patch (and resolving any conflicts), you need to recompile!

    -
    ┌─────────────────────────────────────────────────────────────────────────────────────────────────────┐
    -| $ sudo make clean install                                                                           |
    -└─────────────────────────────────────────────────────────────────────────────────────────────────────┘
    -
    +
    +
    $ sudo make clean install
    +

    And that’s the patching dance! It can be a bit fiddly, especially when patches conflict, but it gives you incredible control over your window manager. Also, a quick note! Some patches might change the config.def.h, add these new changes to your config.h since they are default configs for the new patches.

    Next Steps & The Suckless Mentality

    diff --git a/template.css b/template.css index 49f4d1b..296186f 100644 --- a/template.css +++ b/template.css @@ -33,3 +33,23 @@ section > p time, article { color: #fff; } article > header { display: none; } footer { color: #aaa; } + +.terminal-output { + background-color: #111; + color: #e0e0e0; + border: 2px solid #888; + padding: 1em; + margin: 1.4em 0; +} + +.terminal-output pre { + margin: 0; + padding: 0; + overflow-x: auto; + white-space: pre; + background-color: transparent; + color: inherit; + font-family: inherit; + font-size: 0.95em; + line-height: 1.5; +}