mirror of
https://github.com/pjones/plasma-manager.git
synced 2024-08-17 03:30:22 +03:00
rc2nix: Block more state settings and theme settings
This commit is contained in:
parent
5b01a1a8f3
commit
59598c34df
@ -80,13 +80,22 @@ module Rc2Nix
|
||||
KEY_BLOCK_LIST = [
|
||||
/^activate widget \d+$/, # Depends on state :(
|
||||
/^ColorScheme(Hash)?$/,
|
||||
/^History Items/,
|
||||
/^LookAndFeelPackage$/,
|
||||
/^Theme$/,
|
||||
/^Recent (Files|URLs)/,
|
||||
/^Theme$/i,
|
||||
/^Version$/,
|
||||
/State$/,
|
||||
/Timestamp$/,
|
||||
]
|
||||
|
||||
############################################################################
|
||||
# List of functions that get called with a group name and a key
|
||||
# name. If the function returns +true+ then block that key.
|
||||
BLOCK_LIST_LAMBDA = [
|
||||
->(group, key) { group == "org.kde.kdecoration2" && key == "library" }
|
||||
]
|
||||
|
||||
############################################################################
|
||||
attr_reader(:file_name, :settings)
|
||||
|
||||
@ -117,6 +126,7 @@ module Rc2Nix
|
||||
# Reasons to skip this group or key:
|
||||
next if GROUP_BLOCK_LIST.any? {|re| @last_group.match(re)}
|
||||
next if KEY_BLOCK_LIST.any? {|re| key.match(re)}
|
||||
next if BLOCK_LIST_LAMBDA.any? {|fn| fn.call(@last_group, key)}
|
||||
next if File.basename(@file_name) == "plasmanotifyrc" && key == "Seen"
|
||||
|
||||
@settings[@last_group] ||= {}
|
||||
|
Loading…
Reference in New Issue
Block a user