From d962b0f8a8f32c4a6d179129d04841b23247ca8f Mon Sep 17 00:00:00 2001 From: Elias Almqvist Date: Sun, 16 Jul 2023 19:34:05 +0200 Subject: [PATCH 1/6] Theme changes etc --- alacritty/.config/alacritty/alacritty.yml | 11 +- eww/.config/eww/eww.scss | 2 +- gnome-settings.ini | 280 ++++++++++++++++++++++ leftwm/.config/leftwm/config.ron | 2 +- nvim/.config/nvim/init.lua | 4 +- 5 files changed, 289 insertions(+), 10 deletions(-) create mode 100644 gnome-settings.ini diff --git a/alacritty/.config/alacritty/alacritty.yml b/alacritty/.config/alacritty/alacritty.yml index a6b9378..e6d909f 100644 --- a/alacritty/.config/alacritty/alacritty.yml +++ b/alacritty/.config/alacritty/alacritty.yml @@ -2,12 +2,11 @@ env: TERM: xterm-256color -background_opacity: 0.94 - window: + opacity: 1.0 padding: - x: 16 - y: 16 + x: 8 + y: 8 # Window title title: Terminal @@ -52,7 +51,7 @@ font: style: Bold Italic # Point size - size: 10 + size: 9 # If `true`, bold text is drawn using the bright color variants. draw_bold_text_with_bright_colors: true @@ -60,7 +59,7 @@ draw_bold_text_with_bright_colors: true colors: # Default colors primary: - background: "0x181818" + background: "0x121212" foreground: "0xffffff" # Colors the cursor will use if `custom_cursor_colors` is true diff --git a/eww/.config/eww/eww.scss b/eww/.config/eww/eww.scss index 55c2310..b89c225 100644 --- a/eww/.config/eww/eww.scss +++ b/eww/.config/eww/eww.scss @@ -119,7 +119,7 @@ tooltip { } .time { - font-size: 1rem; + font-size: 0.85rem; font-weight: 600; } diff --git a/gnome-settings.ini b/gnome-settings.ini new file mode 100644 index 0000000..30f2fb8 --- /dev/null +++ b/gnome-settings.ini @@ -0,0 +1,280 @@ +[org/freedesktop/folks] +primary-store='eds:12bb500ecbdd20d1e6cad6e57c42ac7abaafdc2f' + +[org/gnome/Console] +last-window-size=(652, 481) + +[org/gnome/Contacts] +did-initial-setup=true +window-fullscreen=false +window-height=656 +window-maximized=false +window-width=1232 + +[org/gnome/GWeather4] +temperature-unit='centigrade' + +[org/gnome/Weather] +locations=[<(uint32 2, <('Göteborg', 'ESGP', true, [(1.0085094136262927, 0.2074032869608953)], [(1.007345872427158, 0.20885773963975227)])>)>] + +[org/gnome/calendar] +active-view='month' +window-maximized=false +window-size=(1232, 1344) + +[org/gnome/clocks/state/window] +maximized=false +panel-id='world' +size=(1232, 656) + +[org/gnome/control-center] +last-panel='keyboard' +window-state=(2496, 1344, false) + +[org/gnome/desktop/app-folders] +folder-children=['Utilities', 'YaST'] + +[org/gnome/desktop/app-folders/folders/Utilities] +apps=['gnome-abrt.desktop', 'gnome-system-log.desktop', 'nm-connection-editor.desktop', 'org.gnome.baobab.desktop', 'org.gnome.Connections.desktop', 'org.gnome.DejaDup.desktop', 'org.gnome.Dictionary.desktop', 'org.gnome.DiskUtility.desktop', 'org.gnome.eog.desktop', 'org.gnome.Evince.desktop', 'org.gnome.FileRoller.desktop', 'org.gnome.fonts.desktop', 'org.gnome.seahorse.Application.desktop', 'org.gnome.tweaks.desktop', 'org.gnome.Usage.desktop', 'vinagre.desktop'] +categories=['X-GNOME-Utilities'] +name='X-GNOME-Utilities.directory' +translate=true + +[org/gnome/desktop/app-folders/folders/YaST] +categories=['X-SuSE-YaST'] +name='suse-yast.directory' +translate=true + +[org/gnome/desktop/background] +color-shading-type='solid' +picture-options='zoom' +picture-uri='file:///usr/share/backgrounds/gnome/fold-l.webp' +picture-uri-dark='file:///usr/share/backgrounds/gnome/fold-d.webp' +primary-color='#26a269' +secondary-color='#000000' + +[org/gnome/desktop/calendar] +show-weekdate=true + +[org/gnome/desktop/input-sources] +sources=[('xkb', 'se')] +xkb-options=@as [] + +[org/gnome/desktop/interface] +clock-show-seconds=true +clock-show-weekday=true +color-scheme='prefer-dark' +document-font-name='Lato 11' +enable-hot-corners=false +font-antialiasing='rgba' +font-hinting='slight' +font-name='Lato 11' +show-battery-percentage=false +text-scaling-factor=1.0 + +[org/gnome/desktop/notifications] +application-children=['org-gnome-nautilus', 'firefox', 'slack', 'jlinkguiserverexe', 'org-gnome-settings', 'org-gnome-calendar', 'gnome-network-panel'] +show-banners=true +show-in-lock-screen=false + +[org/gnome/desktop/notifications/application/firefox] +application-id='firefox.desktop' + +[org/gnome/desktop/notifications/application/gnome-network-panel] +application-id='gnome-network-panel.desktop' + +[org/gnome/desktop/notifications/application/jlinkguiserverexe] +application-id='JLinkGUIServerExe.desktop' + +[org/gnome/desktop/notifications/application/org-gnome-calendar] +application-id='org.gnome.Calendar.desktop' + +[org/gnome/desktop/notifications/application/org-gnome-nautilus] +application-id='org.gnome.Nautilus.desktop' + +[org/gnome/desktop/notifications/application/org-gnome-settings] +application-id='org.gnome.Settings.desktop' + +[org/gnome/desktop/notifications/application/slack] +application-id='slack.desktop' + +[org/gnome/desktop/peripherals/mouse] +accel-profile='flat' +speed=0.49624060150375948 + +[org/gnome/desktop/peripherals/touchpad] +two-finger-scrolling-enabled=true + +[org/gnome/desktop/screensaver] +color-shading-type='solid' +lock-enabled=false +picture-options='zoom' +picture-uri='file:///usr/share/backgrounds/gnome/fold-l.webp' +primary-color='#26a269' +secondary-color='#000000' + +[org/gnome/desktop/search-providers] +disabled=['org.gnome.Epiphany.desktop'] +sort-order=['org.gnome.Contacts.desktop', 'org.gnome.Documents.desktop', 'org.gnome.Nautilus.desktop'] + +[org/gnome/desktop/session] +idle-delay=uint32 0 + +[org/gnome/desktop/wm/keybindings] +close=['q'] +maximize=['t'] +minimize=['Pause'] +move-to-monitor-left=['e'] +move-to-monitor-right=['w'] +move-to-workspace-1=['1'] +move-to-workspace-2=['2'] +move-to-workspace-3=['3'] +move-to-workspace-4=['4'] +switch-to-workspace-1=['1'] +switch-to-workspace-2=['2'] +switch-to-workspace-3=['3'] +switch-to-workspace-4=['4'] +switch-to-workspace-left=['e'] +switch-to-workspace-right=['w'] +toggle-fullscreen=['f'] +unmaximize=@as [] + +[org/gnome/desktop/wm/preferences] +auto-raise=true +button-layout='appmenu:close' +focus-mode='sloppy' +num-workspaces=4 +resize-with-right-button=true +titlebar-font='Lato Bold 11' + +[org/gnome/evolution-data-server] +migrated=true + +[org/gnome/evolution] +default-address-book='12bb500ecbdd20d1e6cad6e57c42ac7abaafdc2f' + +[org/gnome/mutter] +center-new-windows=true +dynamic-workspaces=true +edge-tiling=false +workspaces-only-on-primary=true + +[org/gnome/nautilus/preferences] +default-folder-viewer='icon-view' +migrated-gtk-settings=true +search-filter-time-type='last_modified' + +[org/gnome/nautilus/window-state] +initial-size=(890, 550) + +[org/gnome/settings-daemon/plugins/color] +night-light-enabled=false +night-light-schedule-automatic=true +night-light-schedule-from=10.0 + +[org/gnome/settings-daemon/plugins/media-keys] +custom-keybindings=['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/'] +screensaver=['l'] +www=['b'] + +[org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0] +binding='Return' +command='alacritty' +name='Open Terminal' + +[org/gnome/settings-daemon/plugins/power] +ambient-enabled=false +idle-dim=false +sleep-inactive-ac-type='nothing' +sleep-inactive-battery-type='nothing' + +[org/gnome/shell] +disabled-extensions=['workspace-indicator@gnome-shell-extensions.gcampax.github.com', 'windowsNavigator@gnome-shell-extensions.gcampax.github.com'] +enabled-extensions=['pop-shell@system76.com', 'apps-menu@gnome-shell-extensions.gcampax.github.com', 'TransparentTopbar@enrico.sorio.net', 'blur-my-shell@aunetx', 'gsconnect@andyholmes.github.io'] +favorite-apps=['Alacritty.desktop', 'firefox.desktop', 'org.gnome.Nautilus.desktop'] +welcome-dialog-last-shown-version='44.3' + +[org/gnome/shell/app-switcher] +current-workspace-only=false + +[org/gnome/shell/extensions/blur-my-shell] +brightness=0.73999999999999999 +hacks-level=1 +noise-amount=0.33000000000000002 +noise-lightness=0.78000000000000003 +sigma=103 + +[org/gnome/shell/extensions/blur-my-shell/applications] +blur=true +opacity=255 +whitelist=['Alacritty'] + +[org/gnome/shell/extensions/blur-my-shell/overview] +style-components=2 + +[org/gnome/shell/extensions/gsconnect] +enabled=false +id='7b594ac4-eba1-4db9-bfd2-9dd11b7e0236' +name='dell' + +[org/gnome/shell/extensions/pop-shell] +activate-launcher=['d'] +active-hint=false +active-hint-border-radius=uint32 2 +focus-down=['l'] +focus-left=['j'] +focus-right=['k'] +focus-up=['h'] +gap-inner=uint32 8 +gap-outer=uint32 8 +hint-color-rgba='rgb(88,85,85)' +pop-monitor-right=@as [] +tile-by-default=true +tile-enter=['a'] +toggle-floating=['f'] +toggle-stacking-global=['m'] + +[org/gnome/shell/keybindings] +switch-to-application-1=@as [] +switch-to-application-2=@as [] +switch-to-application-3=@as [] +switch-to-application-4=@as [] +toggle-application-view=@as [] +toggle-message-tray=@as [] + +[org/gnome/shell/weather] +automatic-location=true +locations=[<(uint32 2, <('Göteborg', 'ESGP', true, [(1.0085094136262927, 0.2074032869608953)], [(1.007345872427158, 0.20885773963975227)])>)>] + +[org/gnome/shell/world-clocks] +locations=@av [] + +[org/gnome/software] +check-timestamp=int64 1689230288 +first-run=false +flatpak-purge-timestamp=int64 1689237484 + +[org/gnome/tweaks] +show-extensions-notice=false + +[org/gtk/gtk4/settings/file-chooser] +show-hidden=false +sort-directories-first=false + +[org/gtk/settings/color-chooser] +custom-colors=[(0.34666666666666668, 0.33511111111111114, 0.33511111111111114, 1.0), (0.98431372549019602, 0.72156862745098038, 0.42352941176470588, 1.0)] +selected-color=(true, 0.34666666666666668, 0.33511111111111114, 0.33511111111111114, 1.0) + +[org/gtk/settings/file-chooser] +date-format='regular' +location-mode='path-bar' +show-hidden=false +show-size-column=true +show-type-column=true +sidebar-width=157 +sort-column='name' +sort-directories-first=false +sort-order='ascending' +type-format='category' +window-position=(3204, 388) +window-size=(1270, 648) diff --git a/leftwm/.config/leftwm/config.ron b/leftwm/.config/leftwm/config.ron index 418183d..260d5f9 100644 --- a/leftwm/.config/leftwm/config.ron +++ b/leftwm/.config/leftwm/config.ron @@ -72,7 +72,7 @@ (command: Execute, value: "rofi -show drun", modifier: ["modkey"], key: "d"), (command: Execute, value: "rofi -show ssh", modifier: ["modkey"], key: "s"), (command: Execute, value: "alacritty", modifier: ["modkey"], key: "Return"), - (command: Execute, value: "xdg-open https://google.com", modifier: ["modkey"], key: "b"), // + (command: Execute, value: "chromium", modifier: ["modkey"], key: "b"), // (command: Execute, value: "playerctl play-pause", modifier: ["modkey"], key: "u"), (command: CloseWindow, value: "", modifier: ["modkey", "Shift"], key: "q"), (command: SoftReload, value: "", modifier: ["modkey", "Shift"], key: "x"), diff --git a/nvim/.config/nvim/init.lua b/nvim/.config/nvim/init.lua index 3033c25..25c98ef 100644 --- a/nvim/.config/nvim/init.lua +++ b/nvim/.config/nvim/init.lua @@ -16,7 +16,7 @@ theme.setup { style = "warmer", -- Default theme style. Choose between "dark", "darker", "cool", "deep", "warm", "warmer" and "light" transparent = true, -- Show/hide background term_colors = true, -- Change terminal color as per the selected theme style - ending_tildes = false, -- Show the end-of-buffer tildes. By default they are hidden + ending_tildes = true, -- Show the end-of-buffer tildes. By default they are hidden cmp_itemkind_reverse = false, -- reverse item kind highlights in cmp menu -- toggle theme style --- @@ -36,7 +36,7 @@ theme.setup { -- Lualine options -- lualine = { - transparent = false, -- lualine center bar transparency + transparent = true, -- lualine center bar transparency }, -- Custom Highlights -- From eebe14c6109e7ec3d67d7cfa495bbf9776580aaa Mon Sep 17 00:00:00 2001 From: Elias Almqvist Date: Sun, 23 Jul 2023 20:19:43 +0200 Subject: [PATCH 2/6] Font tweaks & new alacritty config --- alacritty/.config/alacritty/alacritty.toml | 176 +++++++++++++++++++++ 1 file changed, 176 insertions(+) create mode 100644 alacritty/.config/alacritty/alacritty.toml diff --git a/alacritty/.config/alacritty/alacritty.toml b/alacritty/.config/alacritty/alacritty.toml new file mode 100644 index 0000000..bd54564 --- /dev/null +++ b/alacritty/.config/alacritty/alacritty.toml @@ -0,0 +1,176 @@ +[colors] +draw_bold_text_with_bright_colors = true + +[[colors.indexed_colors]] +color = "0xde935f" +index = 16 + +[[colors.indexed_colors]] +color = "0xa3685a" +index = 17 + +[[colors.indexed_colors]] +color = "0x282a2e" +index = 18 + +[[colors.indexed_colors]] +color = "0x373b41" +index = 19 + +[[colors.indexed_colors]] +color = "0xb4b7b4" +index = 20 + +[[colors.indexed_colors]] +color = "0xe0e0e0" +index = 21 + +[colors.bright] +black = "0x969896" +blue = "0x81a2be" +cyan = "0x8abeb7" +green = "0xb5bd68" +magenta = "0xb294bb" +red = "0xcc6666" +white = "0xffffff" +yellow = "0xf0c674" + +[colors.cursor] +cursor = "0xc5c8c6" +text = "0x1d1f21" + +[colors.normal] +black = "0x1d1f21" +blue = "0x81a2be" +cyan = "0x8abeb7" +green = "0xb5bd68" +magenta = "0xb294bb" +red = "0xcc6666" +white = "0xc5c8c6" +yellow = "0xf0c674" + +[colors.primary] +background = "0x121212" +foreground = "0xffffff" + +[cursor] +style = "Block" + +[env] +TERM = "xterm-256color" + +[font] +size = 9 + +[font.bold] +family = "Fira Code" +style = "Bold" + +[font.bold_italic] +family = "Fira Code" +style = "Bold Italic" + +[font.italic] +family = "Fira Code" +style = "Italic" + +[font.normal] +family = "Fira Code" +style = "Normal" + +[[keyboard.bindings]] +action = "Paste" +key = "V" +mods = "Control|Shift" + +[[keyboard.bindings]] +action = "Copy" +key = "C" +mods = "Control|Shift" + +[[keyboard.bindings]] +action = "PasteSelection" +key = "Insert" +mods = "Shift" + +[[keyboard.bindings]] +action = "ResetFontSize" +key = "Key0" +mods = "Control" + +[[keyboard.bindings]] +action = "IncreaseFontSize" +key = "Equals" +mods = "Control" + +[[keyboard.bindings]] +action = "IncreaseFontSize" +key = "Plus" +mods = "Control" + +[[keyboard.bindings]] +action = "DecreaseFontSize" +key = "Minus" +mods = "Control" + +[[keyboard.bindings]] +action = "DecreaseFontSize" +key = "Minus" +mods = "Control" + +[[keyboard.bindings]] +action = "Paste" +key = "Paste" + +[[keyboard.bindings]] +action = "Copy" +key = "Copy" + +[[keyboard.bindings]] +action = "ClearLogNotice" +key = "L" +mods = "Control" + +[[keyboard.bindings]] +chars = "\f" +key = "L" +mods = "Control" + +[[keyboard.bindings]] +action = "ScrollPageUp" +key = "PageUp" +mode = "~Alt" +mods = "Shift" + +[[keyboard.bindings]] +action = "ScrollPageDown" +key = "PageDown" +mode = "~Alt" +mods = "Shift" + +[[keyboard.bindings]] +action = "ScrollToTop" +key = "Home" +mode = "~Alt" +mods = "Shift" + +[[keyboard.bindings]] +action = "ScrollToBottom" +key = "End" +mode = "~Alt" +mods = "Shift" + +[scrolling] +history = 5000 + +[window] +opacity = 1.0 +title = "Terminal" + +[window.class] +general = "Alacritty" +instance = "Alacritty" + +[window.padding] +x = 8 +y = 8 From d42e9e204b95f4bd834fe1772996a6fd879635c2 Mon Sep 17 00:00:00 2001 From: Elias Almqvist Date: Wed, 26 Jul 2023 19:31:51 +0200 Subject: [PATCH 3/6] Minor tweaks --- picom/.config/picom/picom.conf | 6 +++--- vim/.vimrc | 2 +- zsh/.zshrc | 9 ++------- 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/picom/.config/picom/picom.conf b/picom/.config/picom/picom.conf index 21aaf1b..b5f4e4c 100644 --- a/picom/.config/picom/picom.conf +++ b/picom/.config/picom/picom.conf @@ -78,7 +78,7 @@ focus-exclude = [ "class_g = 'Cairo-clock'" ]; # Parameters for background blurring, see the *BLUR* section for more information. blur-method = "dual_kawase"; -blur-strength = 800; +blur-strength = 10; blur-size = 16; # Blur background of semi-transparent / ARGB windows. @@ -167,7 +167,7 @@ detect-rounded-corners = true; # opacity-rule = [ "100:fullscreen", "95:!fullscreen" ]; opacity-rule = [ "100:class_g = 'Alacritty' && focused", - "90:class_g = 'Alacritty' && !focused" + "98:class_g = 'Alacritty' && !focused" ]; opacity-exclude = [ @@ -181,7 +181,7 @@ opacity-exclude = [ # try detecting this with X RandR extension. # # refresh-rate = 60 -refresh-rate = 60; +# refresh-rate = 60; # Use EWMH '_NET_ACTIVE_WINDOW' to determine currently focused window, # rather than listening to 'FocusIn'/'FocusOut' event. Might have more accuracy, diff --git a/vim/.vimrc b/vim/.vimrc index a089011..e262736 100644 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -34,4 +34,4 @@ syntax on "set nu rnu "set ruler -colors koehler +" colors koehler diff --git a/zsh/.zshrc b/zsh/.zshrc index 281f020..d38c56b 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -75,7 +75,7 @@ ZSH_THEME="edvardm" # Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/ # Example format: plugins=(rails git textmate ruby lighthouse) # Add wisely, as too many plugins slow down shell startup. -plugins=(git zsh-autosuggestions zsh-syntax-highlighting fast-syntax-highlighting) +plugins=(git fast-syntax-highlighting) source $ZSH/oh-my-zsh.sh @@ -107,15 +107,10 @@ export TERM='xterm-256color' export PATH="$HOME/.scripts:$HOME/.cargo/bin:$HOME/.local/bin:$PATH" # Add custom scripts! # Program defaults -export VIDPLAY=vlc +export VIDPLAY=mpv export IMGVIEW=eog export EDITOR=nvim -# pyenv -export PYENV_ROOT="$HOME/.pyenv" -command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH" -eval "$(pyenv init -)" - # pnpm export PNPM_HOME="/home/elal/.local/share/pnpm" case ":$PATH:" in From 20f741bfc289f0685e7d46d91fe0231a4f3d7cab Mon Sep 17 00:00:00 2001 From: Elias Almqvist Date: Wed, 26 Jul 2023 19:56:48 +0200 Subject: [PATCH 4/6] Font fix --- alacritty/.config/alacritty/alacritty.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/alacritty/.config/alacritty/alacritty.toml b/alacritty/.config/alacritty/alacritty.toml index bd54564..594b694 100644 --- a/alacritty/.config/alacritty/alacritty.toml +++ b/alacritty/.config/alacritty/alacritty.toml @@ -60,7 +60,7 @@ style = "Block" TERM = "xterm-256color" [font] -size = 9 +size = 10 [font.bold] family = "Fira Code" From 082f6781c8650554204ab6df58341cf6a9e8d723 Mon Sep 17 00:00:00 2001 From: Elias Almqvist Date: Sat, 29 Jul 2023 19:53:54 +0200 Subject: [PATCH 5/6] Stuff --- alacritty/.config/alacritty/alacritty.toml | 2 +- nvim/.config/nvim/plugin/packer_compiled.lua | 8 ++++---- picom/.config/picom/picom.conf | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/alacritty/.config/alacritty/alacritty.toml b/alacritty/.config/alacritty/alacritty.toml index 594b694..1902972 100644 --- a/alacritty/.config/alacritty/alacritty.toml +++ b/alacritty/.config/alacritty/alacritty.toml @@ -164,7 +164,7 @@ mods = "Shift" history = 5000 [window] -opacity = 1.0 +opacity = 0.99 title = "Terminal" [window.class] diff --git a/nvim/.config/nvim/plugin/packer_compiled.lua b/nvim/.config/nvim/plugin/packer_compiled.lua index c20593d..e242278 100644 --- a/nvim/.config/nvim/plugin/packer_compiled.lua +++ b/nvim/.config/nvim/plugin/packer_compiled.lua @@ -197,10 +197,6 @@ _G.packer_plugins = { } time([[Defining packer_plugins]], false) --- Config for: nvim-autopairs -time([[Config for nvim-autopairs]], true) -try_loadstring("\27LJ\2\n@\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\19nvim-autopairs\frequire\0", "config", "nvim-autopairs") -time([[Config for nvim-autopairs]], false) -- Config for: Comment.nvim time([[Config for Comment.nvim]], true) try_loadstring("\27LJ\2\n5\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\fComment\frequire\0", "config", "Comment.nvim") @@ -209,6 +205,10 @@ time([[Config for Comment.nvim]], false) time([[Config for gitsigns.nvim]], true) try_loadstring("\27LJ\2\n6\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\rgitsigns\frequire\0", "config", "gitsigns.nvim") time([[Config for gitsigns.nvim]], false) +-- Config for: nvim-autopairs +time([[Config for nvim-autopairs]], true) +try_loadstring("\27LJ\2\n@\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\19nvim-autopairs\frequire\0", "config", "nvim-autopairs") +time([[Config for nvim-autopairs]], false) -- Config for: todo-comments.nvim time([[Config for todo-comments.nvim]], true) try_loadstring("\27LJ\2\n?\0\0\3\0\3\0\a6\0\0\0'\2\1\0B\0\2\0029\0\2\0004\2\0\0B\0\2\1K\0\1\0\nsetup\18todo-comments\frequire\0", "config", "todo-comments.nvim") diff --git a/picom/.config/picom/picom.conf b/picom/.config/picom/picom.conf index b5f4e4c..7d862d9 100644 --- a/picom/.config/picom/picom.conf +++ b/picom/.config/picom/picom.conf @@ -345,7 +345,7 @@ log-level = "warn"; ################################# # Corners # ################################# -corner-radius = 6.0; +# corner-radius = 6.0; rounded-corners-exclude = [ #"window_type = 'normal'", # "class_g = 'awesome'", From 1bedea401e44e39f1f50410499585a3bab1de471 Mon Sep 17 00:00:00 2001 From: Elias Almqvist Date: Sat, 12 Aug 2023 13:59:45 +0200 Subject: [PATCH 6/6] Tweaks --- eww/.config/eww/scripts/workspace.py | 74 ++++++++++++++-------------- 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/eww/.config/eww/scripts/workspace.py b/eww/.config/eww/scripts/workspace.py index dc1838c..ec36a08 100755 --- a/eww/.config/eww/scripts/workspace.py +++ b/eww/.config/eww/scripts/workspace.py @@ -14,27 +14,17 @@ from subprocess import check_output, CalledProcessError HIDE_EMPTY_WS = True # Exclude empty workspaces OVERIDE_ALL_NAMES = False # Override all the WS names and use the name below OVERIDE_ALL_NAME = "" # Name to use when overriding names -NAME_MAPS: dict[int, str] = { # Replace the indexs name with the given string +NAME_MAPS: dict[int, str] = { # 0: "", # 1: "" } LOG_FILE = "/tmp/eww_workspace.log" # Log file (in case of errors etc) - -# ------------ NOTE: DO NOT TOUCH ------------ +# Compile regex patterns +PARSE_REGEX = re.compile(r"^(\d+)\s+(\*|\-).+\s+(\w+)$") WMCTRL_SCRIPT = "wmctrl -d" -PARSE_REGEX = r"^(\d+)\s+(\*|\-).+\s+(\w+)$" - -NONEMPTY_REGEX = r"^\w+\s+(\w+|\d+).+$" -WMCTRL_NONEMPTY_SCRIPT = "wmctrl -l" - - -def parse_groups(grps: tuple) -> tuple: - """ - Parses the given regex groups - """ - return int(grps[0]), grps[2], grps[1] == "*" +NONEMPTY_SCRIPT = "wmctrl -l" class Workspace: @@ -46,7 +36,7 @@ class Workspace: self.index = index if OVERIDE_ALL_NAMES: self.name = OVERIDE_ALL_NAME - elif index in NAME_MAPS.keys(): + elif index in NAME_MAPS: self.name = NAME_MAPS[index] else: self.name = name @@ -60,57 +50,67 @@ class Workspace: return json.dumps(self, default=lambda o: o.__dict__, sort_keys=True) +def parse_groups(grps: tuple) -> tuple: + """ + Parses the given regex groups + """ + return int(grps[0]), grps[2], grps[1] == "*" + + def parse_workspaces(): """ Function to get all the workspaces """ + nonempty_workspaces = set() try: - nonempty = check_output(WMCTRL_NONEMPTY_SCRIPT.split(" ")) + nonempty = check_output(NONEMPTY_SCRIPT.split(" ")) nonempty = nonempty.decode("utf-8") - nonempty_workspaces = re.findall(NONEMPTY_REGEX, - nonempty, - flags=re.MULTILINE) - nonempty_workspaces = list(map(int, nonempty_workspaces)) + for line in nonempty.splitlines(): + try: + ws_num = line[12] + nonempty_workspaces.add(int(ws_num)) + except: + continue except CalledProcessError: - nonempty_workspaces = [] + pass try: inp = check_output(WMCTRL_SCRIPT.split(" ")) inp = inp.decode("utf-8") except CalledProcessError as err: - logfile = open(LOG_FILE, "a") - logfile.write("ERROR! COULD NOT PARSE WORKSPACES OR SOMETHING! YOU ARE ON YOUR OWN.") - logfile.write(f"{err}") + with open(LOG_FILE, "a") as logfile: + logfile.write( + "ERROR! COULD NOT PARSE WORKSPACES OR SOMETHING! YOU ARE ON YOUR OWN." + ) + logfile.write(f"{err}") inp = "" out = [] for line in inp.splitlines(): - matches = re.search(PARSE_REGEX, line) - grps = matches.groups() - data = parse_groups(grps) - workspace = Workspace(*data, data[0] not in nonempty_workspaces) - - out.append(workspace) + matches = PARSE_REGEX.search(line) + if matches: + grps = matches.groups() + data = parse_groups(grps) + workspace = Workspace(*data, data[0] not in nonempty_workspaces) + out.append(workspace) return out if __name__ == "__main__": - args = sys.argv - # NOTE: use deflisten LAST_STRING = "" while True: workspaces = parse_workspaces() - workspaces = list(filter(lambda ws: - (ws.iscurrent) - or (not ws.isempty) - or (not HIDE_EMPTY_WS), - workspaces)) + workspaces = [ + ws + for ws in workspaces + if ws.iscurrent or (not ws.isempty) or (not HIDE_EMPTY_WS) + ] json_str = json.dumps(workspaces, default=lambda ws: ws.to_json())