Skip to content

Instantly share code, notes, and snippets.

@ekickx
Last active October 17, 2021 20:50
Show Gist options
  • Select an option

  • Save ekickx/9a100d980ab8564525612b2273a34e8c to your computer and use it in GitHub Desktop.

Select an option

Save ekickx/9a100d980ab8564525612b2273a34e8c to your computer and use it in GitHub Desktop.

Revisions

  1. ekickx renamed this gist Oct 17, 2021. 1 changed file with 8 additions and 2 deletions.
    10 changes: 8 additions & 2 deletions test.lua → wm-colorscheme.lua
    Original file line number Diff line number Diff line change
    @@ -5,6 +5,12 @@ nama_wm = nama_wm:gsub("[\r\n]", "")

    if nama_wm == 'GNOME' then
    vim.cmd 'colorscheme blue'
    elseif nama_wm == "wlroots" then
    elseif nama_wm == 'wlroots' then
    vim.cmd 'colorscheme torte'
    end
    elseif nama_wm == 'Xfwm4' then
    vim.cmd 'colorscheme darkblue'
    elseif nama_wm == 'Openbox' then
    vim.cmd 'colorscheme delek'
    elseif nama_wm == 'i3' then
    vim.cmd 'colorscheme evening'
    end
  2. ekickx revised this gist Oct 17, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion test.lua
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,5 @@
    -- Cek nama wm
    local nama_wm = vim.fn.system 'toolbox run wmctrl -m | grep -i name | cut -d " " -f 2'
    local nama_wm = vim.fn.system 'wmctrl -m | grep -i name | cut -d " " -f 2'
    -- Hapus line break just in case
    nama_wm = nama_wm:gsub("[\r\n]", "")

  3. ekickx revised this gist Oct 17, 2021. 1 changed file with 5 additions and 3 deletions.
    8 changes: 5 additions & 3 deletions test.lua
    Original file line number Diff line number Diff line change
    @@ -1,8 +1,10 @@
    local nama_wm = vim.fn.system 'wmctrl -m | grep -i name | cut -d " " -f 2'
    print(nama_wm)
    -- Cek nama wm
    local nama_wm = vim.fn.system 'toolbox run wmctrl -m | grep -i name | cut -d " " -f 2'
    -- Hapus line break just in case
    nama_wm = nama_wm:gsub("[\r\n]", "")

    if nama_wm == 'GNOME' then
    vim.cmd 'colorscheme doom-one'
    vim.cmd 'colorscheme blue'
    elseif nama_wm == "wlroots" then
    vim.cmd 'colorscheme torte'
    end
  4. ekickx created this gist Oct 17, 2021.
    8 changes: 8 additions & 0 deletions test.lua
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@
    local nama_wm = vim.fn.system 'wmctrl -m | grep -i name | cut -d " " -f 2'
    print(nama_wm)

    if nama_wm == 'GNOME' then
    vim.cmd 'colorscheme doom-one'
    elseif nama_wm == "wlroots" then
    vim.cmd 'colorscheme torte'
    end