TimUntersberger / nog

A tiling window manager for Windows
MIT License
697 stars 20 forks source link

[help wanted] some of applications won't be affected by nog in workmode #287

Closed TTTPOB closed 3 years ago

TTTPOB commented 3 years ago

image

this application (white window in the middle) is called wechat, it seems the application is written in directui, i don't know if this should work.

TimUntersberger commented 3 years ago

There could be many reasons for this.

Can you paste your config?

TTTPOB commented 3 years ago

I started using this project today so it's basically the default config. And will the log be useful?

local direction_keys = {
  h = "left",
  j = "down",
  k = "up",
  l = "right"
}

-- Nog has 10 workspaces
local workspaces = { 1, 2, 3, 4, 5, 6, 7, 8, 9 }

nog.config.bar.font_size = 18

nog.config.work_mode = false
-- draws the app bar while nog is in work mode
nog.config.display_app_bar = true
nog.config.launch_on_startup = true
nog.config.multi_monitor = true
-- hides the task bar while nog is in work mode
nog.config.remove_task_bar = true

-- We customize the first two workspaces with a custom display text
nog.config.workspaces = {
  [1] = {
    text = " Code "
  },
  [2] = {
    text = " Jupyter "
  },
  [3] = {
    text = " Browser "
  },
  [4] = {
    text = " Comm "
  },
  [5] = {
    text = " Github Issue "
  },
  [6] = {
    text = " Entertainment "
  },
  [7] = {
    text = " File Explorer "
  },
}

nog.config.rules = {
  -- we want to ignore explorer.exe, because the user experience is better when in floating mode IMO
  ["explorer.exe"] = { 
    ignore = false,
    has_custom_titlebar = true
  },
  -- same thing here
  ["taskmgr.exe"] = { 
    ignore = false 
  },
  -- same thing here
  ["snippingtool.exe"] = { 
    ignore = true 
  },
  ["firefox.exe"] = {
    has_custom_titlebar = true,
    -- Adds special handling for firefox
    firefox = true
  },
  ["chrome.exe"] = {
    has_custom_titlebar = true,
    -- Adds special handling for chrome
    chromium = true
  },
  ["msedge.exe"] = {
    has_custom_titlebar = true,
    -- Adds special handling for chrome
    chromium = true
  },
  ["discord.exe"] = {
    has_custom_titlebar = true
  },
  ["spotify.exe"] = {
    has_custom_titlebar = true
  },
  ["code.exe"] = {
    has_custom_titlebar = true
  },
}

nog.nbind("alt+i", nog.win_ignore)
nog.nbind("alt+q", nog.win_close)
nog.nbind("alt+m", nog.win_minimize)
nog.nbind("alt+x", nog.quit)

-- nog.nbind_tbl will map each key to its value so writing the nog.nbind_tbl line is equal to the following
-- nog.nbind("alt+l", function() nog.ws_focus("Right") end)
-- nog.nbind("alt+k", function() nog.ws_focus("Up") end)
-- nog.nbind("alt+j", function() nog.ws_focus("Down") end)
-- nog.nbind("alt+h", function() nog.ws_focus("Left") end)
nog.nbind_tbl("alt", nog.ws_focus, direction_keys)
nog.nbind_tbl("alt+control", nog.ws_swap, direction_keys)

nog.nbind("alt+plus", function()
  nog.ws_set_split_direction("Vertical")
end)
nog.nbind("alt+minus", function()
  nog.ws_set_split_direction("Horizontal")
end)

nog.nbind("alt+control+f", nog.win_toggle_floating)
nog.gbind("alt+control+e", nog.toggle_work_mode)
nog.nbind("alt+f", nog.ws_toggle_fullscreen)

nog.nbind_tbl("alt+shift", nog.win_move_to_ws, workspaces)
nog.nbind_tbl("alt+control", nog.ws_move_to_monitor, workspaces)
nog.nbind_tbl("alt", nog.ws_change, workspaces)
TimUntersberger commented 3 years ago

And will the log be useful?

Please add them 👍

TTTPOB commented 3 years ago
  ["WeChat.exe"] = { 
    ignore = false,
    has_custom_titlebar = true
  },

added these lines to my config (no effects) and log file attached

what I did during log generation is to launch the application (WeChat.exe) and maximizing/minimizing it

nog_rCURRENT.log

TimUntersberger commented 3 years ago

added these lines to my config (no effects)

ignore set to false is the default behaviour. This intuitively doesn't tell nog to always manage this window. I guess supporting this would be the solution to this problem 👍

TimUntersberger commented 3 years ago
  ["WeChat.exe"] = { 
    action = "manage",
    has_custom_titlebar = true
  },

this rule should fix your problem in the latest version. note that you have to update your other rules too. For more info check the CHANGELOG.md file.

TTTPOB commented 3 years ago
  ["WeChat.exe"] = { 
    action = "manage",
    has_custom_titlebar = true
  },

this rule should fix your problem in the latest version. note that you have to update your other rules too. For more info check the CHANGELOG.md file.

thank you, I will try this

TimUntersberger commented 3 years ago

@TTTPOB did this work for you?

TTTPOB commented 3 years ago

@TTTPOB did this work for you?

Thank you very much, it worked now