Skip to content

Instantly share code, notes, and snippets.

@lidgnulinux
lidgnulinux / INSTALL.md
Last active July 10, 2024 22:10
Install Cosmic Desktop for Ubuntu and Debian Sid.

INSTALLATION GUIDE

Download packages

We borrow rpm packages from fedora 40, because we won't build all components ourselves. Download all packages using wget !

$ wget -ci packages.txt
@lidgnulinux
lidgnulinux / post-install.md
Last active July 3, 2024 03:16
Post-installation guide openbsd.

Openbsd post-installation guide.

  • Boot openbsd from linux's grub.

    We can boot openbsd via linux's grub. These are how we can boot openbsd via linux's grub :

    • Enter grub !
    • Press "c" to enter grub shell !
    • List all partitions using ls command !
  • Because I install openbsd at /dev/sda1, so my partition will be shown as "hd0,msdos1".

@lidgnulinux
lidgnulinux / dhcpcd
Created June 4, 2024 02:30
Example of wpasupplicant & dhcpcd service file for dinit.
# dhcpcd service
type = process
command = /usr/bin/dhcpcd -B -M -j /var/log/dhcpcd-service.log wlp3s0
before = network.target
depends-on = pre-network.target
restart = true
logfile = /var/log/dhcpcd.log
@lidgnulinux
lidgnulinux / wayland_list_window_s.sh
Created May 20, 2024 02:46
Show list of window(s) for wayland compositor. The compositor may need to implement foreign-toplevel protocol.
#!/usr/bin/bash
window_list=$(wlrctl toplevel list | awk '{ print substr($0, index($0,$2)) }')
selected=$(echo "$window_list" | wofi -d)
wlrctl toplevel focus title:"$selected"
# Note :
# We need to use "title" rather than "app_id" to avoid window with same app_id.
@lidgnulinux
lidgnulinux / gist_awk_print_2nd_to_last.md
Created May 20, 2024 02:09
Print second column to last column using awk.

Using awk to print second column to last column.

$ echo "first second third N69 NeNN" | awk '{ print substr($0, index($0,$2)) }'

The output will be :

second third N69 NeNN
@lidgnulinux
lidgnulinux / flip_vertical.effect
Created May 18, 2024 05:35
Flip vertical effect for upside-down webcam.
[Effect]
Name[en_GB]=Flip_Vertical
Name=Flip_Vertical
Comment[en_GB]=Flip the image vertically (Silly fix for upside down webcam)
Comment=Flip the image vertically (Silly fix for upside down webcam)
Category=Geometry;
PipelineDescription=videoflip video-direction=vert
@lidgnulinux
lidgnulinux / gvim_trick_1.md
Created May 12, 2024 01:41
GVIM simple trick (Copy and paste on terminal).

Using GVIM as alternative terminal. (Part I).

Copy and paste on terminal.

Copy.

  • To copy, press and hold the shift button and start to select our desired texts !

Paste

Using dracut as default on archlinux instead of mkinitcpio ? Here a simple guide.

PS : you can check it on archwiki actually.

Installation.

Assumming you still don't have dracut and mkinitcpio, you can install dracut using pacman.

@lidgnulinux
lidgnulinux / Launch_ubuntu_gnome_wayland_without_display_manager.md
Created May 3, 2024 01:54
Alternative way to launch Ubuntu GNOME without display manager.

How to Launch Ubuntu GNOME (Wayland) without Display Manager.

I'm not a fans of display manager (GDM, Lightdm, SDDM, etc), though for some people they could be usefull. When I'm using debian, slackware, alpine, I can launch GNOME desktop without display manager (I use tbsm / terminal based session manager). Strangely when I move to Ubuntu, I'm kind of forced to use display manager (GDM, in this case). So I tried several commands to launch ubuntu GNOME directly from tty and gladly I found it. I just need to use this command :

@lidgnulinux
lidgnulinux / netplan-example.yaml
Last active July 10, 2024 09:09
Netplan Example.
network:
wifis:
YOUR_WIRELESS_INTERFACE:
dhcp4: yes
dhcp6: yes
access-points:
"YOUR_SSID":
password: "YOUR_PASSWORD"
"YOUR_SSID":
auth: