Skip to content

Instantly share code, notes, and snippets.

@igavrysh
Last active September 12, 2024 23:10
Show Gist options
  • Save igavrysh/0bdca0741c521624e087b3950954f295 to your computer and use it in GitHub Desktop.
Save igavrysh/0bdca0741c521624e087b3950954f295 to your computer and use it in GitHub Desktop.

This is todo list for my frame.work setup with sway etc.

Ideas list

Good sample setup:

Todo

  1. obs screen share is not working - cannot find how sway is started on my ubuntu. In the reddit: https://www.reddit.com/r/swaywm/comments/xldx5c/how_to_record_in_obs_studio_in_sway/ the talk about starting sway with some configs but I cannot find them as of now:
    I'll just copy paste what I wrote in a different thread:
    
    You need to have the xdg-desktop-portal and xdg-desktop-portal-wlr packages
    installed (that's what they're called on Arch, at least).
    
    Sway needs to be launched with the XDG_CURRENT_DESKTOP environment variable
    set to sway. I use the following wrapper script for this, which I place in ~/.local/bin/sway:
    
    #!/bin/bash
    export XDG_CURRENT_DESKTOP=sway
    exec /usr/bin/sway "$@"
    
    Finally, you need to run the XDG desktop portal by adding the following line
    to your Sway config:
    
    exec --no-startup-id /usr/lib/xdg-desktop-portal -r
    
    where login menu desktop environments options text file located in ubuntu 24.04
    
    ChatGPT
    In Ubuntu, the login menu desktop environments options are typically configured through the
    Display Manager. Ubuntu 24.04    is a future release, but assuming it follows the standard
    Ubuntu setup, the configurations for these options are likely      to be in the following locations:
    
    GDM (GNOME Display Manager):
    
    Configuration file: /etc/gdm3/custom.conf
    Sessions and desktop environments are typically stored in /usr/share/xsessions/ for X
    sessions and /usr/share/wayland-   sessions/ for Wayland sessions.
    LightDM (Light Display Manager):
    
    Configuration file: /etc/lightdm/lightdm.conf
    Session files are typically stored in /usr/share/xsessions/.
    For editing the desktop environment options available in the login menu, you would
    likely be looking at the session files    in /usr/share/xsessions/ or /usr/share/wayland-sessions/.
    Each desktop environment typically has a .desktop file in these    directories, defining the session.
    
    For example, you might find files like:
    
    /usr/share/xsessions/gnome.desktop
    /usr/share/xsessions/xfce.desktop
    /usr/share/wayland-sessions/gnome.desktop
    
  2. displaylink dock support:
    1. currently displaylink dock at my work (HP Dock G2) is not working with frame.work - I saw a couple posts in github with general suggestions on how to debug but still - to be studies
    2. to check if my home displaylink dock is working with sway
  3. tablet support for multimonitor setup, running manually bluetoothctrl solved the problem with pairing, however mapping problem still exists:
    1. when external monitor is connected, drawing tablet is mapped to both displays (laptop display + external) in extended way. whereas I want tablet to be mapped only to one monitor (at best, currently active/focused). There are couple instructions here, but they are kind of don't work: https://www.reddit.com/r/swaywm/comments/lgpity/map_wacom_tablet_to_active_monitor/ (e.g. manual mapping works, but autofocus does not)
  4. clamshell mode - when laptop is closed and connected to monitor - workspaces on closed display are not remppaed to external they stay within closed display - target behavior in clamshell mode - all workspaces should be remapped to external monitor https://www.reddit.com/r/swaywm/comments/eim1k1/conditional_clamshell_mode/ https://github.com/swaywm/sway/wiki#clamshell-mode - official guide has also some parts there
  5. clipboard - currently, copy paste in vim is not working when pasting externally, e.g. in browser (not always working)
  6. making screenshots? what app should be used?
  7. laptop setup automation with ansible? docker? https://frontendmasters.com/courses/developer-productivity/
  8. how to debug sway? how sway is launched from login screen (some commands in displaylink section might give ides how to push the log for sway into known file location)
  9. waybar is falling with segfault with when gnome is launched (e.g. gnome selected from login screen). Then logout gnome-login sway (without reboot) and waybar is not loading in sway - should I switch to standard bar by sway?
  10. change background?
  11. idle / hibernate mode - how to account for clamshell (login screen - I want it to be uniform and same across states e.g. in lock state currently shows sway lock screen (circle that is filled as you type password) vs initial start that shows standard gnome login (with prompt for entering login and password + selecting desktop env)
  12. how to start hibernate / sleep mode when lid is closed and no external keyboard / mouse / screen is connected?
  13. general sleep/hibernate issues - how to ensure that laptop hibernates on 5% left - how to ensure that laptop does not work when put in the bag with lid closed?
  14. cpu indicator on waybar always show 20 C degress - regardless of laptop temperature. Lm sensors work seemingly correctly (e.g. experimented with standard bar, lm sensors were showing 40-50 C degress when laptop was relatively hot - seems not too far from truth) - but block for couple seconds ?to read sensors info? - how to cache those values and update in background e.g. once per 30 sec, and read cached value from file in waybar or standard bar?
    1. Alexays/Waybar#2911
  15. traybar icon for bluetooth?
  16. cross out icon for audio muted state?
  17. waybar: laptop charging incon in waybar does not react instantly on plug in laptop action
  18. waybar: what does activated/deactivated crossed eye icon mean?
  19. waybar: show menu of top processes by memory / cpu whem memory or cpu usage is cliecked
  20. uniform reaction on hower / on click for way bar on icons
  21. uniform file manager / for viewing files / for save file as dialogs etc
  22. mako for system wide + app notifications
  23. how to introduce dark mode, e.g. default application/system/os level style/theme?
  24. swaylock: https://github.com/swaywm/swaylock

Solved

  1. Okular - used snap instead of sudo apt-get install okular - now icons in app are visible

    sudo snap install okular
    
  2. Connecting Wacom Intous One BT tablet by bluetooth: manually running search/pair/trust cycle with bluetoothctrl -

    sudo bluetoothctl
    # then in bluetoothctl console
    power on
    scan on
    pair <device_id>
    trust <device_id>
    

    without it standard bluetooth connect tool was pairing tablet, but stylus and buttons on table were not working (+installed blueman not sure how that affects the process)

  3. Keyboard layout - another language: added UA - Ukrainian as my native language - standard sway instructions in ~/.config/sway/config worked: some links I used: ' https://www.reddit.com/r/swaywm/comments/le3lg3/switching_keyboard_layout/

  4. java installation + update alternatives - used digital ocean instructions for java21 headless install

    sudo apt update
    sudo apt install default-jre
    java --version
    sudo apt install default-jdk
    javac --version
    sudo update-alternatives --config java
    sudo update-alternatives --config javac
    # add JAVA_HOME env based on update alternatives:
    sudo vim /etc/environment
    source /etc/environment
    echo $JAVA_HOME
    
  5. waybar was showing wrong icons/fonts, saved medium article in pdf doc in Documents

    # loaded fonts from here: https://fontawesome.com/download
    # used guide from here: https://medium.com/source-words/how-to-manually-install-update-and-uninstall-fonts-on-linux-a8d09a3853b0
    # put fonts in ~/.local/share/fonts folder
    mkdir ~/.local/share/fonts folder
    # ran rescan tool
    fc-cache -f -v
    
  6. for display manager: (way-displays: https://github.com/alex-courtis/way-displays)

    1. install libinput-dev

      sudo apt-get install libinput-dev
      sudo apt-cache serach libinput
      # ???
      sudo apt-get install -y libudev-dev
      pkg-config --modversion yaml-cpp
      sudo apt-get update --fix-missing
      
    2. needed to setup yaml-cpp to make it work: https://www.reddit.com/r/swaywm/comments/le3lg3/switching_keyboard_layout/ followed instructions from here to build + install yaml-cpp https://github.com/jbeder/yaml-cpp/blob/master/install.txt

      git clone https://github.com/jbeder/yaml-cpp.git
      
      *** With CMake ***
      yaml-cpp uses CMake to support cross-platform building. In a UNIX-like system, the basic steps to build are:
      1. Download and install CMake (if you don't have root privileges, just install to a local directory, like ~/bin)
      2. From the source directory, run:
          mkdir build
          cd build
          cmake ..
      and then the usual
          make
          make install
      3. To clean up, just remove the 'build' directory.
      *** Without CMake ***
      If you don't want to use CMake, just add all .cpp files to a makefile. yaml-cpp does not need any special build settings, so no 'configure' file is necessary.
      (Note: this is pretty tedious. It's sooo much easier to use CMake.)
      
cp /etc/way-displays/cfg.yaml ~/.config/way-displays/cfg.yaml
  1. clamshell mode:

https://github.com/swaywm/sway/wiki

Open the logind configuration file for editing:

sudo nano /etc/systemd/logind.conf

Edit the line for HandleLidSwitch. You need to change or add the following line to disable suspension:

HandleLidSwitch=ignore

This ensures that closing the lid does not trigger suspension.

lid sensor (lid closed): cat /proc/acpi/button/lid/LID0/state

brave sources list:

cd /etc/apt/sources.list.d/

installed the following tools:

sudo apt install dmenu
sudo apt install swaybg
sudo apt install swayidle
sudo apt install swaylock
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment