Giter Club home page Giter Club logo

swaywsr's People

Contributors

ammgws avatar azuline avatar newam avatar pedroscaff avatar ram02z avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

swaywsr's Issues

get class error: MissingInformation("Node{...}")

Launched in foreground, I have noticed get class error: MissingInformation("Node{...}") repeatedly returned to stdout.

Here, {...} is:

{
    id: 69,
    name: None,
    node_type: Con,
    border: None,
    current_border_width: 0,
    layout: SplitH,
    percent: Some(1.0),
    rect: Rect { x: 0, y: 26, width: 1920, height: 1054 },
    window_rect: Rect { x: 0, y: 0, width: 0, height: 0 },
    deco_rect: Rect { x: 0, y: 0, width: 0, height: 0 },
    geometry: Rect { x: 0, y: 0, width: 0, height: 0 },
    urgent: false,
    focused: false,
    focus: [9],
    nodes: [Node {
      id: 9,
      name: Some(\"SP  Mozilla Firefox\"),
      node_type: Con,
      border: Pixel,
      current_border_width: 4,
      layout: None,
      percent: Some(1.0),
      rect: Rect { x: 0, y: 26, width: 1920, height: 1054 },
      window_rect: Rect { x: 0, y: 4, width: 1920, height: 1054 },
      deco_rect: Rect { x: 0, y: 0, width: 0, height: 0 },
      geometry: Rect { x: 0, y: 0, width: 960, height: 790 },
      urgent: false,
      focused: false,
      focus: [],
      nodes: [],
      floating_nodes: [],
      sticky: false,
      representation: None,
      fullscreen_mode: Some(0),
      app_id: Some(\"Firefox-esr\"),
      pid: Some(93387),
      window: None,
      num: None,
      window_properties: None,
      marks: [],
      inhibit_idle: Some(false),
      idle_inhibitors: Some(IdleInhibitors { application: None, user: None }),
      shell: Some(XdgShell),
      visible: Some(false),
      output: None 
  }],
    floating_nodes: [],
    sticky: false,
    representation: None,
    fullscreen_mode: Some(0),
    app_id: None,
    pid: None,
    window: None,
    num: None,
    window_properties: None,
    marks: [],
    inhibit_idle: None,
    idle_inhibitors: None,
    shell: None,
    visible: None,
    output: None 
}

Formatted for readability. After some monkey-patching and println!() debugging, this seems to happen when workspace name is unchanged:

Old workspace name: 5 Pass
New workspace name: 5 Pass

get class error: MissingInformation [...]

The above is from

for workspace in get_workspaces(tree) {

Crashes when app_id of a window is null

Stacktrace from debug build off master at 6c4671c.

blissful@neptune > RUST_BACKTRACE=1 ./target/debug/swaywsr
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', src/lib.rs:65:68
stack backtrace:
   0: rust_begin_unwind
             at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/std/src/panicking.rs:515:5
   1: core::panicking::panic_fmt
             at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/core/src/panicking.rs:92:14
   2: core::panicking::panic
             at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/core/src/panicking.rs:50:5
   3: core::option::Option<T>::unwrap
             at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/core/src/option.rs:388:21
   4: swaywsr::get_class
             at ./src/lib.rs:65:42
   5: swaywsr::get_classes
             at ./src/lib.rs:148:27
   6: swaywsr::update_tree
             at ./src/lib.rs:170:23
   7: swaywsr::main
             at ./src/main.rs:88:5
   8: core::ops::function::FnOnce::call_once
             at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/core/src/ops/function.rs:227:5
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

Node causing the crash:

            {
              "id": 237,
              "type": "con",
              "orientation": "none",
              "percent": 0.49601487778958553,
              "urgent": false,
              "marks": [
              ],
              "focused": false,
              "layout": "none",
              "border": "pixel",
              "current_border_width": 3,
              "rect": {
                "x": 38,
                "y": 38,
                "width": 1867,
                "height": 2261
              },
              "deco_rect": {
                "x": 0,
                "y": 0,
                "width": 0,
                "height": 0
              },
              "window_rect": {
                "x": 3,
                "y": 3,
                "width": 1861,
                "height": 2255
              },
              "geometry": {
                "x": 0,
                "y": 0,
                "width": 800,
                "height": 600
              },
              "name": null,
              "window": 50331650,
              "nodes": [
              ],
              "floating_nodes": [
              ],
              "focus": [
              ],
              "fullscreen_mode": 0,
              "sticky": false,
              "pid": 6,
              "app_id": null,
              "visible": false,
              "max_render_time": 0,
              "shell": "xwayland",
              "inhibit_idle": false,
              "idle_inhibitors": {
                "user": "none",
                "application": "none"
              },
              "window_properties": {
                "transient_for": null
              }
            },

Detect and respect manual renames

Let me preface this by saying that application works exactly as advertised. No issues there.

However there is one nagging quirk that bothers me. Say I have number of workspaces:

image

As you can see from on the image above, there are 5 "terms". Now, I rename the first one to something more meaningful:

image

Looks good... But only until I launch another terminal, then swaywsr renames it back.

Would it be possible to detect those terminals were renamed by a user (regexp will do) and avoid renaming those?

Read config from $XDG_CONFIG_HOME by default

Idea: when a config file is not given via --config, but a file exists at $XDG_CONFIG_HOME/swaywsr/config.toml, then load that config instead of resorting to the default config.

What do you think?

swaywsr quits randomly

Hi,

Just started using your wonderful little utility. There is one problem, though, which is that it tends to just quit for no apparent reason. I haven't been able to link this to any specific process, at first I suspected it might have to do with suspend/resume, but this seems not to be the case. I am running it from sway-config like this:

exec_always  swaywsr --icons awesome --config ~/.config/swaywsr/config.toml --no-names

and my config looks like this:

[icons]
TelegramDesktop = ""
firefox = ""
Spotify = ""
termite = "❯"

[aliases]
qutebrowser = "qb"

Not quite sure where to start, as there is no trace of swaywrs in journalctl nor coredumpctl. Is there a way to turn on debugging/logging?

System: Arch linux 5.6.10-rt5-rt, swaywsr 1.0.0, sway 1.4

some icons are hardcoded

So i tried to change the icon for alacritty, and nothing happened after editing the config file.
After investigating, i realised that the icon is hardcoded in icons.rs, along with some others.
This should be handled by the config file, no need to put icons directly into the application.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.